Definition::getArgument()

mixed getArgument(int $index) Gets an argument to pass to the service constructor/factory method. Parameters int $index Return Value mixed The argument value Exceptions OutOfBoundsException When the argument does not exist

Definition::getAutowiringTypes()

string[] getAutowiringTypes() Gets autowiring types that will default to this definition. Return Value string[]

Definition::addArgument()

Definition addArgument(mixed $argument) Adds an argument to pass to the service constructor/factory method. Parameters mixed $argument An argument Return Value Definition The current instance

Definition::addMethodCall()

Definition addMethodCall(string $method, array $arguments = array()) Adds a method to call after service initialization. Parameters string $method The method name to call array $arguments An array of arguments to pass to the method call Return Value Definition The current instance Exceptions InvalidArgumentException on empty $method param

Definition::addAutowiringType()

Definition addAutowiringType(string $type) Adds a type that will default to this definition. Parameters string $type Return Value Definition The current instance

Definition::addTag()

Definition addTag(string $name, array $attributes = array()) Adds a tag for this definition. Parameters string $name The tag name array $attributes An array of attributes Return Value Definition The current instance

Definition

class Definition Definition represents a service definition. Methods __construct(string|null $class = null, array $arguments = array()) Definition setFactory(string|array $factory) Sets a factory. string|array getFactory() Gets the factory. Definition setDecoratedService(null|string $id, null|string $renamedId = null, int $priority) Sets the service that this service is decorating. null|array getDecoratedService() Gets the service that decorates this service. Defi

DefaultValueResolver::resolve()

Generator resolve(Request $request, ArgumentMetadata $argument) Returns the possible value(s). Parameters Request $request ArgumentMetadata $argument Return Value Generator

DefaultValueResolver::supports()

bool supports(Request $request, ArgumentMetadata $argument) Whether this resolver can resolve the value for the given ArgumentMetadata. Parameters Request $request ArgumentMetadata $argument Return Value bool

DefaultTranslator deprecated::trans()

string trans(string $id, array $parameters = array(), string|null $domain = null, string|null $locale = null) Interpolates the given message. Parameters are replaced in the message in the same manner that {@link strtr()} uses. Example usage: $translator = new DefaultTranslator(); echo $translator->trans( 'This is a {{ var }}.', array('{{ var }}' => 'donkey') ); // -> This is a donkey. Parameters string $id The message id (may also be an object that can be ca