Container\Container
ClassSource on GitHubPhalcon\Container\Container- implementsPhalcon\Contracts\Container\Service\Collection,Phalcon\Contracts\Container\Service\Enumerable
Uses Closure · Phalcon\Container\Definition\Processor\ClosureProcessor · Phalcon\Container\Definition\Processor\ObjectProcessor · Phalcon\Container\Definition\Processor\Processor · Phalcon\Container\Definition\Processor\StringProcessor · Phalcon\Container\Definition\ServiceDefinition · Phalcon\Container\Definition\ServiceLifetime · Phalcon\Container\Exceptions\CannotExtendResolved · Phalcon\Container\Exceptions\CircularAliasFound · Phalcon\Container\Exceptions\InstanceNotFound · Phalcon\Container\Exceptions\NoProcessorFound · Phalcon\Container\Exceptions\ParameterNotFound · Phalcon\Container\Exceptions\ServiceNotFound · Phalcon\Container\Exceptions\ServiceNotRegistered · Phalcon\Container\Resolver\Lazy\Lazy · Phalcon\Container\Resolver\Resolver · Phalcon\Contracts\Container\Service\Collection · Phalcon\Contracts\Container\Service\Enumerable · Phalcon\Di\InjectionAwareInterface · ReflectionException
Method Summary
public__construct()publicServiceDefinitionbind(string$interfaceName,string$concrete)Bind an interface to a concrete classpublicClosurecallableGet( string$name )Resolve to a closure on a get()publicClosurecallableNew( string$name )Resolve to a closure on a new()publicvoidextend(string$name,callable$callableObject)Extends the definitionpublicmixedget( string$name )Resolve and return an element registerd in the containerpublicstringgetAlias( string$name )Return an aliaspublicarraygetByTag( string$tag )Return services by tagpublicServiceDefinitiongetDefinition( string$name )Return the service definitionpublicobjectgetInstance( string$name )Return a stored instancepublicmixedgetParameter( string$name )Return a parameterpublicResolvergetResolver()Return the resolverpublicobjectgetService( string$serviceName )Resolve an return a servicepublicarraygetServiceNames()Returns the names of every registered service definition. Names thatpublicboolhas( string$name )Does the container have a particular servicepublicboolhasAlias( string$name )Does the service have an aliaspublicboolhasDefinition( string$name )Does the service have a definitionpublicboolhasInstance( string$name )Does the service have an instancepublicboolhasParameter( string$name )Does the service have a parameterpublicboolhasService( string$serviceName )Does the container have a particular servicepublicboolisAutowireEnabled()Is AutoWiring enabledpublicmixednew( string$name )Resolve and return a new servicepublicServiceDefinitionnewDefinition( string$name )Return a new service definitionpublicServiceDefinitionset(string$name,mixed$definition)Set a servicepublicstaticsetAlias(string$name,string$alias)Set an aliaspublicstaticsetAutowire( bool$enabled )Set AutoWirepublicstaticsetDefinition(string$name,ServiceDefinition$definition)Set a definitionpublicstaticsetInstance(string$name,object$instance,string$lifetime)Set an instancepublicstaticsetParameter(string$name,mixed$value)Set a parameterpublicvoidsetTag(string$tag,string$serviceName)Register a tag with a servicepublicvoidunsetAlias( string$name )Remove an aliaspublicvoidunsetDefinition( string$name )Remove a definitionpublicvoidunsetInstance( string$name )Remove an instancepublicvoidunsetInstances( string$lifetime )Remove instances based on lifetimepublicvoidunsetParameter( string$name )Remove a parameterProperties
protectedarray<string, string>$aliases = []protectedbool$autowire = trueprotectedarray<string, string>$instanceLifetimes = []protectedarray<string, object>$instances = []protectedarray<string, mixed>$parameters = []protectedarray<string, Processor>$processors = []protectedResolver$resolverprotectedarray<string, ServiceDefinition>$services = []protectedarray<string, list<string>>$tags = []Methods
__construct()
public function __construct();bind()
public function bind(
string $interfaceName,
string $concrete
): ServiceDefinition;Bind an interface to a concrete class
callableGet()
public function callableGet( string $name ): Closure;Resolve to a closure on a get()
callableNew()
public function callableNew( string $name ): Closure;Resolve to a closure on a new()
extend()
public function extend(
string $name,
callable $callableObject
): void;Extends the definition
get()
public function get( string $name ): mixed;Resolve and return an element registerd in the container
getAlias()
public function getAlias( string $name ): string;Return an alias
getByTag()
public function getByTag( string $tag ): array;Return services by tag
getDefinition()
public function getDefinition( string $name ): ServiceDefinition;Return the service definition
getInstance()
public function getInstance( string $name ): object;Return a stored instance
getParameter()
public function getParameter( string $name ): mixed;Return a parameter
getResolver()
public function getResolver(): Resolver;Return the resolver
getService()
public function getService( string $serviceName ): object;Resolve an return a service
getServiceNames()
public function getServiceNames(): array;Returns the names of every registered service definition. Names that only exist as an alias, a pre-set instance or a parameter are not included.
has()
public function has( string $name ): bool;Does the container have a particular service
hasAlias()
public function hasAlias( string $name ): bool;Does the service have an alias
hasDefinition()
public function hasDefinition( string $name ): bool;Does the service have a definition
hasInstance()
public function hasInstance( string $name ): bool;Does the service have an instance
hasParameter()
public function hasParameter( string $name ): bool;Does the service have a parameter
hasService()
public function hasService( string $serviceName ): bool;Does the container have a particular service
isAutowireEnabled()
public function isAutowireEnabled(): bool;Is AutoWiring enabled
new()
public function new( string $name ): mixed;Resolve and return a new service
newDefinition()
public function newDefinition( string $name ): ServiceDefinition;Return a new service definition
set()
public function set(
string $name,
mixed $definition
): ServiceDefinition;Set a service
setAlias()
public function setAlias(
string $name,
string $alias
): static;Set an alias
setAutowire()
public function setAutowire( bool $enabled ): static;Set AutoWire
setDefinition()
public function setDefinition(
string $name,
ServiceDefinition $definition
): static;Set a definition
setInstance()
public function setInstance(
string $name,
object $instance,
string $lifetime
): static;Set an instance
setParameter()
public function setParameter(
string $name,
mixed $value
): static;Set a parameter
setTag()
public function setTag(
string $tag,
string $serviceName
): void;Register a tag with a service
unsetAlias()
public function unsetAlias( string $name ): void;Remove an alias
unsetDefinition()
public function unsetDefinition( string $name ): void;Remove a definition
unsetInstance()
public function unsetInstance( string $name ): void;Remove an instance
unsetInstances()
public function unsetInstances( string $lifetime ): void;Remove instances based on lifetime
unsetParameter()
public function unsetParameter( string $name ): void;Remove a parameter
Container\ContainerFactory
ClassSource on GitHubPhalcon\Container\ContainerFactory- implementsPhalcon\Contracts\Container\Ioc\IocContainerFactory
Uses Phalcon\Contracts\Container\Ioc\IocContainerFactory · Phalcon\Contracts\Container\Service\Provider
Method Summary
publicstaticaddProvider( Provider$provider )Adds a providerpublicContainernewContainer()Returns a new containerProperties
protectedarray<array-key, Provider>$providers = []Methods
addProvider()
public function addProvider( Provider $provider ): static;Adds a provider
newContainer()
public function newContainer(): Container;Returns a new container
Container\Definition\DefinitionType
ClassSource on GitHubPhalcon\Container\Definition\DefinitionType
Constants
stringCLOSURE_TYPE = "closure"stringOBJECT_TYPE = "object"stringPARAMETER_TYPE = "parameter"stringSTRING_TYPE = "string"Container\Definition\Processor\ClosureProcessor
ClassSource on GitHubPhalcon\Container\Definition\Processor\ClosureProcessor- implementsPhalcon\Container\Definition\Processor\Processor
Uses Closure · Phalcon\Container\Definition\DefinitionType · Phalcon\Container\Definition\ServiceDefinition
Method Summary
publicboolcanProcess( mixed$definition )Wheteher the definition is a ClosurepublicServiceDefinitionprocess(string$name,mixed$definition,object$container)Process the ClosureMethods
canProcess()
public function canProcess( mixed $definition ): bool;Wheteher the definition is a Closure
process()
public function process(
string $name,
mixed $definition,
object $container
): ServiceDefinition;Process the Closure
Container\Definition\Processor\ObjectProcessor
ClassSource on GitHubPhalcon\Container\Definition\Processor\ObjectProcessor- implementsPhalcon\Container\Definition\Processor\Processor
Uses Closure · Phalcon\Container\Definition\DefinitionType · Phalcon\Container\Definition\ServiceDefinition
Method Summary
publicboolcanProcess( mixed$definition )Whether the definition is an Object (not Closure)publicServiceDefinitionprocess(string$name,mixed$definition,object$container)Process the ObjectMethods
canProcess()
public function canProcess( mixed $definition ): bool;Whether the definition is an Object (not Closure)
process()
public function process(
string $name,
mixed $definition,
object $container
): ServiceDefinition;Process the Object
Container\Definition\Processor\ParameterProcessor
ClassSource on GitHubPhalcon\Container\Definition\Processor\ParameterProcessor- implementsPhalcon\Container\Definition\Processor\Processor
Uses Closure · Phalcon\Container\Definition\DefinitionType · Phalcon\Container\Definition\ServiceDefinition
Method Summary
publicboolcanProcess( mixed$definition )Whetehr the definition is a parameterpublicServiceDefinitionprocess(string$name,mixed$definition,object$container)Process the parameterMethods
canProcess()
public function canProcess( mixed $definition ): bool;Whetehr the definition is a parameter
process()
public function process(
string $name,
mixed $definition,
object $container
): ServiceDefinition;Process the parameter
Container\Definition\Processor\Processor
InterfaceSource on GitHubPhalcon\Container\Definition\Processor\Processor
Uses Phalcon\Container\Definition\ServiceDefinition
Method Summary
publicboolcanProcess( mixed$definition )Can this definition be processed?publicServiceDefinitionprocess(string$name,mixed$definition,object$container)Process the definitionMethods
canProcess()
public function canProcess( mixed $definition ): bool;Can this definition be processed?
process()
public function process(
string $name,
mixed $definition,
object $container
): ServiceDefinition;Process the definition
Container\Definition\Processor\StringProcessor
ClassSource on GitHubPhalcon\Container\Definition\Processor\StringProcessor- implementsPhalcon\Container\Definition\Processor\Processor
Uses Phalcon\Container\Definition\DefinitionType · Phalcon\Container\Definition\ServiceDefinition
Method Summary
publicboolcanProcess( mixed$definition )Whether the definition is a class stringpublicServiceDefinitionprocess(string$name,mixed$definition,object$container)Process the class stringMethods
canProcess()
public function canProcess( mixed $definition ): bool;Whether the definition is a class string
process()
public function process(
string $name,
mixed $definition,
object $container
): ServiceDefinition;Process the class string
Container\Definition\ServiceDefinition
ClassSource on GitHubPhalcon\Container\Definition\ServiceDefinition
Uses Phalcon\Container\Exceptions\FrozenDefinition · Phalcon\Container\Exceptions\InvalidExtender · Phalcon\Container\Exceptions\NoClassSet · Phalcon\Container\Exceptions\NoFactorySet · Phalcon\Contracts\Container\Resolver\Resolvable · ReflectionClass · ReflectionException
Method Summary
public__construct(string$serviceName,string$type,mixed$raw = null)publicstaticaddExtender( callable$extender )Adds an extenderpublicstaticaddTag( string$tag )Adds a tagpublicobjectbuildService( object$container )Builds a service and returns the instance backpublicvoidfreeze( object$container )Freezes the containerpublicarraygetArguments()Returns the argumentspublicstringgetClass()Returns the classpublicarraygetConstructorArgs()Returns the constructor argumentspublicarraygetExtenders()Returns the extenderspubliccallablegetFactory()Returns the factorypublicstringgetLifetime()Returns the lifetimepublicstringgetServiceName()Returns the name of the servicepublicarraygetTags()Returns the tagspublicstringgetType()Returns the typepublicboolhasClass()Does it have a classpublicboolhasExtenders()Do we have extenderspublicboolhasFactory()Does it have a factorypublicboolisCacheable()Is it cacheablepublicboolisFrozen()Is it frozenpublicstaticsetArgument(mixed$param,mixed$value)Set an argumentpublicstaticsetClass( string$className )Set a classpublicstaticsetContainer( object$container )Set the containerpublicstaticsetExtenders( array$extenders )Set extenderspublicstaticsetFactory( callable$factory )Set a factorypublicstaticsetIsCacheable( bool$isCacheable )Set cachablepublicstaticsetLifetime( string$lifetime )Set lifetimepublicstaticunsetClass()Unset classpublicstaticunsetExtenders()Unset extenderspublicstaticunsetFactory()Unset the factoryprotectedvoidcheckFrozen()Check if frozenProperties
protectedarray$arguments = []protectedstring|null$className = nullprotectedarray$constructorArgs = []protectedobject|null$container = nullprotectedarray<array-key, callable>$extenders = []protectedcallable|null$factory = nullprotectedbool$frozen = falseprotectedbool$isCacheable = falseprotectedstring$lifetime = ServiceLifetime::SCOPEDprotectedmixed$raw = nullprotectedmixed$serviceNameprotectedarray$tags = []protectedmixed$typeMethods
__construct()
public function __construct(
string $serviceName,
string $type,
mixed $raw = null
);addExtender()
public function addExtender( callable $extender ): static;Adds an extender
addTag()
public function addTag( string $tag ): static;Adds a tag
buildService()
public function buildService( object $container ): object;Builds a service and returns the instance back
freeze()
public function freeze( object $container ): void;Freezes the container
getArguments()
public function getArguments(): array;Returns the arguments
getClass()
public function getClass(): string;Returns the class
getConstructorArgs()
public function getConstructorArgs(): array;Returns the constructor arguments
getExtenders()
public function getExtenders(): array;Returns the extenders
getFactory()
public function getFactory(): callable;Returns the factory
getLifetime()
public function getLifetime(): string;Returns the lifetime
getServiceName()
public function getServiceName(): string;Returns the name of the service
getTags()
public function getTags(): array;Returns the tags
getType()
public function getType(): string;Returns the type
hasClass()
public function hasClass(): bool;Does it have a class
hasExtenders()
public function hasExtenders(): bool;Do we have extenders
hasFactory()
public function hasFactory(): bool;Does it have a factory
isCacheable()
public function isCacheable(): bool;Is it cacheable
isFrozen()
public function isFrozen(): bool;Is it frozen
setArgument()
public function setArgument(
mixed $param,
mixed $value
): static;Set an argument
setClass()
public function setClass( string $className ): static;Set a class
setContainer()
public function setContainer( object $container ): static;Set the container
setExtenders()
public function setExtenders( array $extenders ): static;Set extenders
setFactory()
public function setFactory( callable $factory ): static;Set a factory
setIsCacheable()
public function setIsCacheable( bool $isCacheable ): static;Set cachable
setLifetime()
public function setLifetime( string $lifetime ): static;Set lifetime
unsetClass()
public function unsetClass(): static;Unset class
unsetExtenders()
public function unsetExtenders(): static;Unset extenders
unsetFactory()
public function unsetFactory(): static;Unset the factory
checkFrozen()
protected function checkFrozen(): void;Check if frozen
Container\Definition\ServiceLifetime
ClassSource on GitHubPhalcon\Container\Definition\ServiceLifetime
Constants
stringSCOPED = "SCOPED"stringSINGLETON = "SINGLETON"stringTRANSIENT = "TRANSIENT"Container\Exceptions\CannotExtendResolved
ClassSource on GitHub\ExceptionPhalcon\Container\Exceptions\ExceptionPhalcon\Container\Exceptions\CannotExtendResolved
Method Summary
Methods
__construct()
public function __construct( string $name );Cannot extend a resolved service
Container\Exceptions\CannotResolveParameter
ClassSource on GitHub\ExceptionPhalcon\Container\Exceptions\ExceptionPhalcon\Container\Exceptions\CannotResolveParameter
Method Summary
Methods
__construct()
public function __construct(
string $param,
string $className
);Cannot resolve a parameter
Container\Exceptions\CircularAliasFound
ClassSource on GitHub\ExceptionPhalcon\Container\Exceptions\ExceptionPhalcon\Container\Exceptions\CircularAliasFound
Method Summary
Methods
__construct()
public function __construct( string $name );Circular Alias found
Container\Exceptions\ContainerThrowable
InterfaceSource on GitHub\ThrowablePhalcon\Contracts\Container\Ioc\IocThrowablePhalcon\Container\Exceptions\ContainerThrowable- extendsPhalcon\Contracts\Container\Ioc\IocThrowable,Phalcon\Contracts\Container\Resolver\ResolverThrowable,Phalcon\Contracts\Container\Service\Throwable
Uses Phalcon\Contracts\Container\Ioc\IocThrowable · Phalcon\Contracts\Container\Resolver\ResolverThrowable · Phalcon\Contracts\Container\Service\Throwable
Container\Exceptions\EnvNotDefined
FinalSource on GitHub\ExceptionPhalcon\Container\Exceptions\ExceptionPhalcon\Container\Exceptions\EnvNotDefined
Method Summary
Methods
__construct()
public function __construct( string $varname );Container\Exceptions\Exception
ClassSource on GitHub\ExceptionPhalcon\Container\Exceptions\Exception- implementsPhalcon\Container\Exceptions\ContainerThrowablePhalcon\Container\Exceptions\CannotExtendResolvedPhalcon\Container\Exceptions\CannotResolveParameterPhalcon\Container\Exceptions\CircularAliasFoundPhalcon\Container\Exceptions\EnvNotDefinedPhalcon\Container\Exceptions\FrozenDefinitionPhalcon\Container\Exceptions\InstanceNotFoundPhalcon\Container\Exceptions\InvalidExtenderPhalcon\Container\Exceptions\NoClassSetPhalcon\Container\Exceptions\NoFactorySetPhalcon\Container\Exceptions\NoProcessorFoundPhalcon\Container\Exceptions\ParameterNotFoundPhalcon\Container\Exceptions\ServiceNotFoundPhalcon\Container\Exceptions\ServiceNotRegistered
Uses Exception
Container\Exceptions\FrozenDefinition
ClassSource on GitHub\ExceptionPhalcon\Container\Exceptions\ExceptionPhalcon\Container\Exceptions\FrozenDefinition
Method Summary
Methods
__construct()
public function __construct( string $name );Definition is frozen
Container\Exceptions\InstanceNotFound
FinalSource on GitHub\ExceptionPhalcon\Container\Exceptions\ExceptionPhalcon\Container\Exceptions\InstanceNotFound
Method Summary
Methods
__construct()
public function __construct( string $name );Container\Exceptions\InvalidExtender
ClassSource on GitHub\ExceptionPhalcon\Container\Exceptions\ExceptionPhalcon\Container\Exceptions\InvalidExtender
Method Summary
Methods
__construct()
public function __construct(
string $service,
string $key
);Invalid extender (not callable)
Container\Exceptions\NoClassSet
ClassSource on GitHub\ExceptionPhalcon\Container\Exceptions\ExceptionPhalcon\Container\Exceptions\NoClassSet
Method Summary
Methods
__construct()
public function __construct( string $name );No set for service
Container\Exceptions\NoFactorySet
ClassSource on GitHub\ExceptionPhalcon\Container\Exceptions\ExceptionPhalcon\Container\Exceptions\NoFactorySet
Method Summary
Methods
__construct()
public function __construct( string $name );No factory for service
Container\Exceptions\NoProcessorFound
ClassSource on GitHub\ExceptionPhalcon\Container\Exceptions\ExceptionPhalcon\Container\Exceptions\NoProcessorFound
Method Summary
Methods
__construct()
public function __construct();No processor found
Container\Exceptions\ParameterNotFound
FinalSource on GitHub\ExceptionPhalcon\Container\Exceptions\ExceptionPhalcon\Container\Exceptions\ParameterNotFound
Method Summary
Methods
__construct()
public function __construct( string $name );Container\Exceptions\ServiceNotFound
ClassSource on GitHub\ExceptionPhalcon\Container\Exceptions\ExceptionPhalcon\Container\Exceptions\ServiceNotFound
Method Summary
Methods
__construct()
public function __construct( string $name );Service not found
Container\Exceptions\ServiceNotRegistered
ClassSource on GitHub\ExceptionPhalcon\Container\Exceptions\ExceptionPhalcon\Container\Exceptions\ServiceNotRegistered
Method Summary
Methods
__construct()
public function __construct( string $name );Service not registered
Container\Provider\Cli
ClassSource on GitHubPhalcon\Container\Provider\Cli- implementsPhalcon\Contracts\Container\Service\Provider
Uses Phalcon\Annotations\Adapter\Memory · Phalcon\Auth\Access\AccessLocator · Phalcon\Cli\Dispatcher · Phalcon\Cli\DispatcherInterface · Phalcon\Cli\Router · Phalcon\Cli\RouterInterface · Phalcon\Contracts\Container\Service\Collection · Phalcon\Contracts\Container\Service\Provider · Phalcon\Contracts\Encryption\Security\Security · Phalcon\Encryption\Security · Phalcon\Events\Manager · Phalcon\Events\ManagerInterface · Phalcon\Filter\Filter · Phalcon\Filter\FilterFactory · Phalcon\Filter\FilterInterface · Phalcon\Html\Escaper · Phalcon\Html\Escaper\EscaperInterface · Phalcon\Html\TagFactory · Phalcon\Mvc\Model\Manager · Phalcon\Mvc\Model\ManagerInterface · Phalcon\Mvc\Model\MetaDataInterface · Phalcon\Mvc\Model\MetaData\Memory · Phalcon\Mvc\Model\Transaction\Manager · Phalcon\Mvc\Model\Transaction\ManagerInterface · Phalcon\Storage\SerializerFactory · Phalcon\Support\HelperFactory · Phalcon\Support\Settings
Method Summary
Methods
provide()
public function provide( Collection $services ): void;Provider for commonly used CLI applications
Container\Provider\Web
ClassSource on GitHubPhalcon\Container\Provider\Web- implementsPhalcon\Contracts\Container\Service\Provider
Uses Phalcon\Annotations\Adapter\Memory · Phalcon\Assets\Manager · Phalcon\Auth\Access\AccessLocator · Phalcon\Contracts\Container\Service\Collection · Phalcon\Contracts\Container\Service\Provider · Phalcon\Contracts\Encryption\Security\Security · Phalcon\Encryption\Crypt · Phalcon\Encryption\Crypt\CryptInterface · Phalcon\Encryption\Security · Phalcon\Events\Manager · Phalcon\Events\ManagerInterface · Phalcon\Filter\Filter · Phalcon\Filter\FilterFactory · Phalcon\Filter\FilterInterface · Phalcon\Flash\Direct · Phalcon\Flash\Session · Phalcon\Html\Escaper · Phalcon\Html\Escaper\EscaperInterface · Phalcon\Html\TagFactory · Phalcon\Http\Request · Phalcon\Http\RequestInterface · Phalcon\Http\Response · Phalcon\Http\ResponseInterface · Phalcon\Http\Response\Cookies · Phalcon\Http\Response\CookiesInterface · Phalcon\Mvc\Dispatcher · Phalcon\Mvc\DispatcherInterface · Phalcon\Mvc\Model\Manager · Phalcon\Mvc\Model\ManagerInterface · Phalcon\Mvc\Model\MetaDataInterface · Phalcon\Mvc\Model\MetaData\Memory · Phalcon\Mvc\Model\Transaction\Manager · Phalcon\Mvc\Model\Transaction\ManagerInterface · Phalcon\Mvc\Router · Phalcon\Mvc\RouterInterface · Phalcon\Mvc\Url · Phalcon\Mvc\Url\UrlInterface · Phalcon\Storage\SerializerFactory · Phalcon\Support\HelperFactory · Phalcon\Support\Settings
Method Summary
Methods
provide()
public function provide( Collection $services ): void;Provider for commonly used Web applications
Container\Resolver\Lazy\ArrayValues
ClassSource on GitHubPhalcon\Container\Resolver\Lazy\LazyPhalcon\Container\Resolver\Lazy\ArrayValues- implements\ArrayAccess,\Countable,\IteratorAggregate
Uses ArrayAccess · ArrayIterator · Countable · IteratorAggregate
Method Summary
public__construct( array$values = [] )publicintcount()publicArrayIteratorgetIterator()publicvoidmerge( mixed$values )publicbooloffsetExists( mixed$offset )publicmixedoffsetGet( mixed$offset )publicvoidoffsetSet(mixed$offset,mixed$value)publicvoidoffsetUnset( mixed$offset )publicarrayresolve( object$ioc )Resolve to an array, where each element has itself been lazy-resolved.protectedmixedresolveValue(object$ioc,mixed$value)protectedarrayresolveValues(object$ioc,array$values)Properties
protectedarray<array-key, mixed>$values = []Methods
__construct()
public function __construct( array $values = [] );count()
public function count(): int;getIterator()
public function getIterator(): ArrayIterator;merge()
public function merge( mixed $values ): void;offsetExists()
public function offsetExists( mixed $offset ): bool;offsetGet()
public function offsetGet( mixed $offset ): mixed;offsetSet()
public function offsetSet(
mixed $offset,
mixed $value
): void;offsetUnset()
public function offsetUnset( mixed $offset ): void;resolve()
public function resolve( object $ioc ): array;Resolve to an array, where each element has itself been lazy-resolved.
resolveValue()
protected function resolveValue(
object $ioc,
mixed $value
): mixed;resolveValues()
protected function resolveValues(
object $ioc,
array $values
): array;Container\Resolver\Lazy\Call
ClassSource on GitHubPhalcon\Container\Resolver\Lazy\LazyPhalcon\Container\Resolver\Lazy\Call
Method Summary
Properties
protectedmixed$callableObjectMethods
__construct()
public function __construct( callable $callableObject );resolve()
public function resolve( object $ioc ): mixed;Resolve the callable
Container\Resolver\Lazy\CallableGet
ClassSource on GitHubPhalcon\Container\Resolver\Lazy\LazyPhalcon\Container\Resolver\Lazy\CallableGet
Method Summary
Properties
protectedstring|Lazy$idMethods
__construct()
public function __construct( mixed $id );resolve()
public function resolve( object $ioc ): mixed;Resolve to a closure on a get()
Container\Resolver\Lazy\CallableNew
ClassSource on GitHubPhalcon\Container\Resolver\Lazy\LazyPhalcon\Container\Resolver\Lazy\CallableNew
Method Summary
Properties
protectedstring|Lazy$idMethods
__construct()
public function __construct( mixed $id );resolve()
public function resolve( object $ioc ): mixed;Resolve to a closure on a new()
Container\Resolver\Lazy\CsEnv
ClassSource on GitHubPhalcon\Container\Resolver\Lazy\LazyPhalcon\Container\Resolver\Lazy\EnvPhalcon\Container\Resolver\Lazy\CsEnv
Uses Phalcon\Container\Exceptions\EnvNotDefined
Method Summary
Methods
resolve()
public function resolve( object $ioc ): array;Resolve the getEnv() from keys as a comma separated list
Container\Resolver\Lazy\Env
ClassSource on GitHubPhalcon\Container\Resolver\Lazy\LazyPhalcon\Container\Resolver\Lazy\Env
Uses Phalcon\Container\Exceptions\EnvNotDefined
Method Summary
public__construct(string$varname,string|null$vartype = null)publicmixedresolve( object$ioc )Resolve an environment variableprotectedmixedcast( mixed$value )Cast a value to the defined type (if any)protectedstringgetEnv()Return the env valueProperties
protectedstring$varnameprotectedstring|null$vartype = nullMethods
__construct()
public function __construct(
string $varname,
string|null $vartype = null
);resolve()
public function resolve( object $ioc ): mixed;Resolve an environment variable
cast()
protected function cast( mixed $value ): mixed;Cast a value to the defined type (if any)
getEnv()
protected function getEnv(): string;Return the env value
Container\Resolver\Lazy\EnvDefault
ClassSource on GitHubPhalcon\Container\Resolver\Lazy\LazyPhalcon\Container\Resolver\Lazy\EnvPhalcon\Container\Resolver\Lazy\EnvDefault
Uses Phalcon\Container\Exceptions\EnvNotDefined
Method Summary
public__construct(string$varname,mixed$defaultValue,string|null$vartype = null)publicmixedresolve( object$ioc )Resolve an environment variable, returning the default if not definedMethods
__construct()
public function __construct(
string $varname,
mixed $defaultValue,
string|null $vartype = null
);resolve()
public function resolve( object $ioc ): mixed;Resolve an environment variable, returning the default if not defined
Container\Resolver\Lazy\FunctionCall
ClassSource on GitHubPhalcon\Container\Resolver\Lazy\LazyPhalcon\Container\Resolver\Lazy\FunctionCall
Method Summary
public__construct(string$functionName,array$arguments)publicmixedresolve( object$ioc )Resolve a functionProperties
protectedarray<array-key, mixed>$argumentsprotectedstring$functionNameMethods
__construct()
public function __construct(
string $functionName,
array $arguments
);resolve()
public function resolve( object $ioc ): mixed;Resolve a function
Container\Resolver\Lazy\Get
ClassSource on GitHubPhalcon\Container\Resolver\Lazy\LazyPhalcon\Container\Resolver\Lazy\Get
Method Summary
Properties
protectedstring|Lazy$idMethods
__construct()
public function __construct( mixed $id );resolve()
public function resolve( object $ioc ): mixed;Resolve a shared instance
Container\Resolver\Lazy\GetCall
ClassSource on GitHubPhalcon\Container\Resolver\Lazy\LazyPhalcon\Container\Resolver\Lazy\GetCall
Method Summary
public__construct(mixed$id,string$method,array$arguments)publicmixedresolve( object$ioc )Resolve a shared instance method callProperties
protectedarray<array-key, mixed>$argumentsprotectedstring|Lazy$idprotectedstring$methodMethods
__construct()
public function __construct(
mixed $id,
string $method,
array $arguments
);resolve()
public function resolve( object $ioc ): mixed;Resolve a shared instance method call
Container\Resolver\Lazy\Lazy
AbstractSource on GitHubPhalcon\Container\Resolver\Lazy\Lazy- implementsPhalcon\Contracts\Container\Resolver\ResolvablePhalcon\Container\Resolver\Lazy\ArrayValuesPhalcon\Container\Resolver\Lazy\CallPhalcon\Container\Resolver\Lazy\CallableGetPhalcon\Container\Resolver\Lazy\CallableNewPhalcon\Container\Resolver\Lazy\EnvPhalcon\Container\Resolver\Lazy\FunctionCallPhalcon\Container\Resolver\Lazy\GetPhalcon\Container\Resolver\Lazy\GetCallPhalcon\Container\Resolver\Lazy\NewCallPhalcon\Container\Resolver\Lazy\NewInstancePhalcon\Container\Resolver\Lazy\StaticCall
Uses Phalcon\Contracts\Container\Resolver\Resolvable
Method Summary
publicmixed__invoke( object$ioc )publicmixedresolve( object$ioc )protectedmixedresolveArgument(object$ioc,mixed$argument)protectedarrayresolveArguments(object$ioc,array$arguments)Methods
__invoke()
public function __invoke( object $ioc ): mixed;resolve()
abstract public function resolve( object $ioc ): mixed;resolveArgument()
protected function resolveArgument(
object $ioc,
mixed $argument
): mixed;resolveArguments()
protected function resolveArguments(
object $ioc,
array $arguments
): array;Container\Resolver\Lazy\LazyFactory
ClassSource on GitHubPhalcon\Container\Resolver\Lazy\LazyFactory
Method Summary
publicArrayValuesarrayValues( array$values )publicCallcall( callable$callableObject )publicCallableGetcallableGet( string$id )publicCallableNewcallableNew( string$id )publicCsEnvcsEnv(string$name,string|null$type = null)publicEnvenv(string$name,string|null$type = null)publicEnvDefaultenvDefault(string$name,mixed$defaultValue,string|null$type = null)publicFunctionCallfunctionCall(string$functionName,array$args)publicGetget( string$id )publicGetCallgetCall(string$id,string$method,array$args)publicNewCallnewCall(string$id,string$method,array$args)publicNewInstancenewInstance( string$id )publicStaticCallstaticCall(string$className,string$method,array$args)Methods
arrayValues()
public static function arrayValues( array $values ): ArrayValues;call()
public static function call( callable $callableObject ): Call;callableGet()
public static function callableGet( string $id ): CallableGet;callableNew()
public static function callableNew( string $id ): CallableNew;csEnv()
public static function csEnv(
string $name,
string|null $type = null
): CsEnv;env()
public static function env(
string $name,
string|null $type = null
): Env;envDefault()
public static function envDefault(
string $name,
mixed $defaultValue,
string|null $type = null
): EnvDefault;functionCall()
public static function functionCall(
string $functionName,
array $args
): FunctionCall;get()
public static function get( string $id ): Get;getCall()
public static function getCall(
string $id,
string $method,
array $args
): GetCall;newCall()
public static function newCall(
string $id,
string $method,
array $args
): NewCall;newInstance()
public static function newInstance( string $id ): NewInstance;staticCall()
public static function staticCall(
string $className,
string $method,
array $args
): StaticCall;Container\Resolver\Lazy\NewCall
ClassSource on GitHubPhalcon\Container\Resolver\Lazy\LazyPhalcon\Container\Resolver\Lazy\NewCall
Method Summary
public__construct(mixed$id,string$method,array$arguments)publicmixedresolve( object$ioc )Resolve a new instance method callProperties
protectedarray<array-key, mixed>$argumentsprotectedstring|Lazy$idprotectedstring$methodMethods
__construct()
public function __construct(
mixed $id,
string $method,
array $arguments
);resolve()
public function resolve( object $ioc ): mixed;Resolve a new instance method call
Container\Resolver\Lazy\NewInstance
ClassSource on GitHubPhalcon\Container\Resolver\Lazy\LazyPhalcon\Container\Resolver\Lazy\NewInstance
Method Summary
Properties
protectedstring|Lazy$idMethods
__construct()
public function __construct( mixed $id );resolve()
public function resolve( object $ioc ): mixed;Resolve a new instance
Container\Resolver\Lazy\StaticCall
ClassSource on GitHubPhalcon\Container\Resolver\Lazy\LazyPhalcon\Container\Resolver\Lazy\StaticCall
Method Summary
public__construct(mixed$className,string$method,array$arguments)publicmixedresolve( object$ioc )Resolve a static method callProperties
protectedarray<array-key, mixed>$argumentsprotectedstring|Lazy$classNameprotectedstring$methodMethods
__construct()
public function __construct(
mixed $className,
string $method,
array $arguments
);resolve()
public function resolve( object $ioc ): mixed;Resolve a static method call
Container\Resolver\Resolver
ClassSource on GitHubPhalcon\Container\Resolver\Resolver- implementsPhalcon\Contracts\Container\Resolver\ResolverService
Uses Closure · Phalcon\Container\Exceptions\CannotResolveParameter · Phalcon\Container\Resolver\Lazy\Lazy · Phalcon\Contracts\Container\Resolver\ResolverService · ReflectionClass · ReflectionException · ReflectionFunction · ReflectionMethod · ReflectionNamedType · ReflectionParameter · ReflectionType
Method Summary
publicboolisResolvableClass( string$className )Is this a resolvable class?publicmixedresolveCall(object$ioc,callable$callableObject,array$arguments)Resolve a callpublicobjectresolveClass(object$ioc,string$className,array$arguments)Resolve a classpublicvoidresolveMethod(object$ioc,ReflectionMethod$method,object$instance)Resolve a methodpublicmixedresolveParameter(object$ioc,ReflectionParameter$parameter)Resolve parameterspublicarrayresolveParameters(object$ioc,array$parameters,array$arguments)publicmixedresolveType(object$ioc,mixed$type)type is ReflectionTypeMethods
isResolvableClass()
public function isResolvableClass( string $className ): bool;Is this a resolvable class?
resolveCall()
public function resolveCall(
object $ioc,
callable $callableObject,
array $arguments
): mixed;Resolve a call
resolveClass()
public function resolveClass(
object $ioc,
string $className,
array $arguments
): object;Resolve a class
resolveMethod()
public function resolveMethod(
object $ioc,
ReflectionMethod $method,
object $instance
): void;Resolve a method
resolveParameter()
public function resolveParameter(
object $ioc,
ReflectionParameter $parameter
): mixed;Resolve parameters
resolveParameters()
public function resolveParameters(
object $ioc,
array $parameters,
array $arguments
): array;resolveType()
public function resolveType(
object $ioc,
mixed $type
): mixed;type is ReflectionType