Documentation

Application

Table of Contents

Interfaces

BodySummarizerInterface
ClientInterface
Client interface for sending HTTP requests.
CookieJarInterface
Stores HTTP cookies.
GuzzleException
Every HTTP client related exception MUST implement this interface.
CurlFactoryInterface
MessageFormatterInterface
PromiseInterface
A promise represents the eventual result of an asynchronous operation.
PromisorInterface
Interface used with classes that return a promise.
TaskQueueInterface
Serializable
Signer
FormatterInterface
Interface for formatters
ActivationStrategyInterface
Interface for activation strategies for the FingersCrossedHandler.
FormattableHandlerInterface
Interface to describe loggers that have a formatter
HandlerInterface
Interface that all Monolog Handlers must implement
ProcessableHandlerInterface
Interface to describe loggers that have processors
ProcessorInterface
An optional interface to allow labelling Monolog processors.
ResettableInterface
Handler or Processor implementing this interface will be reset when Logger::reset() is called.
InvokerInterface
Invoke a callable.
ParameterResolver
Resolves the parameters to use to call the callable.
ExtendsPreviousDefinition
A definition that extends a previous definition with the same name.
DefinitionHelper
Helps defining container entries.
DefinitionResolver
Resolves a definition to a value.
SelfResolvingDefinition
Describes a definition that can resolve itself.
Autowiring
Source of definitions for entries of the container.
DefinitionSource
Source of definitions for entries of the container.
MutableDefinitionSource
Describes a definition source to which we can add new definitions.
RequestedEntry
Represents the container entry that was requested.
FactoryInterface
Describes the basic interface of a factory.
BatchClientInterface
BatchClient allow to sends multiple request and retrieve a Batch Result.
HttpClientPool
A http client pool allows to send requests on a pool of different http client using a specific strategy (least used, round robin, ...).
HttpClientRouterInterface
Route a request to a specific client in the stack based using a RequestMatcher.
HttpMethodsClientInterface
Convenience HTTP client that integrates the MessageFactory in order to send requests in the following form:.
Journal
Records history of HTTP calls.
Plugin
A plugin is a middleware to transform the request and/or the response.
Exception
An interface implemented by all discovery related exceptions.
DiscoveryStrategy
Exception
Every HTTP Client related Exception must implement this interface.
HttpAsyncClient
Sends a PSR-7 Request in an asynchronous way by returning a Promise.
HttpClient
Authentication
Add authentication information to a PSR-7 Request.
Exception
An interface implemented by all HTTP message related exceptions.
Formatter
Formats a request and/or a response as a string.
RequestMatcher
Match a request.
Promise
Promise represents a value that may not be available yet, but will be resolved at some point in future.
ContainerExceptionInterface
Base interface representing a generic exception in a container.
ContainerInterface
Describes the interface of a container that exposes methods to read its entries.
NotFoundExceptionInterface
No entry was found in the container.
ClientExceptionInterface
Every HTTP client related exception MUST implement this interface.
ClientInterface
NetworkExceptionInterface
Thrown when the request cannot be completed because of network issues.
RequestExceptionInterface
Exception for when a request failed.
RequestFactoryInterface
ResponseFactoryInterface
ServerRequestFactoryInterface
StreamFactoryInterface
UploadedFileFactoryInterface
UriFactoryInterface
MessageInterface
HTTP messages consist of requests from a client to a server and responses from a server to a client. This interface defines the methods common to each.
RequestInterface
Representation of an outgoing, client-side request.
ResponseInterface
Representation of an outgoing, server-side response.
ServerRequestInterface
Representation of an incoming, server-side HTTP request.
StreamInterface
Describes a data stream.
UploadedFileInterface
Value object representing a file uploaded through an HTTP request.
UriInterface
Value object representing a URI.
LoggerAwareInterface
Describes a logger-aware instance.
LoggerInterface
Describes a logger instance.
Report
DeprecatedSniff
Sniff
ExceptionInterface
Marker interface for all exceptions thrown by the OptionsResolver component.
Options
Contains resolved option values.
Stringable

Classes

ApiBufferCollection
BufferChecker
RestApi
AttributesCollection
Collection
ExternalProductsCollection
ListingCollection
ProductCardsCollection
ProductGroupsCollection
ProductsCollection
SearchCollection
SettingsCollection
SupportCollection
AliasesTable
CollectionsTable
Dashboard
DashTable
DocumentsTable
TempDashboard
TsDashboard
WscSettings
FeedGenerator
Asset
Attribute
Award
Banner
ExternalProduct
Product
ProductCard
SearchResult
ConfigProvider
This class serves as an abstraction layer for managing various settings and variables required for the plugin's functionality. The ConfigProvider class centralizes configuration management, ensuring that if the source of settings changes (e.g., from environment variables, WordPress Option pages, etc.), only the implementation of the relevant methods in this class needs to be updated.
FileLock
Helpers
Log
PimService
TsService
ComposerAutoloaderInitfe640e8810468f59133cc2f4f11fb78e
ComposerStaticInitfe640e8810468f59133cc2f4f11fb78e
ClassLoader
ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
InstalledVersions
This class is copied in every Composer installed project and available to all
Plugin
PHP_CodeSniffer standard installation manager.
BodySummarizer
Client
CookieJar
Cookie jar that stores cookies as an array
FileCookieJar
Persists non-session cookies using a JSON formatted file
SessionCookieJar
Persists cookies in the client session
SetCookie
Set-Cookie object
BadResponseException
Exception when an HTTP error occurs (4xx or 5xx error)
ClientException
Exception when a client error is encountered (4xx codes)
ConnectException
Exception thrown when a connection cannot be established.
InvalidArgumentException
RequestException
HTTP Request exception
ServerException
Exception when a server error is encountered (5xx codes)
TooManyRedirectsException
HTTP Request exception
TransferException
CurlFactory
Creates curl resources from a request
CurlHandler
HTTP handler that uses cURL easy handles as a transport layer.
CurlMultiHandler
Returns an asynchronous response using curl_multi_* functions.
MockHandler
Handler that returns responses or throw exceptions from a queue.
Proxy
Provides basic proxies for handlers.
StreamHandler
HTTP handler that uses PHP's HTTP stream wrapper.
HandlerStack
Creates a composed Guzzle handler function by stacking middlewares on top of an HTTP handler function.
MessageFormatter
Formats log messages using variable substitutions for requests, responses, and other transactional data.
Middleware
Functions used to create and wrap handlers with handler middleware.
Pool
Sends an iterator of requests concurrently using a capped pool size.
PrepareBodyMiddleware
Prepares requests that contain a body, adding the Content-Length, Content-Type, and Expect headers.
RedirectMiddleware
Request redirect middleware.
RequestOptions
This class contains a list of built-in Guzzle request options.
RetryMiddleware
Middleware that retries requests based on the boolean result of invoking the provided "decider" function.
TransferStats
Represents data at the point after it was transferred either successfully or after a network error.
Utils
AggregateException
Exception thrown when too many errors occur in the some() or any() methods.
CancellationException
Exception that is set as the reason for a promise that has been cancelled.
Coroutine
Creates a promise that is resolved using a generator that yields values or promises (somewhat similar to C#'s async keyword).
Create
Each
EachPromise
Represents a promise that iterates over many promises and invokes side-effect functions in the process.
FulfilledPromise
A promise that has been fulfilled.
Is
Promise
Promises/A+ implementation that avoids recursion when possible.
RejectedPromise
A promise that has been rejected.
RejectionException
A special exception that is thrown when waiting on a rejected promise.
TaskQueue
A task queue that executes tasks in a FIFO order.
Utils
AppendStream
Reads from multiple streams, one after the other.
BufferStream
Provides a buffer stream that can be written to to fill a buffer, and read from to remove bytes from the buffer.
CachingStream
Stream decorator that can cache previously read bytes from a sequentially read stream.
DroppingStream
Stream decorator that begins dropping data once the size of the underlying stream becomes too full.
MalformedUriException
Exception thrown if a URI cannot be parsed because it's malformed.
FnStream
Compose stream implementations based on a hash of functions.
Header
HttpFactory
Implements all of the PSR-17 interfaces.
InflateStream
Uses PHP's zlib.inflate filter to inflate zlib (HTTP deflate, RFC1950) or gzipped (RFC1952) content.
LazyOpenStream
Lazily reads or writes to a file that is opened only after an IO operation take place on the stream.
LimitStream
Decorator used to return only a subset of a stream.
Message
MimeType
MultipartStream
Stream that when read returns bytes for a streaming multipart or multipart/form-data stream.
NoSeekStream
Stream decorator that prevents a stream from being seeked.
PumpStream
Provides a read only stream that pumps data from a PHP callable.
Query
Request
PSR-7 request implementation.
Response
PSR-7 response implementation.
ServerRequest
Server-side HTTP request
Stream
PHP stream implementation.
StreamWrapper
Converts Guzzle streams into PHP stream resources.
UploadedFile
Uri
PSR-7 URI implementation.
UriComparator
Provides methods to determine if a modified URL should be considered cross-origin.
UriNormalizer
Provides methods to normalize and compare URIs.
UriResolver
Resolves a URI reference in the context of a base URI and the opposite way.
Utils
InvalidSignatureException
MissingSecretKeyException
PhpVersionNotSupportedException
SerializableClosure
Native
Signed
Hmac
ClosureScope
ClosureStream
ReflectionClosure
SelfReference
UnsignedSerializableClosure
AsMonologProcessor
A reusable attribute to help configure a class or a method as a processor.
WithMonologChannel
A reusable attribute to help configure a class as expecting a given logger channel.
DateTimeImmutable
Overrides default json encoding of date time objects
ErrorHandler
Monolog error handler
ChromePHPFormatter
Formats a log message according to the ChromePHP array format
ElasticaFormatter
Format a log message into an Elastica Document
ElasticsearchFormatter
Format a log message into an Elasticsearch record
FlowdockFormatter
formats the record to be used in the FlowdockHandler
FluentdFormatter
Class FluentdFormatter
GelfMessageFormatter
Serializes a log message to GELF
GoogleCloudLoggingFormatter
Encodes message information into JSON in a format compatible with Cloud logging.
HtmlFormatter
Formats incoming records into an HTML table
JsonFormatter
Encodes whatever record data is passed to it as json
LineFormatter
Formats incoming records into a one-line string
LogglyFormatter
Encodes message information into JSON in a format compatible with Loggly.
LogmaticFormatter
Encodes message information into JSON in a format compatible with Logmatic.
LogstashFormatter
Serializes a log message to Logstash Event Format
MongoDBFormatter
Formats a record for use with the MongoDBHandler.
NormalizerFormatter
Normalizes incoming records to remove objects/resources so it's easier to dump to various targets
ScalarFormatter
Formats data into an associative array of scalar (+ null) values.
SyslogFormatter
Serializes a log message according to RFC 5424
WildfireFormatter
Serializes a log message according to Wildfire's header requirements
AbstractHandler
Base Handler class providing basic level/bubble support
AbstractProcessingHandler
Base Handler class providing the Handler structure, including processors and formatters
AbstractSyslogHandler
Common syslog functionality
AmqpHandler
Base Handler class providing the Handler structure, including processors and formatters
BrowserConsoleHandler
Handler sending logs to browser's javascript console with no browser extension required
BufferHandler
Buffers all records until closing the handler and then pass them as batch.
ChromePHPHandler
Handler sending logs to the ChromePHP extension (http://www.chromephp.com/)
CouchDBHandler
CouchDB handler
CubeHandler
Logs to Cube.
DeduplicationHandler
Simple handler wrapper that deduplicates log records across multiple requests
DoctrineCouchDBHandler
CouchDB handler for Doctrine CouchDB ODM
DynamoDbHandler
Amazon DynamoDB handler (http://aws.amazon.com/dynamodb/)
ElasticaHandler
Elastic Search handler
ElasticsearchHandler
Elasticsearch handler
ErrorLogHandler
Stores to PHP error_log() handler.
FallbackGroupHandler
Forwards records to at most one handler
FilterHandler
Simple handler wrapper that filters records based on a list of levels
ChannelLevelActivationStrategy
Channel and Error level based monolog activation strategy. Allows to trigger activation based on level per channel. e.g. trigger activation on level 'ERROR' by default, except for records of the 'sql' channel; those should trigger activation on level 'WARN'.
ErrorLevelActivationStrategy
Error level based activation strategy.
FingersCrossedHandler
Buffers all records until a certain level is reached
FirePHPHandler
Simple FirePHP Handler (http://www.firephp.org/), which uses the Wildfire protocol.
FleepHookHandler
Sends logs to Fleep.io using Webhook integrations
FlowdockHandler
Sends notifications through the Flowdock push API
GelfHandler
Handler to send messages to a Graylog2 (http://www.graylog2.org) server
GroupHandler
Forwards records to multiple handlers
Handler
Base Handler class providing basic close() support as well as handleBatch
HandlerWrapper
This simple wrapper class can be used to extend handlers functionality.
IFTTTHandler
IFTTTHandler uses cURL to trigger IFTTT Maker actions
InsightOpsHandler
Inspired on LogEntriesHandler.
LogEntriesHandler
Stores to any socket - uses fsockopen() or pfsockopen().
LogglyHandler
Sends errors to Loggly.
LogmaticHandler
Stores to any socket - uses fsockopen() or pfsockopen().
MailHandler
Base class for all mail handlers
MandrillHandler
MandrillHandler uses cURL to send the emails to the Mandrill API
MissingExtensionException
Exception can be thrown if an extension for a handler is missing
MongoDBHandler
Logs to a MongoDB database.
NativeMailerHandler
NativeMailerHandler uses the mail() function to send the emails
NewRelicHandler
Class to record a log on a NewRelic application.
NoopHandler
No-op
NullHandler
Blackhole
OverflowHandler
Handler to only pass log messages when a certain threshold of number of messages is reached.
PHPConsoleHandler
Monolog handler for Google Chrome extension "PHP Console"
ProcessHandler
Stores to STDIN of any process, specified by a command.
PsrHandler
Proxies log messages to an existing PSR-3 compliant logger.
PushoverHandler
Sends notifications through the pushover api to mobile phones
RedisHandler
Logs to a Redis key using rpush
RedisPubSubHandler
Sends the message to a Redis Pub/Sub channel using PUBLISH
RollbarHandler
Sends errors to Rollbar
RotatingFileHandler
Stores logs to files that are rotated every day and a limited number of files are kept.
SamplingHandler
Sampling handler
SendGridHandler
SendGridrHandler uses the SendGrid API v2 function to send Log emails, more information in https://sendgrid.com/docs/API_Reference/Web_API/mail.html
SlackRecord
Slack record utility helping to log to Slack webhooks or API.
SlackHandler
Sends notifications through Slack API
SlackWebhookHandler
Sends notifications through Slack Webhooks
SocketHandler
Stores to any socket - uses fsockopen() or pfsockopen().
SqsHandler
Writes to any sqs queue.
StreamHandler
Stores to any stream resource
SymfonyMailerHandler
SymfonyMailerHandler uses Symfony's Mailer component to send the emails
SyslogHandler
Logs to syslog service.
UdpSocket
SyslogUdpHandler
A Handler for logging to a remote syslogd server.
TelegramBotHandler
Handler sends logs to Telegram using Telegram Bot API.
TestHandler
Used for testing purposes.
WhatFailureGroupHandler
Forwards records to multiple handlers suppressing failures of each handler and continuing through to give every handler a chance to succeed.
ZendMonitorHandler
Handler sending logs to Zend Monitor
Logger
Monolog log channel
LogRecord
Monolog log record
ClosureContextProcessor
Generates a context from a Closure if the Closure is the only value in the context
GitProcessor
Injects Git branch and Git commit SHA in all records
HostnameProcessor
Injects value of gethostname in all records
IntrospectionProcessor
Injects line/file:class/function where the log message came from
LoadAverageProcessor
Injects sys_getloadavg in all records @see https://www.php.net/manual/en/function.sys-getloadavg.php
MemoryPeakUsageProcessor
Injects memory_get_peak_usage in all records
MemoryProcessor
Some methods that are common for all memory processors
MemoryUsageProcessor
Injects memory_get_usage in all records
MercurialProcessor
Injects Hg branch and Hg revision number in all records
ProcessIdProcessor
Adds value of getmypid into records
PsrLogMessageProcessor
Processes a record's message according to PSR-3 rules
TagProcessor
Adds a tags array into record
UidProcessor
Adds a unique identifier into records
WebProcessor
Injects url/method and remote IP of the current web request in all records
Registry
Monolog log registry
SignalHandler
Monolog POSIX signal handler
Utils
HttplugFactory
Psr17Factory
Request
Response
ServerRequest
Stream
UploadedFile
Uri
PSR-7 URI implementation.
CallableResolver
Resolves a callable from a container.
InvocationException
Impossible to invoke the callable.
NotCallableException
The given callable is not actually callable.
NotEnoughParametersException
Not enough parameters could be resolved to invoke the callable.
Invoker
Invoke a callable.
AssociativeArrayResolver
Tries to map an associative array (string-indexed) to the parameter names.
ParameterNameContainerResolver
Inject entries from a DI container using the parameter names.
TypeHintContainerResolver
Inject entries from a DI container using the type-hints.
DefaultValueResolver
Finds the default value for a parameter, *if it exists*.
NumericArrayResolver
Simply returns all the values of the $providedParameters array that are indexed by the parameter position (i.e. a number).
ResolverChain
Dispatches the call to other resolvers until all parameters are resolved.
TypeHintResolver
Inject entries using type-hints.
Inject
#[Inject] attribute.
Injectable
"Injectable" attribute.
CompiledContainer
Compiled version of the dependency injection container.
Compiler
Compiles the container into PHP code much more optimized for performances.
ObjectCreationCompiler
Compiles an object definition into native PHP code that, when executed, creates the object.
RequestedEntryHolder
Container
Dependency Injection Container.
ContainerBuilder
Helper to create and configure a Container.
ArrayDefinition
Definition of an array containing values or references.
ArrayDefinitionExtension
Extends an array definition by adding new elements into it.
AutowireDefinition
Defines how an object can be instantiated.
DecoratorDefinition
Factory that decorates a sub-definition.
ObjectDefinitionDumper
Dumps object definitions to string for debugging purposes.
EnvironmentVariableDefinition
Defines a reference to an environment variable, with fallback to a default value if the environment variable is not defined.
InvalidAttribute
Error in the definitions using PHP attributes.
InvalidDefinition
Invalid DI definitions.
FactoryDefinition
Definition of a value or class with a factory.
AutowireDefinitionHelper
Helps defining how to create an instance of a class using autowiring.
CreateDefinitionHelper
Helps defining how to create an instance of a class.
FactoryDefinitionHelper
Helps defining how to create an instance of a class using a factory (callable).
InstanceDefinition
Defines injections on an existing class instance.
MethodInjection
Describe an injection in an object method.
PropertyInjection
Describe an injection in a class property.
ObjectDefinition
Defines how an object can be instantiated.
Reference
Represents a reference to another entry.
ArrayResolver
Resolves an array definition to a value.
DecoratorResolver
Resolves a decorator definition to a value.
EnvironmentVariableResolver
Resolves a environment variable definition to a value.
FactoryResolver
Resolves a factory definition to a value.
InstanceInjector
Injects dependencies on an existing instance.
ObjectCreator
Create objects based on an object definition.
ParameterResolver
Resolves parameters for a function call.
ResolverDispatcher
Dispatches to more specific resolvers.
AttributeBasedAutowiring
Provides DI definitions by reading PHP 8 attributes such as #[Inject] and #[Injectable].
DefinitionArray
Reads DI definitions from a PHP array.
DefinitionFile
Reads DI definitions from a file returning a PHP array.
DefinitionNormalizer
Turns raw definitions/definition helpers into definitions ready to be resolved or compiled.
NoAutowiring
Implementation used when autowiring is completely disabled.
ReflectionBasedAutowiring
Reads DI class definitions using reflection.
SourceCache
Decorator that caches another definition source.
SourceChain
Manages a chain of other definition sources.
StringDefinition
Definition of a string composed of other strings.
ValueDefinition
Definition of a value for dependency injection.
DependencyException
Exception for the Container.
DefinitionParameterResolver
Resolves callable parameters using definitions.
FactoryParameterResolver
Inject the container, the definition or any other service using type-hints.
NotFoundException
Exception thrown when a class or a value is not found in the container.
ProxyFactory
Creates proxy classes.
BatchClient
BatchResult
Responses and exceptions returned from parallel request execution.
Deferred
A deferred allow to return a promise which has not been resolved yet.
EmulatedHttpAsyncClient
Emulates an async HTTP client with the help of a synchronous client.
EmulatedHttpClient
Emulates a synchronous HTTP client with the help of an asynchronous client.
BatchException
This exception is thrown when HttpClient::sendRequests led to at least one failure.
CircularRedirectionException
Thrown when circular redirection is detected.
ClientErrorException
Thrown when there is a client error (4xx).
HttpClientNoMatchException
Thrown when a http client match in the HTTPClientRouter.
HttpClientNotFoundException
Thrown when a http client cannot be chosen in a pool.
LoopException
Thrown when the Plugin Client detects an endless loop.
MultipleRedirectionException
Redirect location cannot be chosen.
ServerErrorException
Thrown when there is a server error (5xx).
FlexibleHttpClient
A flexible http client, which implements both interface and will emulate one contract, the other, or none at all depending on the injected client contract.
HttpClientPool
A http client pool allows to send requests on a pool of different http client using a specific strategy (least used, round robin, ...).
LeastUsedClientPool
LeastUsedClientPool will choose the client with the less current request in the pool.
RandomClientPool
RoundRobinClientPool will choose the next client in the pool.
RoundRobinClientPool
RoundRobinClientPool will choose the next client in the pool.
HttpClientRouter
{@inheritdoc}
HttpMethodsClient
AddHostPlugin
Add schema, host and port to a request. Can be set to overwrite the schema and host if desired.
AddPathPlugin
Prepend a base path to the request URI. Useful for base API URLs like http://domain.com/api.
AuthenticationPlugin
Send an authenticated request.
BaseUriPlugin
Combines the AddHostPlugin and AddPathPlugin.
ContentLengthPlugin
Allow to set the correct content length header on the request or to transfer it as a chunk if not possible.
ContentTypePlugin
Allow to set the correct content type header on the request automatically only if it is not set.
CookiePlugin
Handle request cookies.
DecoderPlugin
Allow to decode response body with a chunk, deflate, compress or gzip encoding.
ErrorPlugin
Throw exception when the response of a request is not acceptable.
HeaderAppendPlugin
Append headers to the request.
HeaderDefaultsPlugin
Set header to default value if it does not exist.
HeaderRemovePlugin
Removes headers from the request.
HeaderSetPlugin
Set headers on the request.
HistoryPlugin
Record HTTP calls.
QueryDefaultsPlugin
Set query to default value if it does not exist.
RedirectPlugin
Follow redirections.
RequestMatcherPlugin
Apply a delegated plugin based on a request match.
RequestSeekableBodyPlugin
Allow body used in request to be always seekable.
ResponseSeekableBodyPlugin
Allow body used in response to be always seekable.
RetryPlugin
Retry the request if an exception is thrown.
PluginChain
PluginClient
The client managing plugins and providing a decorator around HTTP Clients.
PluginClientBuilder
Build an instance of a PluginClient with a dynamic list of plugins.
PluginClientFactory
Factory to create PluginClient instances. Using this factory instead of calling PluginClient constructor will enable the Symfony profiling without any configuration.
Client
PSR-18 and HTTPlug Async client based on lib-curl.
CurlPromise
Promise represents a response that may not be available yet, but will be resolved at some point in future. It acts like a proxy to the actual response.
MultiRunner
Simultaneous requests runner.
PromiseCore
Shared promises core.
ResponseBuilder
Extended response builder.
ClassDiscovery
Registry that based find results on class existence.
ClassInstantiationFailedException
Thrown when a class fails to instantiate.
DiscoveryFailedException
Thrown when all discovery strategies fails to find a resource.
NoCandidateFoundException
When we have used a strategy but no candidates provided by that strategy could be used.
NotFoundException
Thrown when a discovery does not find any matches.
PuliUnavailableException
Thrown when we can't use Puli for discovery.
StrategyUnavailableException
This exception is thrown when we cannot use a discovery strategy. This is *not* thrown when the discovery fails to find a class.
HttpAsyncClientDiscovery
Finds an HTTP Asynchronous Client.
HttpClientDiscovery
Finds an HTTP Client.
MessageFactoryDiscovery
Finds a Message Factory.
NotFoundException
Thrown when a discovery does not find any matches.
Psr17Factory
A generic PSR-17 implementation.
Psr17FactoryDiscovery
Finds PSR-17 factories.
Psr18Client
A generic PSR-18 and PSR-17 implementation.
Psr18ClientDiscovery
Finds a PSR-18 HTTP Client.
MockClientStrategy
Find the Mock client.
StreamFactoryDiscovery
Finds a Stream Factory.
UriFactoryDiscovery
Finds a URI Factory.
HttpException
Thrown when a response was received but the request itself failed.
NetworkException
Thrown when the request cannot be completed because of network issues.
RequestException
Exception for when a request failed, providing access to the failed request.
TransferException
Base exception for transfer related exceptions.
HttpFulfilledPromise
HttpRejectedPromise
AutoBasicAuth
Authenticate a PSR-7 Request using Basic Auth based on credentials in the URI.
BasicAuth
Authenticate a PSR-7 Request using Basic Auth.
Bearer
Authenticate a PSR-7 Request using a token.
Chain
Authenticate a PSR-7 Request with a multiple authentication methods.
Header
Matching
Authenticate a PSR-7 Request if the request is matching.
QueryParam
Authenticate a PSR-7 Request by adding parameters to its query.
RequestConditional
Authenticate a PSR-7 Request if the request is matching the given request matcher.
Wsse
Authenticate a PSR-7 Request using WSSE.
ResponseBuilder
Fills response object with values.
Cookie
Cookie Value Object.
CookieJar
Cookie Jar holds a set of Cookies.
CookieUtil
ChunkStream
Transform a regular stream into a chunked one.
CompressStream
Stream compress (RFC 1950).
DechunkStream
Decorate a stream which is chunked.
DecompressStream
Stream decompress (RFC 1950).
DeflateStream
Stream deflate (RFC 1951).
Chunk
Userland implementation of the chunk stream filter.
FilteredStream
A filtered stream has a filter for filtering output and a filter for filtering input made to a underlying stream.
GzipDecodeStream
Stream for decoding from gzip format (RFC 1952).
GzipEncodeStream
Stream for encoding to gzip format (RFC 1952).
InflateStream
Stream inflate (RFC 1951).
UnexpectedValueException
CurlCommandFormatter
A formatter that prints a cURL command for HTTP requests.
FullHttpMessageFormatter
A formatter that prints the complete HTTP message.
SimpleFormatter
Normalize a request or a response into a string or an array.
DiactorosMessageFactory
Creates Diactoros messages.
GuzzleMessageFactory
Creates Guzzle messages.
SlimMessageFactory
Creates Slim 3 messages.
CallbackRequestMatcher
Match a request with a callback.
RegexRequestMatcher
Match a request with a regex on the uri.
RequestMatcher
A port of the Symfony RequestMatcher for PSR-7.
BufferedStream
Decorator to make any stream seekable.
DiactorosStreamFactory
Creates Diactoros streams.
GuzzleStreamFactory
Creates Guzzle streams.
SlimStreamFactory
Creates Slim 3 streams.
DiactorosUriFactory
Creates Diactoros URI.
GuzzleUriFactory
Creates Guzzle URI.
SlimUriFactory
Creates Slim 3 URI.
FulfilledPromise
A promise already fulfilled.
RejectedPromise
A rejected promise.
AbstractLogger
This is a simple Logger implementation that other Loggers can inherit from.
InvalidArgumentException
LogLevel
Describes log levels.
NullLogger
This Logger can be used to avoid conditional log calls.
Autoload
Config
Stores the configuration used to run PHPCS and PHPCBF.
DeepExitException
RuntimeException
TokenizerException
DummyFile
File
FileList
LocalFile
ExactMatch
Filter
GitModified
GitStaged
Fixer
Generator
HTML
Markdown
Text
Reporter
Cbf
Checkstyle
Code
Csv
Diff
Emacs
Full
Gitblame
Hgblame
Info
Json
Junit
Notifysend
Performance
Source
Summary
Svnblame
VersionControl
Xml
Ruleset
Runner
AbstractArraySniff
AbstractPatternSniff
AbstractScopeSniff
AbstractVariableSniff
ArrayIndentSniff
DisallowLongArraySyntaxSniff
DisallowShortArraySyntaxSniff
DuplicateClassNameSniff
OpeningBraceSameLineSniff
AssignmentInConditionSniff
EmptyPHPStatementSniff
EmptyStatementSniff
ForLoopShouldBeWhileLoopSniff
ForLoopWithTestFunctionCallSniff
JumbledIncrementerSniff
RequireExplicitBooleanOperatorPrecedenceSniff
UnconditionalIfStatementSniff
UnnecessaryFinalModifierSniff
UnusedFunctionParameterSniff
UselessOverridingMethodSniff
DocCommentSniff
FixmeSniff
TodoSniff
DisallowYodaConditionsSniff
InlineControlStructureSniff
ClosureLinterSniff
CSSLintSniff
ESLintSniff
JSHintSniff
ByteOrderMarkSniff
EndFileNewlineSniff
EndFileNoNewlineSniff
ExecutableFileSniff
InlineHTMLSniff
LineEndingsSniff
LineLengthSniff
LowercasedFilenameSniff
OneClassPerFileSniff
OneInterfacePerFileSniff
OneObjectStructurePerFileSniff
OneTraitPerFileSniff
DisallowMultipleStatementsSniff
MultipleStatementAlignmentSniff
NoSpaceAfterCastSniff
SpaceAfterCastSniff
SpaceAfterNotSniff
SpaceBeforeCastSniff
CallTimePassByReferenceSniff
FunctionCallArgumentSpacingSniff
OpeningFunctionBraceBsdAllmanSniff
OpeningFunctionBraceKernighanRitchieSniff
CyclomaticComplexitySniff
NestingLevelSniff
AbstractClassNamePrefixSniff
CamelCapsFunctionNameSniff
ConstructorNameSniff
InterfaceNameSuffixSniff
TraitNameSuffixSniff
UpperCaseConstantNameSniff
BacktickOperatorSniff
CharacterBeforePHPOpeningTagSniff
ClosingPHPTagSniff
DeprecatedFunctionsSniff
DisallowAlternativePHPTagsSniff
DisallowRequestSuperglobalSniff
DisallowShortOpenTagSniff
DiscourageGotoSniff
ForbiddenFunctionsSniff
LowerCaseConstantSniff
LowerCaseKeywordSniff
LowerCaseTypeSniff
NoSilencedErrorsSniff
RequireStrictTypesSniff
SAPIUsageSniff
SyntaxSniff
UpperCaseConstantSniff
UnnecessaryStringConcatSniff
GitMergeConflictSniff
SubversionPropertiesSniff
ArbitraryParenthesesSpacingSniff
DisallowSpaceIndentSniff
DisallowTabIndentSniff
IncrementDecrementSpacingSniff
LanguageConstructSpacingSniff
ScopeIndentSniff
SpreadOperatorSpacingAfterSniff
ArrayIndentUnitTest
Unit test class for the ArrayIndent sniff.
DisallowLongArraySyntaxUnitTest
Unit test class for the DisallowLongArraySyntax sniff.
DisallowShortArraySyntaxUnitTest
Unit test class for the DisallowShortArraySyntax sniff.
DuplicateClassNameUnitTest
Unit test class for the DuplicateClassName sniff.
OpeningBraceSameLineUnitTest
Unit test class for the OpeningBraceSameLine sniff.
AssignmentInConditionUnitTest
Unit test class for the AssignmentInCondition sniff.
EmptyPHPStatementUnitTest
Unit test class for the EmptyPHPStatement sniff.
EmptyStatementUnitTest
Unit test class for the EmptyStatement sniff.
ForLoopShouldBeWhileLoopUnitTest
Unit test class for the ForLoopShouldBeWhileLoop sniff.
ForLoopWithTestFunctionCallUnitTest
Unit test class for the ForLoopWithTestFunctionCall sniff.
JumbledIncrementerUnitTest
Unit test class for the JumbledIncrementer sniff.
RequireExplicitBooleanOperatorPrecedenceUnitTest
Unit test class for the RequireExplicitBooleanOperatorPrecedence sniff.
UnconditionalIfStatementUnitTest
Unit test class for the UnconditionalIfStatement sniff.
UnnecessaryFinalModifierUnitTest
Unit test class for the UnnecessaryFinalModifier sniff.
UnusedFunctionParameterUnitTest
Unit test class for the UnusedFunctionParameter sniff.
UselessOverridingMethodUnitTest
Unit test class for the UselessOverridingMethod sniff.
DocCommentUnitTest
Unit test class for the DocCommentSniff sniff.
FixmeUnitTest
Unit test class for the Fixme sniff.
TodoUnitTest
Unit test class for the Todo sniff.
DisallowYodaConditionsUnitTest
Unit test class for the DisallowYodaConditions sniff.
InlineControlStructureUnitTest
Unit test class for the InlineControlStructure sniff.
ClosureLinterUnitTest
Unit test class for the ClosureLinter sniff.
CSSLintUnitTest
Unit test class for the CSSLint sniff.
ESLintUnitTest
Unit test class for the ESLint sniff.
JSHintUnitTest
Unit test class for the JSHint sniff.
ByteOrderMarkUnitTest
Unit test class for the ByteOrderMark sniff.
EndFileNewlineUnitTest
Unit test class for the EndFileNewline sniff.
EndFileNoNewlineUnitTest
Unit test class for the EndFileNoNewline sniff.
ExecutableFileUnitTest
Unit test class for the ExecutableFile sniff.
InlineHTMLUnitTest
Unit test class for the InlineHTML sniff.
LineEndingsUnitTest
Unit test class for the LineEndings sniff.
LineLengthUnitTest
Unit test class for the LineLength sniff.
LowercasedFilenameUnitTest
Unit test class for the LowercasedFilename sniff.
OneClassPerFileUnitTest
Unit test class for the OneClassPerFile sniff.
OneInterfacePerFileUnitTest
Unit test class for the OneInterfacePerFile sniff.
OneObjectStructurePerFileUnitTest
Unit test class for the OneInterfacePerFile sniff.
OneTraitPerFileUnitTest
Unit test class for the OneTraitPerFile sniff.
DisallowMultipleStatementsUnitTest
Unit test class for the DisallowMultipleStatements sniff.
MultipleStatementAlignmentUnitTest
Unit test class for the MultipleStatementAlignment sniff.
NoSpaceAfterCastUnitTest
Unit test class for the NoSpaceAfterCast sniff.
SpaceAfterCastUnitTest
Unit test class for the SpaceAfterCast sniff.
SpaceAfterNotUnitTest
Unit test class for the SpaceAfterNot sniff.
SpaceBeforeCastUnitTest
Unit test class for the SpaceBeforeCast sniff.
CallTimePassByReferenceUnitTest
Unit test class for the CallTimePassByReference sniff.
FunctionCallArgumentSpacingUnitTest
Unit test class for the FunctionCallArgumentSpacing sniff.
OpeningFunctionBraceBsdAllmanUnitTest
Unit test class for the OpeningFunctionBraceBsdAllman sniff.
OpeningFunctionBraceKernighanRitchieUnitTest
Unit test class for the OpeningFunctionBraceKernighanRitchie sniff.
CyclomaticComplexityUnitTest
Unit test class for the CyclomaticComplexity sniff.
NestingLevelUnitTest
Unit test class for the NestingLevel sniff.
AbstractClassNamePrefixUnitTest
Unit test class for the AbstractClassNamePrefix sniff.
CamelCapsFunctionNameUnitTest
Unit test class for the CamelCapsFunctionName sniff.
ConstructorNameUnitTest
Unit test class for the ConstructorName sniff.
InterfaceNameSuffixUnitTest
Unit test class for the InterfaceNameSuffix sniff.
TraitNameSuffixUnitTest
Unit test class for the TraitNameSuffix sniff.
UpperCaseConstantNameUnitTest
Unit test class for the ValidConstantName sniff.
BacktickOperatorUnitTest
Unit test class for the BacktickOperator sniff.
CharacterBeforePHPOpeningTagUnitTest
Unit test class for the CharacterBeforePHPOpeningTag sniff.
ClosingPHPTagUnitTest
Unit test class for the ClosingPHPTag sniff.
DeprecatedFunctionsUnitTest
Unit test class for the DeprecatedFunctions sniff.
DisallowAlternativePHPTagsUnitTest
Unit test class for the DisallowAlternativePHPTags sniff.
DisallowRequestSuperglobalUnitTest
Unit test class for the DisallowRequestSuperglobal sniff.
DisallowShortOpenTagUnitTest
Unit test class for the DisallowShortOpenTag sniff.
DiscourageGotoUnitTest
Unit test class for the DiscourageGoto sniff.
ForbiddenFunctionsUnitTest
Unit test class for the ForbiddenFunctions sniff.
LowerCaseConstantUnitTest
Unit test class for the LowerCaseConstant sniff.
LowerCaseKeywordUnitTest
Unit test class for the LowerCaseKeyword sniff.
LowerCaseTypeUnitTest
Unit test class for the LowerCaseType sniff.
NoSilencedErrorsUnitTest
Unit test class for the NoSilencedErrors sniff.
RequireStrictTypesUnitTest
Unit test class for the RequireStrictType sniff.
SAPIUsageUnitTest
Unit test class for the SAPIUsage sniff.
SyntaxUnitTest
Unit test class for the Syntax sniff.
UpperCaseConstantUnitTest
Unit test class for the UpperCaseConstant sniff.
UnnecessaryStringConcatUnitTest
Unit test class for the UnnecessaryStringConcat sniff.
GitMergeConflictUnitTest
Unit test class for the GitMergeConflict sniff.
SubversionPropertiesUnitTest
Unit test class for the SubversionProperties sniff.
ArbitraryParenthesesSpacingUnitTest
Unit test class for the ArbitraryParenthesesSpacing sniff.
DisallowSpaceIndentUnitTest
Unit test class for the DisallowSpaceIndent sniff.
DisallowTabIndentUnitTest
Unit test class for the DisallowTabIndent sniff.
IncrementDecrementSpacingUnitTest
Unit test class for the IncrementDecrementSpacing sniff.
LanguageConstructSpacingUnitTest
Unit test class for the LanguageConstructSpacing sniff.
ScopeIndentUnitTest
Unit test class for the ScopeIndent sniff.
SpreadOperatorSpacingAfterUnitTest
Unit test class for the SpreadOperatorSpacingAfter sniff.
DisallowSelfActionsSniff
IncludeOwnSystemSniff
IncludeSystemSniff
UnusedSystemSniff
FunctionCommentSniff
BrowserSpecificStylesSniff
DebugCodeSniff
FirebugConsoleSniff
AssignThisSniff
CreateWidgetTypeCallbackSniff
DisallowNewWidgetSniff
AjaxNullComparisonSniff
EvalObjectFactorySniff
GetRequestDataSniff
ReturnFunctionValueSniff
JoinStringsSniff
DisallowSelfActionsUnitTest
Unit test class for the DisallowSelfActions sniff.
IncludeSystemUnitTest
Unit test class for the IncludeSystem sniff.
UnusedSystemUnitTest
Unit test class for the UnusedSystem sniff.
FunctionCommentUnitTest
Unit test class for the FunctionComment sniff.
BrowserSpecificStylesUnitTest
Unit test class for the BrowserSpecificStyles sniff.
DebugCodeUnitTest
Unit test class for the DebugCode sniff.
FirebugConsoleUnitTest
Unit test class for the FirebugConsole sniff.
AssignThisUnitTest
Unit test class for the AssignThis sniff.
CreateWidgetTypeCallbackUnitTest
Unit test class for the CreateWidgetTypeCallback sniff.
DisallowNewWidgetUnitTest
Unit test class for the DisallowNewWidget sniff.
AjaxNullComparisonUnitTest
Unit test class for the AjaxNullComparison sniff.
EvalObjectFactoryUnitTest
Unit test class for the EvalObjectFactory sniff.
GetRequestDataUnitTest
Unit test class for the GetRequestData sniff.
ReturnFunctionValueUnitTest
Unit test class for the ReturnFunctionValue sniff.
JoinStringsUnitTest
Unit test class for the JoinStrings sniff.
ClassDeclarationSniff
ClassCommentSniff
FileCommentSniff
FunctionCommentSniff
InlineCommentSniff
ControlSignatureSniff
MultiLineConditionSniff
IncludingFileSniff
MultiLineAssignmentSniff
FunctionCallSignatureSniff
FunctionDeclarationSniff
ValidDefaultValueSniff
ValidClassNameSniff
ValidFunctionNameSniff
ValidVariableNameSniff
ObjectOperatorIndentSniff
ScopeClosingBraceSniff
ScopeIndentSniff
ClassDeclarationUnitTest
Unit test class for the ClassDeclaration sniff.
ClassCommentUnitTest
Unit test class for the ClassComment sniff.
FileCommentUnitTest
Unit test class for the FileComment sniff.
FunctionCommentUnitTest
Unit test class for the FunctionComment sniff.
InlineCommentUnitTest
Unit test class for the InlineComment sniff.
ControlSignatureUnitTest
Unit test class for the ControlSignature sniff.
MultiLineConditionUnitTest
Unit test class for the MultiLineCondition sniff.
IncludingFileUnitTest
Unit test class for the IncludingFile sniff.
MultiLineAssignmentUnitTest
Unit test class for the MultiLineAssignment sniff.
FunctionCallSignatureUnitTest
Unit test class for the FunctionCallSignature sniff.
FunctionDeclarationUnitTest
Unit test class for the FunctionDeclaration sniff.
ValidDefaultValueUnitTest
Unit test class for the ValidDefaultValue sniff.
ValidClassNameUnitTest
Unit test class for the ValidClassName sniff.
ValidFunctionNameUnitTest
Unit test class for the ValidFunctionName sniff.
ValidVariableNameUnitTest
Unit test class for the ValidVariableName sniff.
ObjectOperatorIndentUnitTest
Unit test class for the ObjectOperatorIndent sniff.
ScopeClosingBraceUnitTest
Unit test class for the ScopeClosingBrace sniff.
ScopeIndentUnitTest
Unit test class for the ScopeIndent sniff.
ClassDeclarationSniff
SideEffectsSniff
CamelCapsMethodNameSniff
ClassDeclarationUnitTest
Unit test class for the ClassDeclaration sniff.
SideEffectsUnitTest
Unit test class for the SideEffects sniff.
CamelCapsMethodNameUnitTest
Unit test class for the CamelCapsMethodName sniff.
AnonClassDeclarationSniff
ClassInstantiationSniff
ClosingBraceSniff
OpeningBraceSpaceSniff
BooleanOperatorPlacementSniff
ControlStructureSpacingSniff
DeclareStatementSniff
FileHeaderSniff
ImportStatementSniff
OpenTagSniff
NullableTypeDeclarationSniff
ReturnTypeDeclarationSniff
ShortFormTypeKeywordsSniff
CompoundNamespaceDepthSniff
OperatorSpacingSniff
ConstantVisibilitySniff
UseDeclarationSniff
AnonClassDeclarationUnitTest
Unit test class for the AnonClassDeclaration sniff.
ClassInstantiationUnitTest
Unit test class for the ClassInstantiation sniff.
ClosingBraceUnitTest
Unit test class for the ClosingBrace sniff.
OpeningBraceSpaceUnitTest
Unit test class for the OpeningBraceSpace sniff.
BooleanOperatorPlacementUnitTest
Unit test class for the BooleanOperatorPlacement sniff.
ControlStructureSpacingUnitTest
Unit test class for the ControlStructureSpacing sniff.
DeclareStatementUnitTest
Unit test class for the DeclareStatement sniff.
FileHeaderUnitTest
Unit test class for the FileHeader sniff.
ImportStatementUnitTest
Unit test class for the ImportStatement sniff.
OpenTagUnitTest
Unit test class for the OpenTag sniff.
NullableTypeDeclarationUnitTest
Unit test class for the NullableWhitespace sniff.
ReturnTypeDeclarationUnitTest
Unit test class for the ReturnTypeDeclaration sniff.
ShortFormTypeKeywordsUnitTest
Unit test class for the ShortFormTypeKeywords sniff.
CompoundNamespaceDepthUnitTest
Unit test class for the CompoundNamespaceDepth sniff.
OperatorSpacingUnitTest
Unit test class for the OperatorSpacing sniff.
ConstantVisibilityUnitTest
Unit test class for the ConstantVisibility sniff.
UseDeclarationUnitTest
Unit test class for the UseDeclaration sniff.
ClassDeclarationSniff
PropertyDeclarationSniff
ControlStructureSpacingSniff
ElseIfDeclarationSniff
SwitchDeclarationSniff
ClosingTagSniff
EndFileNewlineSniff
FunctionCallSignatureSniff
FunctionClosingBraceSniff
MethodDeclarationSniff
NamespaceDeclarationSniff
UseDeclarationSniff
ClassDeclarationUnitTest
Unit test class for the ClassDeclaration sniff.
PropertyDeclarationUnitTest
Unit test class for the PropertyDeclaration sniff.
ControlStructureSpacingUnitTest
Unit test class for the FunctionSpacing sniff.
ElseIfDeclarationUnitTest
Unit test class for the ElseIfDeclaration sniff.
SwitchDeclarationUnitTest
Unit test class for the SwitchDeclaration sniff.
ClosingTagUnitTest
Unit test class for the ClosingTag sniff.
EndFileNewlineUnitTest
Unit test class for the EndFileNewline sniff.
FunctionCallSignatureUnitTest
Unit test class for the FunctionCallSignature sniff.
FunctionClosingBraceUnitTest
Unit test class for the FunctionClosingBrace sniff.
MethodDeclarationUnitTest
Unit test class for the MethodDeclaration sniff.
NamespaceDeclarationUnitTest
Unit test class for the NamespaceDeclaration sniff.
UseDeclarationUnitTest
Unit test class for the UseDeclaration sniff.
ArrayBracketSpacingSniff
ArrayDeclarationSniff
ClassDeclarationSniff
ClassFileNameSniff
DuplicatePropertySniff
LowercaseClassKeywordsSniff
SelfMemberReferenceSniff
ValidClassNameSniff
BlockCommentSniff
ClassCommentSniff
ClosingDeclarationCommentSniff
DocCommentAlignmentSniff
EmptyCatchCommentSniff
FileCommentSniff
FunctionCommentSniff
FunctionCommentThrowTagSniff
InlineCommentSniff
LongConditionClosingCommentSniff
PostStatementCommentSniff
VariableCommentSniff
ControlSignatureSniff
ElseIfDeclarationSniff
ForEachLoopDeclarationSniff
ForLoopDeclarationSniff
InlineIfDeclarationSniff
LowercaseDeclarationSniff
SwitchDeclarationSniff
ClassDefinitionClosingBraceSpaceSniff
ClassDefinitionNameSpacingSniff
ClassDefinitionOpeningBraceSpaceSniff
ColonSpacingSniff
ColourDefinitionSniff
DisallowMultipleStyleDefinitionsSniff
DuplicateClassDefinitionSniff
DuplicateStyleDefinitionSniff
EmptyClassDefinitionSniff
EmptyStyleDefinitionSniff
ForbiddenStylesSniff
IndentationSniff
LowercaseStyleDefinitionSniff
MissingColonSniff
NamedColoursSniff
OpacitySniff
SemicolonSpacingSniff
ShorthandSizeSniff
JavaScriptLintSniff
JSLintSniff
FileExtensionSniff
OperatorBracketSniff
FunctionDeclarationArgumentSpacingSniff
FunctionDeclarationSniff
FunctionDuplicateArgumentSniff
GlobalFunctionSniff
LowercaseFunctionKeywordsSniff
MultiLineFunctionDeclarationSniff
ValidFunctionNameSniff
ValidVariableNameSniff
DisallowObjectStringIndexSniff
ObjectInstantiationSniff
ObjectMemberCommaSniff
ComparisonOperatorUsageSniff
IncrementDecrementUsageSniff
ValidLogicalOperatorsSniff
CommentedOutCodeSniff
DisallowBooleanStatementSniff
DisallowComparisonAssignmentSniff
DisallowInlineIfSniff
DisallowMultipleAssignmentsSniff
DisallowSizeFunctionsInLoopsSniff
DiscouragedFunctionsSniff
EmbeddedPhpSniff
EvalSniff
GlobalKeywordSniff
HeredocSniff
InnerFunctionsSniff
LowercasePHPFunctionsSniff
NonExecutableCodeSniff
MemberVarScopeSniff
MethodScopeSniff
StaticThisUsageSniff
ConcatenationSpacingSniff
DoubleQuoteUsageSniff
EchoedStringsSniff
CastSpacingSniff
ControlStructureSpacingSniff
FunctionClosingBraceSpaceSniff
FunctionOpeningBraceSpaceSniff
FunctionSpacingSniff
LanguageConstructSpacingSniff
LogicalOperatorSpacingSniff
MemberVarSpacingSniff
ObjectOperatorSpacingSniff
OperatorSpacingSniff
PropertyLabelSpacingSniff
ScopeClosingBraceSniff
ScopeKeywordSpacingSniff
SemicolonSpacingSniff
SuperfluousWhitespaceSniff
ArrayBracketSpacingUnitTest
Unit test class for the ArrayBracketSpacing sniff.
ArrayDeclarationUnitTest
Unit test class for the ArrayDeclaration sniff.
ClassDeclarationUnitTest
Unit test class for the ClassDeclaration sniff.
ClassFileNameUnitTest
Unit test class for the ClassFileName sniff.
DuplicatePropertyUnitTest
Unit test class for the DuplicateProperty sniff.
LowercaseClassKeywordsUnitTest
Unit test class for the LowercaseClassKeywords sniff.
SelfMemberReferenceUnitTest
Unit test class for the SelfMemberReference sniff.
ValidClassNameUnitTest
Unit test class for the ValidClassName sniff.
BlockCommentUnitTest
Unit test class for the BlockComment sniff.
ClassCommentUnitTest
Unit test class for the ClassComment sniff.
ClosingDeclarationCommentUnitTest
Unit test class for the ClosingDeclarationComment sniff.
DocCommentAlignmentUnitTest
Unit test class for the DocCommentAlignment sniff.
EmptyCatchCommentUnitTest
Unit test class for the EmptyCatchComment sniff.
FileCommentUnitTest
Unit test class for the FileComment sniff.
FunctionCommentThrowTagUnitTest
Unit test class for the FunctionCommentThrowTag sniff.
FunctionCommentUnitTest
Unit test class for the FunctionComment sniff.
InlineCommentUnitTest
Unit test class for the InlineComment sniff.
LongConditionClosingCommentUnitTest
Unit test class for the LongConditionClosingComment sniff.
PostStatementCommentUnitTest
Unit test class for the PostStatementComment sniff.
VariableCommentUnitTest
Unit test class for the VariableComment sniff.
ControlSignatureUnitTest
Unit test class for the ControlSignature sniff.
ElseIfDeclarationUnitTest
Unit test class for the ElseIfDeclaration sniff.
ForEachLoopDeclarationUnitTest
Unit test class for the ForEachLoopDeclaration sniff.
ForLoopDeclarationUnitTest
Unit test class for the ForLoopDeclaration sniff.
InlineIfDeclarationUnitTest
Unit test class for the InlineIfDeclaration sniff.
LowercaseDeclarationUnitTest
Unit test class for the LowercaseDeclaration sniff.
SwitchDeclarationUnitTest
Unit test class for the SwitchDeclaration sniff.
ClassDefinitionClosingBraceSpaceUnitTest
Unit test class for the ClassDefinitionClosingBraceSpace sniff.
ClassDefinitionNameSpacingUnitTest
Unit test class for the ClassDefinitionNameSpacing sniff.
ClassDefinitionOpeningBraceSpaceUnitTest
Unit test class for the ClassDefinitionOpeningBraceSpace sniff.
ColonSpacingUnitTest
Unit test class for the ColonSpacing sniff.
ColourDefinitionUnitTest
Unit test class for the ColourDefinition sniff.
DisallowMultipleStyleDefinitionsUnitTest
Unit test class for the DisallowMultipleStyleDefinitions sniff.
DuplicateClassDefinitionUnitTest
Unit test class for the DuplicateClassDefinition sniff.
DuplicateStyleDefinitionUnitTest
Unit test class for the DuplicateStyleDefinition sniff.
EmptyClassDefinitionUnitTest
Unit test class for the EmptyClassDefinition sniff.
EmptyStyleDefinitionUnitTest
Unit test class for the EmptyStyleDefinition sniff.
ForbiddenStylesUnitTest
Unit test class for the ForbiddenStyles sniff.
IndentationUnitTest
Unit test class for the Indentation sniff.
LowercaseStyleDefinitionUnitTest
Unit test class for the LowercaseStyleDefinition sniff.
MissingColonUnitTest
Unit test class for the MissingColon sniff.
NamedColoursUnitTest
Unit test class for the NamedColours sniff.
OpacityUnitTest
Unit test class for the Opacity sniff.
SemicolonSpacingUnitTest
Unit test class for the SemicolonSpacing sniff.
ShorthandSizeUnitTest
Unit test class for the ShorthandSize sniff.
JavaScriptLintUnitTest
Unit test class for the JavaScriptLint sniff.
JSLintUnitTest
Unit test class for the JSLint sniff.
FileExtensionUnitTest
Unit test class for the FileExtension sniff.
OperatorBracketUnitTest
Unit test class for the OperatorBracket sniff.
FunctionDeclarationArgumentSpacingUnitTest
Unit test class for the FunctionDeclarationArgumentSpacing sniff.
FunctionDeclarationUnitTest
Unit test class for the FunctionDeclaration sniff.
FunctionDuplicateArgumentUnitTest
Unit test class for the FunctionDuplicateArgument sniff.
GlobalFunctionUnitTest
Unit test class for the GlobalFunction sniff.
LowercaseFunctionKeywordsUnitTest
Unit test class for the LowercaseFunctionKeywords sniff.
MultiLineFunctionDeclarationUnitTest
Unit test class for the MultiLineFunctionDeclaration sniff.
ValidFunctionNameUnitTest
Unit test class for the ValidFunctionName sniff.
ValidVariableNameUnitTest
Unit test class for the ValidVariableName sniff.
DisallowObjectStringIndexUnitTest
Unit test class for the DisallowObjectStringIndex sniff.
ObjectInstantiationUnitTest
Unit test class for the ObjectInstantiation sniff.
ObjectMemberCommaUnitTest
Unit test class for the ObjectMemberComma sniff.
ComparisonOperatorUsageUnitTest
Unit test class for the ComparisonOperatorUsage sniff.
IncrementDecrementUsageUnitTest
Unit test class for the IncrementDecrementUsage sniff.
ValidLogicalOperatorsUnitTest
Unit test class for the ValidLogicalOperators sniff.
CommentedOutCodeUnitTest
Unit test class for the CommentedOutCode sniff.
DisallowBooleanStatementUnitTest
Unit test class for the DisallowBooleanStatement sniff.
DisallowComparisonAssignmentUnitTest
Unit test class for the DisallowComparisonAssignment sniff.
DisallowInlineIfUnitTest
Unit test class for the DisallowObEndFlush sniff.
DisallowMultipleAssignmentsUnitTest
Unit test class for the DisallowMultipleAssignments sniff.
DisallowSizeFunctionsInLoopsUnitTest
Unit test class for the DisallowSizeFunctionsInLoops sniff.
DiscouragedFunctionsUnitTest
Unit test class for the DiscouragedFunctions sniff.
EmbeddedPhpUnitTest
Unit test class for the EmbeddedPhp sniff.
EvalUnitTest
Unit test class for the Eval sniff.
GlobalKeywordUnitTest
Unit test class for the GlobalKeyword sniff.
HeredocUnitTest
Unit test class for the Heredoc sniff.
InnerFunctionsUnitTest
Unit test class for the InnerFunctions sniff.
LowercasePHPFunctionsUnitTest
Unit test class for the LowercasePHPFunctions sniff.
NonExecutableCodeUnitTest
Unit test class for the NonExecutableCode sniff.
MemberVarScopeUnitTest
Unit test class for the MemberVarScope sniff.
MethodScopeUnitTest
Unit test class for the MethodScope sniff.
StaticThisUsageUnitTest
Unit test class for the StaticThisUsage sniff.
ConcatenationSpacingUnitTest
Unit test class for the ConcatenationSpacing sniff.
DoubleQuoteUsageUnitTest
Unit test class for the DoubleQuoteUsage sniff.
EchoedStringsUnitTest
Unit test class for the EchoedStrings sniff.
CastSpacingUnitTest
Unit test class for the CastSpacing sniff.
ControlStructureSpacingUnitTest
Unit test class for the ControlStructureSpacing sniff.
FunctionClosingBraceSpaceUnitTest
Unit test class for the FunctionClosingBraceSpace sniff.
FunctionOpeningBraceSpaceUnitTest
Unit test class for the FunctionOpeningBraceSpace sniff.
FunctionSpacingUnitTest
Unit test class for the FunctionSpacing sniff.
LanguageConstructSpacingUnitTest
Unit test class for the LanguageConstructSpacing sniff.
LogicalOperatorSpacingUnitTest
Unit test class for the LogicalOperatorSpacing sniff.
MemberVarSpacingUnitTest
Unit test class for the MemberVarSpacing sniff.
ObjectOperatorSpacingUnitTest
Unit test class for the ObjectOperatorSpacing sniff.
OperatorSpacingUnitTest
Unit test class for the OperatorSpacing sniff.
PropertyLabelSpacingUnitTest
Unit test class for the PropertyLabel sniff.
ScopeClosingBraceUnitTest
Unit test class for the ScopeClosingBrace sniff.
ScopeKeywordSpacingUnitTest
Unit test class for the ScopeKeywordSpacing sniff.
SemicolonSpacingUnitTest
Unit test class for the SemicolonSpacing sniff.
SuperfluousWhitespaceUnitTest
Unit test class for the SuperfluousWhitespace sniff.
CodeAnalyzerSniff
ClosingTagSniff
ValidVariableNameSniff
CodeAnalyzerUnitTest
Unit test class for the CodeAnalyzer sniff.
ClosingTagUnitTest
Unit test class for the ClosingTag sniff.
ValidVariableNameUnitTest
Unit test class for the ValidVariableName sniff.
Comment
CSS
JS
PHP
Tokenizer
Cache
Common
Standards
Timing
Tokens
PHP_CodeSniffer_AllTests
ConfigDouble
Stores the configuration used to run PHPCS and PHPCBF.
AbstractMethodUnitTest
AllTests
DetermineLoadedClassTest
Tests for the \PHP_CodeSniffer\Autoload::determineLoadedClass method.
ReportWidthTest
Tests for the \PHP_CodeSniffer\Config reportWidth value.
SniffsExcludeArgsTest
Tests for the \PHP_CodeSniffer\Config --sniffs and --exclude arguments.
ErrorSuppressionTest
Tests for PHP_CodeSniffer error suppression tags.
FindEndOfStatementTest
Tests for the \PHP_CodeSniffer\Files\File::findEndOfStatement method.
FindExtendedClassNameTest
Tests for the \PHP_CodeSniffer\Files\File::findExtendedClassName method.
FindImplementedInterfaceNamesTest
Tests for the \PHP_CodeSniffer\Files\File::findImplementedInterfaceNames method.
FindStartOfStatementTest
Tests for the \PHP_CodeSniffer\Files\File:findStartOfStatement method.
GetClassPropertiesTest
Tests for the \PHP_CodeSniffer\Files\File:getClassProperties method.
GetConditionTest
Tests for the \PHP_CodeSniffer\Files\File:getCondition and \PHP_CodeSniffer\Files\File:hasCondition methods.
GetDeclarationNameJSTest
Tests for the \PHP_CodeSniffer\Files\File:getDeclarationName method.
GetDeclarationNameTest
Tests for the \PHP_CodeSniffer\Files\File:getDeclarationName method.
GetMemberPropertiesTest
Tests for the \PHP_CodeSniffer\Files\File::getMemberProperties method.
GetMethodParametersParseError1Test
Tests for the \PHP_CodeSniffer\Files\File::getMethodParameters method.
GetMethodParametersParseError2Test
Tests for the \PHP_CodeSniffer\Files\File::getMethodParameters method.
GetMethodParametersTest
Tests for the \PHP_CodeSniffer\Files\File::getMethodParameters method.
GetMethodPropertiesTest
Tests for the \PHP_CodeSniffer\Files\File::getMethodProperties method.
GetTokensAsStringTest
Tests for the \PHP_CodeSniffer\Files\File:getTokensAsString method.
IsReferenceTest
Tests for the \PHP_CodeSniffer\Files\File::isReference method.
AbstractFilterTestCase
Base functionality and utilities for testing Filter classes.
AcceptTest
Tests for the \PHP_CodeSniffer\Filters\Filter::accept method.
GitModifiedTest
Tests for the \PHP_CodeSniffer\Filters\GitModified class.
GitStagedTest
Tests for the \PHP_CodeSniffer\Filters\GitStaged class.
GenerateDiffTest
Tests for diff generation.
ExplainTest
Test the Ruleset::explain() function.
WithLongReplacementSniff
WithoutReplacementSniff
WithReplacementContainingLinuxNewlinesSniff
WithReplacementContainingNewlinesSniff
WithReplacementSniff
EmptyDeprecationVersionSniff
EmptyRemovalVersionSniff
InvalidDeprecationMessageSniff
InvalidDeprecationVersionSniff
InvalidRemovalVersionSniff
AllowedAsDeclaredSniff
AllowedViaMagicMethodSniff
AllowedViaStdClassSniff
NotAllowedViaAttributeSniff
RuleInclusionAbsoluteLinuxTest
Tests for the \PHP_CodeSniffer\Ruleset class using a Linux-style absolute path to include a sniff.
RuleInclusionAbsoluteWindowsTest
Tests for the \PHP_CodeSniffer\Ruleset class using a Windows-style absolute path to include a sniff.
RuleInclusionTest
Tests for the \PHP_CodeSniffer\Ruleset class.
SetSniffPropertyTest
These tests specifically focus on the changes made to work around the PHP 8.2 dynamic properties deprecation.
ShowSniffDeprecationsTest
Tests PHPCS native handling of sniff deprecations.
AbstractArraySniffTest
Tests for the \PHP_CodeSniffer\Sniffs\AbstractArraySniff.
AbstractArraySniffTestable
AbstractTokenizerTestCase
CommentTestCase
Base class for testing DocBlock comment tokenization.
LiveCoding1Test
Tests that unclosed docblocks during live coding are handled correctly.
LiveCoding2Test
Tests that unclosed docblocks during live coding are handled correctly.
LiveCoding3Test
Tests that unclosed docblocks during live coding are handled correctly.
LiveCoding4Test
Tests that unclosed docblocks during live coding are handled correctly.
MultiLineDocBlockTest
Tests that multiline docblocks are tokenized correctly.
PhpcsAnnotationsInDocBlockTest
Tests that PHPCS native annotations in docblocks are tokenized correctly.
SingleLineDocBlockTest
Tests that single line docblocks are tokenized correctly.
AnonClassParenthesisOwnerTest
ArrayKeywordTest
AttributesTest
BackfillEnumTest
BackfillExplicitOctalNotationTest
BackfillFnTokenTest
BackfillMatchTokenTest
BackfillNumericSeparatorTest
BackfillReadonlyTest
BitwiseOrTest
ContextSensitiveKeywordsTest
DefaultKeywordTest
DNFTypesParseError1Test
DNFTypesParseError2Test
DNFTypesTest
DoubleArrowTest
DoubleQuotedStringTest
EnumCaseTest
FinallyTest
GotoLabelTest
HeredocStringTest
NamedFunctionCallArgumentsTest
NullsafeObjectOperatorTest
OtherContextSensitiveKeywordsTest
Tests the conversion of PHPCS native context sensitive keyword tokens to T_STRING.
ResolveSimpleTokenTest
Tests that simple tokens are assigned the correct token type and code.
ShortArrayTest
StableCommentWhitespaceTest
StableCommentWhitespaceWinTest
TypedConstantsTest
TypeIntersectionTest
UndoNamespacedNameSingleTokenTest
CreateParenthesisNestingMapDNFTypesTest
CreateTokenMapArrayParenthesesTest
HeredocNowdocCloserTest
Heredoc/nowdoc closer token test.
RecurseScopeMapCaseKeywordConditionsTest
RecurseScopeMapDefaultKeywordConditionsTest
ScopeSettingWithNamespaceOperatorTest
IsCamelCapsTest
Tests for the \PHP_CodeSniffer\Util\Common::isCamelCaps method.
StripColorsTest
Tests for the \PHP_CodeSniffer\Util\Common::stripColors() method.
SuggestTypeTest
Tests for the \PHP_CodeSniffer\Util\Common::suggestType() method.
HelpTest
Test the Help class.
FileList
AbstractSniffUnitTest
AllSniffs
TestSuite
TestSuite
OptionsResolverIntrospector
AccessException
Thrown when trying to read an option outside of or write it inside of {@link \Symfony\Component\OptionsResolver\Options::resolve()}.
InvalidArgumentException
Thrown when an argument is invalid.
InvalidOptionsException
Thrown when the value of an option does not match its validation rules.
MissingOptionsException
Exception thrown when a required option is missing.
NoConfigurationException
Thrown when trying to introspect an option definition property for which no value was configured inside the OptionsResolver instance.
NoSuchOptionException
Thrown when trying to read an option that has no value set.
OptionDefinitionException
Thrown when two lazy options have a cyclic dependency.
UndefinedOptionsException
Exception thrown when an undefined option is passed.
OptionConfigurator
OptionsResolver
Validates options and merges them with default values.
Attribute
PhpToken
UnhandledMatchError
ValueError
Analytics
AnalyticsRule
AnalyticsRules
HTTPStatus0Error
Class HTTPStatus0Error

Traits

ClientTrait
Client interface for sending HTTP requests.
MessageTrait
Trait implementing functionality common to requests and responses.
StreamDecoratorTrait
Stream decorator trait
FormattableHandlerTrait
Helper trait for implementing FormattableInterface
ProcessableHandlerTrait
Helper trait for implementing ProcessableInterface
WebRequestRecognizerTrait
HttpAsyncClientDecorator
Decorates an HTTP Async Client.
HttpAsyncClientEmulator
Emulates an HTTP Async Client in an HTTP Client.
HttpClientDecorator
Decorates an HTTP Client.
HttpClientEmulator
Emulates an HTTP Client in an HTTP Async Client.
VersionBridgePlugin
A plugin that helps you migrate from php-http/client-common 1.x to 2.x. This will also help you to support PHP5 at the same time you support 2.x.
VersionBridgeClient
A client that helps you migrate from php-http/httplug 1.x to 2.x. This will also help you to support PHP5 at the same time you support 2.x.
RequestAwareTrait
MessageDecorator
RequestDecorator
ResponseDecorator
StreamDecorator
Decorates a stream.
LoggerAwareTrait
Basic Implementation of LoggerAwareInterface.
LoggerTrait
This is a simple Logger trait that classes unable to extend AbstractLogger (because they extend another class, etc) can include.

Enums

Level
Represents the log levels

Constants

FILTER_VALIDATE_BOOL  = \FILTER_VALIDATE_BOOLEAN
PHP_CODESNIFFER_CBF  = false
PHP_CODESNIFFER_CBF  = \false
PHP_CODESNIFFER_IN_TESTS  = \true
PHP_CODESNIFFER_VERBOSITY  = $this->config->verbosity
PHP_CODESNIFFER_VERBOSITY  = 0
T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG  = 'PHPCS_T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG'
T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG  = 'PHPCS_T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG'
T_ANON_CLASS  = 'PHPCS_T_ANON_CLASS'
T_ARRAY_HINT  = 'PHPCS_T_ARRAY_HINT'
T_ASPERAND  = 'PHPCS_T_ASPERAND'
T_ATTRIBUTE  = 'PHPCS_T_ATTRIBUTE'
T_ATTRIBUTE_END  = 'PHPCS_T_ATTRIBUTE_END'
T_BACKTICK  = 'PHPCS_T_BACKTICK'
T_BAD_CHARACTER  = 'PHPCS_T_BAD_CHARACTER'
T_BINARY_CAST  = 'PHPCS_T_BINARY_CAST'
T_BITWISE_AND  = 'PHPCS_T_BITWISE_AND'
T_BITWISE_NOT  = 'PHPCS_T_BITWISE_NOT'
T_BITWISE_OR  = 'PHPCS_T_BITWISE_OR'
T_BITWISE_XOR  = 'PHPCS_T_BITWISE_XOR'
T_BOOLEAN_NOT  = 'PHPCS_T_BOOLEAN_NOT'
T_CLOSE_CURLY_BRACKET  = 'PHPCS_T_CLOSE_CURLY_BRACKET'
T_CLOSE_OBJECT  = 'PHPCS_T_CLOSE_OBJECT'
T_CLOSE_PARENTHESIS  = 'PHPCS_T_CLOSE_PARENTHESIS'
T_CLOSE_SHORT_ARRAY  = 'PHPCS_T_CLOSE_SHORT_ARRAY'
T_CLOSE_SQUARE_BRACKET  = 'PHPCS_T_CLOSE_SQUARE_BRACKET'
T_CLOSE_USE_GROUP  = 'PHPCS_T_CLOSE_USE_GROUP'
T_CLOSURE  = 'PHPCS_T_CLOSURE'
T_COALESCE  = 'PHPCS_T_COALESCE'
T_COALESCE_EQUAL  = 'PHPCS_T_COALESCE_EQUAL'
T_COLON  = 'PHPCS_T_COLON'
T_COLOUR  = 'PHPCS_T_COLOUR'
T_COMMA  = 'PHPCS_T_COMMA'
T_DIVIDE  = 'PHPCS_T_DIVIDE'
T_DOC_COMMENT_CLOSE_TAG  = 'PHPCS_T_DOC_COMMENT_CLOSE_TAG'
T_DOC_COMMENT_OPEN_TAG  = 'PHPCS_T_DOC_COMMENT_OPEN_TAG'
T_DOC_COMMENT_STAR  = 'PHPCS_T_DOC_COMMENT_STAR'
T_DOC_COMMENT_STRING  = 'PHPCS_T_DOC_COMMENT_STRING'
T_DOC_COMMENT_TAG  = 'PHPCS_T_DOC_COMMENT_TAG'
T_DOC_COMMENT_WHITESPACE  = 'PHPCS_T_DOC_COMMENT_WHITESPACE'
T_DOLLAR  = 'PHPCS_T_DOLLAR'
T_DOUBLE_QUOTED_STRING  = 'PHPCS_T_DOUBLE_QUOTED_STRING'
T_ELLIPSIS  = 'PHPCS_T_ELLIPSIS'
T_EMBEDDED_PHP  = 'PHPCS_T_EMBEDDED_PHP'
T_END_NOWDOC  = 'PHPCS_T_END_NOWDOC'
T_ENUM  = 'PHPCS_T_ENUM'
T_ENUM_CASE  = 'PHPCS_T_ENUM_CASE'
T_EQUAL  = 'PHPCS_T_EQUAL'
T_FALSE  = 'PHPCS_T_FALSE'
T_FINALLY  = 'PHPCS_T_FINALLY'
T_FN  = 'PHPCS_T_FN'
T_FN_ARROW  = 'PHPCS_T_FN_ARROW'
T_GOTO_LABEL  = 'PHPCS_T_GOTO_LABEL'
T_GREATER_THAN  = 'PHPCS_T_GREATER_THAN'
T_HASH  = 'PHPCS_T_HASH'
T_HEREDOC  = 'PHPCS_T_HEREDOC'
T_INLINE_ELSE  = 'PHPCS_T_INLINE_ELSE'
T_INLINE_THEN  = 'PHPCS_T_INLINE_THEN'
T_LABEL  = 'PHPCS_T_LABEL'
T_LESS_THAN  = 'PHPCS_T_LESS_THAN'
T_MATCH  = 'PHPCS_T_MATCH'
T_MATCH_ARROW  = 'PHPCS_T_MATCH_ARROW'
T_MATCH_DEFAULT  = 'PHPCS_T_MATCH_DEFAULT'
T_MINUS  = 'PHPCS_T_MINUS'
T_MODULUS  = 'PHPCS_T_MODULUS'
T_MULTIPLY  = 'PHPCS_T_MULTIPLY'
T_NAME_FULLY_QUALIFIED  = 'PHPCS_T_NAME_FULLY_QUALIFIED'
T_NAME_QUALIFIED  = 'PHPCS_T_NAME_QUALIFIED'
T_NAME_RELATIVE  = 'PHPCS_T_NAME_RELATIVE'
T_NONE  = 'PHPCS_T_NONE'
T_NOWDOC  = 'PHPCS_T_NOWDOC'
T_NULL  = 'PHPCS_T_NULL'
T_NULLABLE  = 'PHPCS_T_NULLABLE'
T_NULLSAFE_OBJECT_OPERATOR  = 'PHPCS_T_NULLSAFE_OBJECT_OPERATOR'
T_OBJECT  = 'PHPCS_T_OBJECT'
T_OPEN_CURLY_BRACKET  = 'PHPCS_T_OPEN_CURLY_BRACKET'
T_OPEN_PARENTHESIS  = 'PHPCS_T_OPEN_PARENTHESIS'
T_OPEN_SHORT_ARRAY  = 'PHPCS_T_OPEN_SHORT_ARRAY'
T_OPEN_SQUARE_BRACKET  = 'PHPCS_T_OPEN_SQUARE_BRACKET'
T_OPEN_USE_GROUP  = 'PHPCS_T_OPEN_USE_GROUP'
T_PARAM_NAME  = 'PHPCS_T_PARAM_NAME'
T_PARENT  = 'PHPCS_T_PARENT'
T_PHPCS_DISABLE  = 'PHPCS_T_PHPCS_DISABLE'
T_PHPCS_ENABLE  = 'PHPCS_T_PHPCS_ENABLE'
T_PHPCS_IGNORE  = 'PHPCS_T_PHPCS_IGNORE'
T_PHPCS_IGNORE_FILE  = 'PHPCS_T_PHPCS_IGNORE_FILE'
T_PHPCS_SET  = 'PHPCS_T_PHPCS_SET'
T_PLUS  = 'PHPCS_T_PLUS'
T_POW  = 'PHPCS_T_POW'
T_POW_EQUAL  = 'PHPCS_T_POW_EQUAL'
T_PROPERTY  = 'PHPCS_T_PROPERTY'
T_PROTOTYPE  = 'PHPCS_T_PROTOTYPE'
T_READONLY  = 'PHPCS_T_READONLY'
T_REGULAR_EXPRESSION  = 'PHPCS_T_REGULAR_EXPRESSION'
T_RETURN_TYPE  = 'PHPCS_T_RETURN_TYPE'
T_SELF  = 'PHPCS_T_SELF'
T_SEMICOLON  = 'PHPCS_T_SEMICOLON'
T_SPACESHIP  = 'PHPCS_T_SPACESHIP'
T_START_NOWDOC  = 'PHPCS_T_START_NOWDOC'
T_STRING_CONCAT  = 'PHPCS_T_STRING_CONCAT'
T_STYLE  = 'PHPCS_T_STYLE'
T_THIS  = 'PHPCS_T_THIS'
T_TRUE  = 'PHPCS_T_TRUE'
T_TYPE_CLOSE_PARENTHESIS  = 'PHPCS_T_TYPE_CLOSE_PARENTHESIS'
T_TYPE_INTERSECTION  = 'PHPCS_T_TYPE_INTERSECTION'
T_TYPE_OPEN_PARENTHESIS  = 'PHPCS_T_TYPE_OPEN_PARENTHESIS'
T_TYPE_UNION  = 'PHPCS_T_TYPE_UNION'
T_TYPEOF  = 'PHPCS_T_TYPEOF'
T_URL  = 'PHPCS_T_URL'
T_YIELD  = 'PHPCS_T_YIELD'
T_YIELD_FROM  = 'PHPCS_T_YIELD_FROM'
T_ZSR  = 'PHPCS_T_ZSR'
T_ZSR_EQUAL  = 'PHPCS_T_ZSR_EQUAL'
WSC_DEBUG  = \defined('WSC_DEV_DEBUGGING')
WSC_DIR  = \plugin_dir_path(__DIR__)
WSC_LOGS_DIR  = \WP_CONTENT_DIR . \DIRECTORY_SEPARATOR . 'cache' . \DIRECTORY_SEPARATOR . 'acorn' . \DIRECTORY_SEPARATOR . 'logs'
WSC_PHP_VERSION  = '8.2'
WSC_PIM_API_APPID  = \getenv('PIM_API_APPID')
WSC_PIM_API_HOST  = \getenv('PIM_API_HOST')
WSC_PIM_API_TOKEN  = \getenv('PIM_API_TOKEN')
WSC_PIM_API_VERSION  = \getenv('PIM_API_VERSION')
WSC_REST_API_SHARED_SECRET  = \getenv('WSC_REST_API_SHARED_SECRET')
WSC_TMP_DIR  = \WSC_DIR . 'tmp'
WSC_TS_API_KEY  = \getenv('TS_API_KEY')
WSC_TS_NODE_HOST  = \getenv('TS_NODE_HOST')
WSC_TS_NODE_PORT  = \getenv('TS_NODE_PORT')
WSC_TS_NODE_PROTOCOL  = \getenv('TS_NODE_PROTOCOL')
WSC_URL  = \plugin_dir_url(__DIR__)

Functions

renderArray()  : string
Renders an array as a formatted output
renderArrayAccordion()  : string
Renders an array as an accordion with expand/collapse functionality
append()  : resource
Append a filter callback to the given stream.
prepend()  : resource
Prepend a filter callback to the given stream.
fun()  : callable
Create a filter function which uses the given built-in `$filter`.
remove()  : bool
Remove a filter previously added via `append()` or `prepend()`.
register()  : string
Registers the callback filter and returns the resulting filter name
describe_type()  : string
Debug function used to describe the provided value type and class.
headers_from_lines()  : array<string|int, mixed>
Parses an array of header lines into an associative array of headers.
debug_resource()  : resource
Returns a debug stream based on the provided variable.
choose_handler()  : callable(RequestInterface, array<string|int, mixed>): PromiseInterface
Chooses and creates a default handler to use based on the environment.
default_user_agent()  : string
Get the default User-Agent string to use with Guzzle.
default_ca_bundle()  : string
Returns the default cacert bundle for the current system.
normalize_header_keys()  : array<string|int, mixed>
Creates an associative array of lowercase header names to the actual header casing.
is_host_in_noproxy()  : bool
Returns true if the provided host matches any of the no proxy areas.
json_decode()  : object|array<string|int, mixed>|string|int|float|bool|null
Wrapper for json_decode that throws when an error occurs.
json_encode()  : string
Wrapper for JSON encoding that throws when an error occurs.
value()  : ValueDefinition
Helper for defining a value.
create()  : CreateDefinitionHelper
Helper for defining an object.
autowire()  : AutowireDefinitionHelper
Helper for autowiring an object.
factory()  : FactoryDefinitionHelper
Helper for defining a container entry using a factory function/callable.
decorate()  : FactoryDefinitionHelper
Decorate the previous definition using a callable.
get()  : Reference
Helper for referencing another container entry in an object definition.
env()  : EnvironmentVariableDefinition
Helper for referencing environment variables.
add()  : ArrayDefinitionExtension
Helper for extending another definition.
string()  : StringDefinition
Helper for concatenating strings.
getallheaders()  : mixed
Get all HTTP header key/values as an associative array for the current request.
printPHPCodeSnifferTestOutput()  : void
A global util function to help print unit test fixing data.
trigger_deprecation()  : void
Triggers a silenced deprecation notice.
fdiv()  : float
preg_last_error_msg()  : string
str_contains()  : bool
str_starts_with()  : bool
str_ends_with()  : bool
get_debug_type()  : string
get_resource_id()  : int

Constants

FILTER_VALIDATE_BOOL

public mixed FILTER_VALIDATE_BOOL = \FILTER_VALIDATE_BOOLEAN

PHP_CODESNIFFER_CBF

public mixed PHP_CODESNIFFER_CBF = false

PHP_CODESNIFFER_CBF

public mixed PHP_CODESNIFFER_CBF = \false

PHP_CODESNIFFER_IN_TESTS

public mixed PHP_CODESNIFFER_IN_TESTS = \true

PHP_CODESNIFFER_VERBOSITY

public mixed PHP_CODESNIFFER_VERBOSITY = $this->config->verbosity

PHP_CODESNIFFER_VERBOSITY

public mixed PHP_CODESNIFFER_VERBOSITY = 0

T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG

public mixed T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG = 'PHPCS_T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG'

T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG

public mixed T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG = 'PHPCS_T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG'

T_ANON_CLASS

public mixed T_ANON_CLASS = 'PHPCS_T_ANON_CLASS'

T_ARRAY_HINT

public mixed T_ARRAY_HINT = 'PHPCS_T_ARRAY_HINT'

T_ASPERAND

public mixed T_ASPERAND = 'PHPCS_T_ASPERAND'

T_ATTRIBUTE

public mixed T_ATTRIBUTE = 'PHPCS_T_ATTRIBUTE'

T_ATTRIBUTE_END

public mixed T_ATTRIBUTE_END = 'PHPCS_T_ATTRIBUTE_END'

T_BACKTICK

public mixed T_BACKTICK = 'PHPCS_T_BACKTICK'

T_BAD_CHARACTER

public mixed T_BAD_CHARACTER = 'PHPCS_T_BAD_CHARACTER'

T_BINARY_CAST

public mixed T_BINARY_CAST = 'PHPCS_T_BINARY_CAST'

T_BITWISE_AND

public mixed T_BITWISE_AND = 'PHPCS_T_BITWISE_AND'

T_BITWISE_NOT

public mixed T_BITWISE_NOT = 'PHPCS_T_BITWISE_NOT'

T_BITWISE_OR

public mixed T_BITWISE_OR = 'PHPCS_T_BITWISE_OR'

T_BITWISE_XOR

public mixed T_BITWISE_XOR = 'PHPCS_T_BITWISE_XOR'

T_BOOLEAN_NOT

public mixed T_BOOLEAN_NOT = 'PHPCS_T_BOOLEAN_NOT'

T_CLOSE_CURLY_BRACKET

public mixed T_CLOSE_CURLY_BRACKET = 'PHPCS_T_CLOSE_CURLY_BRACKET'

T_CLOSE_OBJECT

public mixed T_CLOSE_OBJECT = 'PHPCS_T_CLOSE_OBJECT'

T_CLOSE_PARENTHESIS

public mixed T_CLOSE_PARENTHESIS = 'PHPCS_T_CLOSE_PARENTHESIS'

T_CLOSE_SHORT_ARRAY

public mixed T_CLOSE_SHORT_ARRAY = 'PHPCS_T_CLOSE_SHORT_ARRAY'

T_CLOSE_SQUARE_BRACKET

public mixed T_CLOSE_SQUARE_BRACKET = 'PHPCS_T_CLOSE_SQUARE_BRACKET'

T_CLOSE_USE_GROUP

public mixed T_CLOSE_USE_GROUP = 'PHPCS_T_CLOSE_USE_GROUP'

T_CLOSURE

public mixed T_CLOSURE = 'PHPCS_T_CLOSURE'

T_COALESCE

public mixed T_COALESCE = 'PHPCS_T_COALESCE'

T_COALESCE_EQUAL

public mixed T_COALESCE_EQUAL = 'PHPCS_T_COALESCE_EQUAL'

T_COLON

public mixed T_COLON = 'PHPCS_T_COLON'

T_COLOUR

public mixed T_COLOUR = 'PHPCS_T_COLOUR'

T_COMMA

public mixed T_COMMA = 'PHPCS_T_COMMA'

T_DIVIDE

public mixed T_DIVIDE = 'PHPCS_T_DIVIDE'

T_DOC_COMMENT_CLOSE_TAG

public mixed T_DOC_COMMENT_CLOSE_TAG = 'PHPCS_T_DOC_COMMENT_CLOSE_TAG'

T_DOC_COMMENT_OPEN_TAG

public mixed T_DOC_COMMENT_OPEN_TAG = 'PHPCS_T_DOC_COMMENT_OPEN_TAG'

T_DOC_COMMENT_STAR

public mixed T_DOC_COMMENT_STAR = 'PHPCS_T_DOC_COMMENT_STAR'

T_DOC_COMMENT_STRING

public mixed T_DOC_COMMENT_STRING = 'PHPCS_T_DOC_COMMENT_STRING'

T_DOC_COMMENT_TAG

public mixed T_DOC_COMMENT_TAG = 'PHPCS_T_DOC_COMMENT_TAG'

T_DOC_COMMENT_WHITESPACE

public mixed T_DOC_COMMENT_WHITESPACE = 'PHPCS_T_DOC_COMMENT_WHITESPACE'

T_DOLLAR

public mixed T_DOLLAR = 'PHPCS_T_DOLLAR'

T_DOUBLE_QUOTED_STRING

public mixed T_DOUBLE_QUOTED_STRING = 'PHPCS_T_DOUBLE_QUOTED_STRING'

T_ELLIPSIS

public mixed T_ELLIPSIS = 'PHPCS_T_ELLIPSIS'

T_EMBEDDED_PHP

public mixed T_EMBEDDED_PHP = 'PHPCS_T_EMBEDDED_PHP'

T_END_NOWDOC

public mixed T_END_NOWDOC = 'PHPCS_T_END_NOWDOC'

T_ENUM

public mixed T_ENUM = 'PHPCS_T_ENUM'

T_ENUM_CASE

public mixed T_ENUM_CASE = 'PHPCS_T_ENUM_CASE'

T_EQUAL

public mixed T_EQUAL = 'PHPCS_T_EQUAL'

T_FALSE

public mixed T_FALSE = 'PHPCS_T_FALSE'

T_FINALLY

public mixed T_FINALLY = 'PHPCS_T_FINALLY'

T_FN

public mixed T_FN = 'PHPCS_T_FN'

T_FN_ARROW

public mixed T_FN_ARROW = 'PHPCS_T_FN_ARROW'

T_GOTO_LABEL

public mixed T_GOTO_LABEL = 'PHPCS_T_GOTO_LABEL'

T_GREATER_THAN

public mixed T_GREATER_THAN = 'PHPCS_T_GREATER_THAN'

T_HASH

public mixed T_HASH = 'PHPCS_T_HASH'

T_HEREDOC

public mixed T_HEREDOC = 'PHPCS_T_HEREDOC'

T_INLINE_ELSE

public mixed T_INLINE_ELSE = 'PHPCS_T_INLINE_ELSE'

T_INLINE_THEN

public mixed T_INLINE_THEN = 'PHPCS_T_INLINE_THEN'

T_LABEL

public mixed T_LABEL = 'PHPCS_T_LABEL'

T_LESS_THAN

public mixed T_LESS_THAN = 'PHPCS_T_LESS_THAN'

T_MATCH

public mixed T_MATCH = 'PHPCS_T_MATCH'

T_MATCH_ARROW

public mixed T_MATCH_ARROW = 'PHPCS_T_MATCH_ARROW'

T_MATCH_DEFAULT

public mixed T_MATCH_DEFAULT = 'PHPCS_T_MATCH_DEFAULT'

T_MINUS

public mixed T_MINUS = 'PHPCS_T_MINUS'

T_MODULUS

public mixed T_MODULUS = 'PHPCS_T_MODULUS'

T_MULTIPLY

public mixed T_MULTIPLY = 'PHPCS_T_MULTIPLY'

T_NAME_FULLY_QUALIFIED

public mixed T_NAME_FULLY_QUALIFIED = 'PHPCS_T_NAME_FULLY_QUALIFIED'

T_NAME_QUALIFIED

public mixed T_NAME_QUALIFIED = 'PHPCS_T_NAME_QUALIFIED'

T_NAME_RELATIVE

public mixed T_NAME_RELATIVE = 'PHPCS_T_NAME_RELATIVE'

T_NONE

public mixed T_NONE = 'PHPCS_T_NONE'

T_NOWDOC

public mixed T_NOWDOC = 'PHPCS_T_NOWDOC'

T_NULL

public mixed T_NULL = 'PHPCS_T_NULL'

T_NULLABLE

public mixed T_NULLABLE = 'PHPCS_T_NULLABLE'

T_NULLSAFE_OBJECT_OPERATOR

public mixed T_NULLSAFE_OBJECT_OPERATOR = 'PHPCS_T_NULLSAFE_OBJECT_OPERATOR'

T_OBJECT

public mixed T_OBJECT = 'PHPCS_T_OBJECT'

T_OPEN_CURLY_BRACKET

public mixed T_OPEN_CURLY_BRACKET = 'PHPCS_T_OPEN_CURLY_BRACKET'

T_OPEN_PARENTHESIS

public mixed T_OPEN_PARENTHESIS = 'PHPCS_T_OPEN_PARENTHESIS'

T_OPEN_SHORT_ARRAY

public mixed T_OPEN_SHORT_ARRAY = 'PHPCS_T_OPEN_SHORT_ARRAY'

T_OPEN_SQUARE_BRACKET

public mixed T_OPEN_SQUARE_BRACKET = 'PHPCS_T_OPEN_SQUARE_BRACKET'

T_OPEN_USE_GROUP

public mixed T_OPEN_USE_GROUP = 'PHPCS_T_OPEN_USE_GROUP'

T_PARAM_NAME

public mixed T_PARAM_NAME = 'PHPCS_T_PARAM_NAME'

T_PARENT

public mixed T_PARENT = 'PHPCS_T_PARENT'

T_PHPCS_DISABLE

public mixed T_PHPCS_DISABLE = 'PHPCS_T_PHPCS_DISABLE'

T_PHPCS_ENABLE

public mixed T_PHPCS_ENABLE = 'PHPCS_T_PHPCS_ENABLE'

T_PHPCS_IGNORE

public mixed T_PHPCS_IGNORE = 'PHPCS_T_PHPCS_IGNORE'

T_PHPCS_IGNORE_FILE

public mixed T_PHPCS_IGNORE_FILE = 'PHPCS_T_PHPCS_IGNORE_FILE'

T_PHPCS_SET

public mixed T_PHPCS_SET = 'PHPCS_T_PHPCS_SET'

T_PLUS

public mixed T_PLUS = 'PHPCS_T_PLUS'

T_POW

public mixed T_POW = 'PHPCS_T_POW'

T_POW_EQUAL

public mixed T_POW_EQUAL = 'PHPCS_T_POW_EQUAL'

T_PROPERTY

public mixed T_PROPERTY = 'PHPCS_T_PROPERTY'

T_PROTOTYPE

public mixed T_PROTOTYPE = 'PHPCS_T_PROTOTYPE'

T_READONLY

public mixed T_READONLY = 'PHPCS_T_READONLY'

T_REGULAR_EXPRESSION

public mixed T_REGULAR_EXPRESSION = 'PHPCS_T_REGULAR_EXPRESSION'

T_RETURN_TYPE

public mixed T_RETURN_TYPE = 'PHPCS_T_RETURN_TYPE'

T_SELF

public mixed T_SELF = 'PHPCS_T_SELF'

T_SEMICOLON

public mixed T_SEMICOLON = 'PHPCS_T_SEMICOLON'

T_SPACESHIP

public mixed T_SPACESHIP = 'PHPCS_T_SPACESHIP'

T_START_NOWDOC

public mixed T_START_NOWDOC = 'PHPCS_T_START_NOWDOC'

T_STRING_CONCAT

public mixed T_STRING_CONCAT = 'PHPCS_T_STRING_CONCAT'

T_STYLE

public mixed T_STYLE = 'PHPCS_T_STYLE'

T_THIS

public mixed T_THIS = 'PHPCS_T_THIS'

T_TRUE

public mixed T_TRUE = 'PHPCS_T_TRUE'

T_TYPE_CLOSE_PARENTHESIS

public mixed T_TYPE_CLOSE_PARENTHESIS = 'PHPCS_T_TYPE_CLOSE_PARENTHESIS'

T_TYPE_INTERSECTION

public mixed T_TYPE_INTERSECTION = 'PHPCS_T_TYPE_INTERSECTION'

T_TYPE_OPEN_PARENTHESIS

public mixed T_TYPE_OPEN_PARENTHESIS = 'PHPCS_T_TYPE_OPEN_PARENTHESIS'

T_TYPE_UNION

public mixed T_TYPE_UNION = 'PHPCS_T_TYPE_UNION'

T_TYPEOF

public mixed T_TYPEOF = 'PHPCS_T_TYPEOF'

T_URL

public mixed T_URL = 'PHPCS_T_URL'

T_YIELD

public mixed T_YIELD = 'PHPCS_T_YIELD'

T_YIELD_FROM

public mixed T_YIELD_FROM = 'PHPCS_T_YIELD_FROM'

T_ZSR

public mixed T_ZSR = 'PHPCS_T_ZSR'

T_ZSR_EQUAL

public mixed T_ZSR_EQUAL = 'PHPCS_T_ZSR_EQUAL'

WSC_DEBUG

public mixed WSC_DEBUG = \defined('WSC_DEV_DEBUGGING')

WSC_DIR

public mixed WSC_DIR = \plugin_dir_path(__DIR__)

WSC_LOGS_DIR

public mixed WSC_LOGS_DIR = \WP_CONTENT_DIR . \DIRECTORY_SEPARATOR . 'cache' . \DIRECTORY_SEPARATOR . 'acorn' . \DIRECTORY_SEPARATOR . 'logs'

WSC_PHP_VERSION

public mixed WSC_PHP_VERSION = '8.2'

WSC_PIM_API_APPID

public mixed WSC_PIM_API_APPID = \getenv('PIM_API_APPID')

WSC_PIM_API_HOST

public mixed WSC_PIM_API_HOST = \getenv('PIM_API_HOST')

WSC_PIM_API_TOKEN

public mixed WSC_PIM_API_TOKEN = \getenv('PIM_API_TOKEN')

WSC_PIM_API_VERSION

public mixed WSC_PIM_API_VERSION = \getenv('PIM_API_VERSION')

WSC_REST_API_SHARED_SECRET

public mixed WSC_REST_API_SHARED_SECRET = \getenv('WSC_REST_API_SHARED_SECRET')

WSC_TMP_DIR

public mixed WSC_TMP_DIR = \WSC_DIR . 'tmp'

WSC_TS_API_KEY

public mixed WSC_TS_API_KEY = \getenv('TS_API_KEY')

WSC_TS_NODE_HOST

public mixed WSC_TS_NODE_HOST = \getenv('TS_NODE_HOST')

WSC_TS_NODE_PORT

public mixed WSC_TS_NODE_PORT = \getenv('TS_NODE_PORT')

WSC_TS_NODE_PROTOCOL

public mixed WSC_TS_NODE_PROTOCOL = \getenv('TS_NODE_PROTOCOL')

WSC_URL

public mixed WSC_URL = \plugin_dir_url(__DIR__)

Functions

renderArray()

Renders an array as a formatted output

renderArray(array<string|int, mixed> $array[, int $depth = 0 ]) : string
Parameters
$array : array<string|int, mixed>

The array to render

$depth : int = 0

Current nesting depth

Return values
string

renderArrayAccordion()

Renders an array as an accordion with expand/collapse functionality

renderArrayAccordion(string $key, array<string|int, mixed> $array[, int $depth = 0 ]) : string
Parameters
$key : string

The array key

$array : array<string|int, mixed>

The array to render

$depth : int = 0

Current nesting depth

Return values
string

append()

Append a filter callback to the given stream.

append(resource $stream, callable $callback[, int $read_write = STREAM_FILTER_ALL ]) : resource

Each stream can have a list of filters attached. This function appends a filter to the end of this list.

If the given filter can not be added, it throws an Exception.

The $stream can be any valid stream resource, such as:

$stream = fopen('demo.txt', 'w+');

The $callback should be a valid callable function which accepts an individual chunk of data and should return the updated chunk:

$filter = Clue\StreamFilter\append($stream, function ($chunk) {
    // will be called each time you read or write a $chunk to/from the stream
    return $chunk;
});

As such, you can also use native PHP functions or any other callable:

Clue\StreamFilter\append($stream, 'strtoupper');

// will write "HELLO" to the underlying stream
fwrite($stream, 'hello');

If the $callback accepts invocation without parameters, then this signature will be invoked once ending (flushing) the filter:

Clue\StreamFilter\append($stream, function ($chunk = null) {
    if ($chunk === null) {
        // will be called once ending the filter
        return 'end';
    }
    // will be called each time you read or write a $chunk to/from the stream
    return $chunk;
});

fclose($stream);

Note: Legacy PHP versions (PHP < 5.4) do not support passing additional data from the end signal handler if the stream is being closed.

If your callback throws an Exception, then the filter process will be aborted. In order to play nice with PHP's stream handling, the Exception will be transformed to a PHP warning instead:

Clue\StreamFilter\append($stream, function ($chunk) {
    throw new \RuntimeException('Unexpected chunk');
});

// raises an E_USER_WARNING with "Error invoking filter: Unexpected chunk"
fwrite($stream, 'hello');

The optional $read_write parameter can be used to only invoke the $callback when either writing to the stream or only when reading from the stream:

Clue\StreamFilter\append($stream, function ($chunk) {
    // will be called each time you write to the stream
    return $chunk;
}, STREAM_FILTER_WRITE);

Clue\StreamFilter\append($stream, function ($chunk) {
    // will be called each time you read from the stream
    return $chunk;
}, STREAM_FILTER_READ);

This function returns a filter resource which can be passed to remove().

Note that once a filter has been added to stream, the stream can no longer be passed to stream_select() (and family).

Warning: stream_select(): cannot cast a filtered stream on this system in {file} on line {line}

This is due to limitations of PHP's stream filter support, as it can no longer reliably tell when the underlying stream resource is actually ready. As an alternative, consider calling stream_select() on the unfiltered stream and then pass the unfiltered data through the fun() function.

Parameters
$stream : resource
$callback : callable
$read_write : int = STREAM_FILTER_ALL
Tags
throws
Exception

on error

uses
stream_filter_append()
Return values
resource

filter resource which can be used for remove()

prepend()

Prepend a filter callback to the given stream.

prepend(resource $stream, callable $callback[, int $read_write = STREAM_FILTER_ALL ]) : resource

Each stream can have a list of filters attached. This function prepends a filter to the start of this list.

If the given filter can not be added, it throws an Exception.

$filter = Clue\StreamFilter\prepend($stream, function ($chunk) {
    // will be called each time you read or write a $chunk to/from the stream
    return $chunk;
});

This function returns a filter resource which can be passed to remove().

Except for the position in the list of filters, this function behaves exactly like the append() function. For more details about its behavior, see also the append() function.

Parameters
$stream : resource
$callback : callable
$read_write : int = STREAM_FILTER_ALL
Tags
throws
Exception

on error

uses
stream_filter_prepend()
Return values
resource

filter resource which can be used for remove()

fun()

Create a filter function which uses the given built-in `$filter`.

fun(string $filter[, mixed $parameters = null ]) : callable

PHP comes with a useful set of built-in filters. Using fun() makes accessing these as easy as passing an input string to filter and getting the filtered output string.

$fun = Clue\StreamFilter\fun('string.rot13');

assert('grfg' === $fun('test'));
assert('test' === $fun($fun('test'));

Please note that not all filter functions may be available depending on installed PHP extensions and the PHP version in use. In particular, HHVM may not offer the same filter functions or parameters as Zend PHP. Accessing an unknown filter function will result in a RuntimeException:

Clue\StreamFilter\fun('unknown'); // throws RuntimeException

Some filters may accept or require additional filter parameters – most filters do not require filter parameters. If given, the optional $parameters argument will be passed to the underlying filter handler as-is. In particular, note how not passing this parameter at all differs from explicitly passing a null value (which many filters do not accept). Please refer to the individual filter definition for more details. For example, the string.strip_tags filter can be invoked like this:

$fun = Clue\StreamFilter\fun('string.strip_tags', '<a><b>');

$ret = $fun('<b>h<br>i</b>');
assert('<b>hi</b>' === $ret);

Under the hood, this function allocates a temporary memory stream, so it's recommended to clean up the filter function after use. Also, some filter functions (in particular the zlib compression filters) may use internal buffers and may emit a final data chunk on close. The filter function can be closed by invoking without any arguments:

$fun = Clue\StreamFilter\fun('zlib.deflate');

$ret = $fun('hello') . $fun('world') . $fun();
assert('helloworld' === gzinflate($ret));

The filter function must not be used anymore after it has been closed. Doing so will result in a RuntimeException:

$fun = Clue\StreamFilter\fun('string.rot13');
$fun();

$fun('test'); // throws RuntimeException

Note: If you're using the zlib compression filters, then you should be wary about engine inconsistencies between different PHP versions and HHVM. These inconsistencies exist in the underlying PHP engines and there's little we can do about this in this library. Our test suite contains several test cases that exhibit these issues. If you feel some test case is missing or outdated, we're happy to accept PRs! :)

Parameters
$filter : string

built-in filter name. See stream_get_filters() or http://php.net/manual/en/filters.php

$parameters : mixed = null

(optional) parameters to pass to the built-in filter as-is

Tags
throws
RuntimeException

on error

link
http://php.net/manual/en/filters.php
see
stream_get_filters()
see
append()
Return values
callable

a filter callback which can be append()'ed or prepend()'ed

remove()

Remove a filter previously added via `append()` or `prepend()`.

remove(resource $filter) : bool
$filter = Clue\StreamFilter\append($stream, function () {
    // …
});
Clue\StreamFilter\remove($filter);
Parameters
$filter : resource
Tags
throws
RuntimeException

on error

uses
stream_filter_remove()
Return values
bool

true on success or false on error

register()

Registers the callback filter and returns the resulting filter name

register() : string

There should be little reason to call this function manually.

Tags
uses
CallbackFilter
Return values
string

filter name

describe_type()

Debug function used to describe the provided value type and class.

describe_type will be removed in guzzlehttp/guzzle:8.0. Use Utils::describeType instead.

describe_type(mixed $input) : string
Parameters
$input : mixed

Any type of variable to describe the type of. This parameter misses a typehint because of that.

Return values
string

Returns a string containing the type of the variable and if a class is provided, the class name.

headers_from_lines()

Parses an array of header lines into an associative array of headers.

headers_from_lines will be removed in guzzlehttp/guzzle:8.0. Use Utils::headersFromLines instead.

headers_from_lines(iterable<string|int, mixed> $lines) : array<string|int, mixed>
Parameters
$lines : iterable<string|int, mixed>

Header lines array of strings in the following format: "Name: Value"

Return values
array<string|int, mixed>

debug_resource()

Returns a debug stream based on the provided variable.

debug_resource will be removed in guzzlehttp/guzzle:8.0. Use Utils::debugResource instead.

debug_resource([mixed $value = null ]) : resource
Parameters
$value : mixed = null

Optional value

Return values
resource

choose_handler()

Chooses and creates a default handler to use based on the environment.

choose_handler will be removed in guzzlehttp/guzzle:8.0. Use Utils::chooseHandler instead.

choose_handler() : callable(RequestInterface, array<string|int, mixed>): PromiseInterface

The returned handler is not wrapped by any default middlewares.

Tags
throws
RuntimeException

if no viable Handler is available.

Return values
callable(RequestInterface, array<string|int, mixed>): PromiseInterface

Returns the best handler for the given system.

default_user_agent()

Get the default User-Agent string to use with Guzzle.

default_user_agent will be removed in guzzlehttp/guzzle:8.0. Use Utils::defaultUserAgent instead.

default_user_agent() : string
Return values
string

default_ca_bundle()

Returns the default cacert bundle for the current system.

default_ca_bundle will be removed in guzzlehttp/guzzle:8.0. This function is not needed in PHP 5.6+.

default_ca_bundle() : string

First, the openssl.cafile and curl.cainfo php.ini settings are checked. If those settings are not configured, then the common locations for bundles found on Red Hat, CentOS, Fedora, Ubuntu, Debian, FreeBSD, OS X and Windows are checked. If any of these file locations are found on disk, they will be utilized.

Note: the result of this function is cached for subsequent calls.

Tags
throws
RuntimeException

if no bundle can be found.

Return values
string

normalize_header_keys()

Creates an associative array of lowercase header names to the actual header casing.

normalize_header_keys will be removed in guzzlehttp/guzzle:8.0. Use Utils::normalizeHeaderKeys instead.

normalize_header_keys(array<string|int, mixed> $headers) : array<string|int, mixed>
Parameters
$headers : array<string|int, mixed>
Return values
array<string|int, mixed>

is_host_in_noproxy()

Returns true if the provided host matches any of the no proxy areas.

is_host_in_noproxy will be removed in guzzlehttp/guzzle:8.0. Use Utils::isHostInNoProxy instead.

is_host_in_noproxy(string $host, array<string|int, string> $noProxyArray) : bool

This method will strip a port from the host if it is present. Each pattern can be matched with an exact match (e.g., "foo.com" == "foo.com") or a partial match: (e.g., "foo.com" == "baz.foo.com" and ".foo.com" == "baz.foo.com", but ".foo.com" != "foo.com").

Areas are matched in the following cases:

  1. "*" (without quotes) always matches any hosts.
  2. An exact match.
  3. The area starts with "." and the area is the last part of the host. e.g. '.mit.edu' will match any host that ends with '.mit.edu'.
Parameters
$host : string

Host to check against the patterns.

$noProxyArray : array<string|int, string>

An array of host patterns.

Tags
throws
InvalidArgumentException
Return values
bool

json_decode()

Wrapper for json_decode that throws when an error occurs.

json_decode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonDecode instead.

json_decode(string $json[, bool $assoc = false ][, int $depth = 512 ][, int $options = 0 ]) : object|array<string|int, mixed>|string|int|float|bool|null
Parameters
$json : string

JSON data to parse

$assoc : bool = false

When true, returned objects will be converted into associative arrays.

$depth : int = 512

User specified recursion depth.

$options : int = 0

Bitmask of JSON decode options.

Tags
throws
InvalidArgumentException

if the JSON cannot be decoded.

see
https://www.php.net/manual/en/function.json-decode.php
Return values
object|array<string|int, mixed>|string|int|float|bool|null

json_encode()

Wrapper for JSON encoding that throws when an error occurs.

json_encode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonEncode instead.

json_encode(mixed $value[, int $options = 0 ][, int $depth = 512 ]) : string
Parameters
$value : mixed

The value being encoded

$options : int = 0

JSON encode option bitmask

$depth : int = 512

Set the maximum depth. Must be greater than zero.

Tags
throws
InvalidArgumentException

if the JSON cannot be encoded.

see
https://www.php.net/manual/en/function.json-encode.php
Return values
string

create()

Helper for defining an object.

create([string|null $className = null ]) : CreateDefinitionHelper
Parameters
$className : string|null = null

Class name of the object. If null, the name of the entry (in the container) will be used as class name.

Return values
CreateDefinitionHelper

autowire()

Helper for autowiring an object.

autowire([string|null $className = null ]) : AutowireDefinitionHelper
Parameters
$className : string|null = null

Class name of the object. If null, the name of the entry (in the container) will be used as class name.

Return values
AutowireDefinitionHelper

factory()

Helper for defining a container entry using a factory function/callable.

factory(callable|array<string|int, mixed>|string $factory) : FactoryDefinitionHelper
Parameters
$factory : callable|array<string|int, mixed>|string

The factory is a callable that takes the container as parameter and returns the value to register in the container.

Return values
FactoryDefinitionHelper

decorate()

Decorate the previous definition using a callable.

decorate(callable $callable) : FactoryDefinitionHelper

Example:

'foo' => decorate(function ($foo, $container) { return new CachedFoo($foo, $container->get('cache')); })

Parameters
$callable : callable

The callable takes the decorated object as first parameter and the container as second.

Return values
FactoryDefinitionHelper

get()

Helper for referencing another container entry in an object definition.

get(string $entryName) : Reference
Parameters
$entryName : string
Return values
Reference

env()

Helper for referencing environment variables.

env(string $variableName[, mixed $defaultValue = null ]) : EnvironmentVariableDefinition
Parameters
$variableName : string

The name of the environment variable.

$defaultValue : mixed = null

The default value to be used if the environment variable is not defined.

Return values
EnvironmentVariableDefinition

add()

Helper for extending another definition.

add(mixed|array<string|int, mixed> $values) : ArrayDefinitionExtension

Example:

'log.backends' => DI\add(DI\get('My\Custom\LogBackend'))

or:

'log.backends' => DI\add([
    DI\get('My\Custom\LogBackend')
])
Parameters
$values : mixed|array<string|int, mixed>

A value or an array of values to add to the array.

Tags
since
5.0
Return values
ArrayDefinitionExtension

string()

Helper for concatenating strings.

string(string $expression) : StringDefinition

Example:

'log.filename' => DI\string('{app.path}/app.log')

Parameters
$expression : string

A string expression. Use the } placeholders to reference other container entries.

Tags
since
5.0
Return values
StringDefinition

getallheaders()

Get all HTTP header key/values as an associative array for the current request.

getallheaders() : mixed
Return values
mixed

The HTTP header key/value pairs.

printPHPCodeSnifferTestOutput()

A global util function to help print unit test fixing data.

printPHPCodeSnifferTestOutput() : void

trigger_deprecation()

Triggers a silenced deprecation notice.

trigger_deprecation(string $package, string $version, string $message, mixed ...$args) : void
Parameters
$package : string

The name of the Composer package that is triggering the deprecation

$version : string

The version of the package that introduced the deprecation

$message : string

The message of the deprecation

$args : mixed

Values to insert in the message using printf() formatting

Tags
author

Nicolas Grekas p@tchwork.com

fdiv()

fdiv(float $num1, float $num2) : float
Parameters
$num1 : float
$num2 : float
Return values
float

preg_last_error_msg()

preg_last_error_msg() : string
Return values
string

str_contains()

str_contains(string|null $haystack, string|null $needle) : bool
Parameters
$haystack : string|null
$needle : string|null
Return values
bool

str_starts_with()

str_starts_with(string|null $haystack, string|null $needle) : bool
Parameters
$haystack : string|null
$needle : string|null
Return values
bool

str_ends_with()

str_ends_with(string|null $haystack, string|null $needle) : bool
Parameters
$haystack : string|null
$needle : string|null
Return values
bool

get_debug_type()

get_debug_type(mixed $value) : string
Parameters
$value : mixed
Return values
string

get_resource_id()

get_resource_id(mixed $resource) : int
Parameters
$resource : mixed
Return values
int

        
On this page

Search results