Table Of Contents

Previous topic

Class Phalcon\DI\Injectable

Next topic

Class Phalcon\Db

This Page

Class Phalcon\DI\Service

implements Phalcon\DI\ServiceInterface

Represents individually a service in the services container

Methods

public __construct (string $name, mixed $definition, boolean $shared)

public getName ()

Returns the service’s name

public setShared (boolean $shared)

Sets if the service is shared or not

public boolean isShared ()

Check whether the service is shared or not

public setDefinition (mixed $definition)

Set the service definition

public mixed getDefinition ()

Returns the service definition

public mixed resolve (unknown $parameters)

Resolves the service

public static Phalcon\DI\Service __set_state (array $attributes)

Restore the interal state of a service