Copied!

This definition extends another definition.

Cloneable Instantiable
Properties
public int Symfony\Component\DependencyInjection\Definition :: $decorationOnInvalid
 
  • internal Used to store the behavior to follow when using service decoration and the decorated service is invalid
public string Symfony\Component\DependencyInjection\Definition :: $innerServiceId
 
  • internal Used to store the name of the inner id when using service decoration together with autowiring
Methods
public __construct ( string $parent )
 
  • param string $parent The id of Definition instance to decorate
public Symfony\Component\DependencyInjection\Definition :: addArgument ( ? mixed $argument ) : static
 

Adds an argument to pass to the service constructor/factory method.

  • return $this
public Symfony\Component\DependencyInjection\Definition :: addError ( Closure | Symfony\Component\DependencyInjection\Definition | string $error ) : static
 

Add an error that occurred when building this Definition.

  • return $this
public Symfony\Component\DependencyInjection\Definition :: addMethodCall ( string $method , array $arguments = [ ] , bool $returnsClone = false ) : static
 

Adds a method to call after service initialization.

  • param string $method The method name to call
  • param array $arguments An array of arguments to pass to the method call
  • param bool $returnsClone Whether the call returns the service instance or not
  • return $this
  • throws InvalidArgumentException on empty $method param
public Symfony\Component\DependencyInjection\Definition :: addTag ( string $name , array $attributes = [ ] ) : static
 

Adds a tag for this definition.

  • return $this
public Symfony\Component\DependencyInjection\Definition :: clearTag ( string $name ) : static
 

Clears all tags for a given name.

  • return $this
public Symfony\Component\DependencyInjection\Definition :: clearTags () : static
 

Clears the tags for this definition.

  • return $this
public getArgument ( string | int $index ) : ? mixed
 

Gets an argument to pass to the service constructor/factory method.

If replaceArgument() has been used to replace an argument, this method
will return the replacement value.

  • throws OutOfBoundsException When the argument does not exist
public Symfony\Component\DependencyInjection\Definition :: getArguments () : array
 

Gets the arguments to pass to the service constructor/factory method.

public Symfony\Component\DependencyInjection\Definition :: getBindings () : array
 

Gets bindings.

  • return BoundArgument []
public Symfony\Component\DependencyInjection\Definition :: getChanges () : array
 

Returns all changes tracked for the Definition object.

public Symfony\Component\DependencyInjection\Definition :: getClass () : ? string
 

Gets the service class.

public Symfony\Component\DependencyInjection\Definition :: getConfigurator () : array | string | null
 

Gets the configurator to call after the service is fully initialized.

public Symfony\Component\DependencyInjection\Definition :: getDecoratedService () : ? array
 

Gets the service that this service is decorating.

  • return array | null An array composed of the decorated service id, the new id for it and the priority of decoration, null if no service is decorated
public Symfony\Component\DependencyInjection\Definition :: getDeprecation ( string $id ) : array
 
  • param string $id Service id relying on this definition
public Symfony\Component\DependencyInjection\Definition :: getErrors () : array
 

Returns any errors that occurred while building this Definition.

public Symfony\Component\DependencyInjection\Definition :: getFactory () : array | string | null
 

Gets the factory.

  • return string | array | null The PHP function or an array containing a class/Reference and a method to call
public Symfony\Component\DependencyInjection\Definition :: getFile () : ? string
 

Gets the file to require before creating the service.

public Symfony\Component\DependencyInjection\Definition :: getInstanceofConditionals () : array
 

Gets the definition templates to conditionally apply on the current definition, keyed by parent interface/class.

public Symfony\Component\DependencyInjection\Definition :: getMethodCalls () : array
 

Gets the methods to call after service initialization.

public getParent () : string
 

Returns the Definition to inherit from.

public Symfony\Component\DependencyInjection\Definition :: getProperties () : array
 

Gets the properties to define when creating the service.

public Symfony\Component\DependencyInjection\Definition :: getTag ( string $name ) : array
 

Gets a tag by name.

public Symfony\Component\DependencyInjection\Definition :: getTags () : array
 

Returns all tags.

public Symfony\Component\DependencyInjection\Definition :: hasErrors () : bool
public Symfony\Component\DependencyInjection\Definition :: hasMethodCall ( string $method ) : bool
 

Check if the current definition has a given method to call after service initialization.

public Symfony\Component\DependencyInjection\Definition :: hasTag ( string $name ) : bool
 

Whether this definition has a tag with the given name.

public Symfony\Component\DependencyInjection\Definition :: isAbstract () : bool
 

Whether this definition is abstract, that means it merely serves as a
template for other definitions.

public Symfony\Component\DependencyInjection\Definition :: isAutoconfigured () : bool
public Symfony\Component\DependencyInjection\Definition :: isAutowired () : bool
 

Is the definition autowired?

public Symfony\Component\DependencyInjection\Definition :: isDeprecated () : bool
 

Whether this definition is deprecated, that means it should not be called
anymore.

public Symfony\Component\DependencyInjection\Definition :: isLazy () : bool
 

Whether this service is lazy.

public Symfony\Component\DependencyInjection\Definition :: isPrivate () : bool
 

Whether this service is private.

public Symfony\Component\DependencyInjection\Definition :: isPublic () : bool
 

Whether this service is public facing.

public Symfony\Component\DependencyInjection\Definition :: isShared () : bool
 

Whether this service is shared.

public Symfony\Component\DependencyInjection\Definition :: isSynthetic () : bool
 

Whether this definition is synthetic, that is not constructed by the
container, but dynamically injected.

public Symfony\Component\DependencyInjection\Definition :: removeMethodCall ( string $method ) : static
 

Removes a method to call after service initialization.

  • return $this
public replaceArgument ( string | int $index , ? mixed $value ) : static
 

You should always use this method when overwriting existing arguments
of the parent definition.

If you directly call setArguments() keep in mind that you must follow
certain conventions when you want to overwrite the arguments of the
parent definition, otherwise your arguments will only be appended.

  • return $this
  • throws OutOfBoundsException When the replaced argument does not exist
  • throws InvalidArgumentException when $index isn't an integer
public Symfony\Component\DependencyInjection\Definition :: setAbstract ( bool $boolean ) : static
 

Whether this definition is abstract, that means it merely serves as a
template for other definitions.

  • return $this
public Symfony\Component\DependencyInjection\Definition :: setArgument ( string | int $key , ? mixed $value ) : static
 

Sets a specific argument.

  • return $this
public Symfony\Component\DependencyInjection\Definition :: setArguments ( array $arguments ) : static
 

Sets the arguments to pass to the service constructor/factory method.

  • return $this
public Symfony\Component\DependencyInjection\Definition :: setAutoconfigured ( bool $autoconfigured ) : static
 

Sets whether or not instanceof conditionals should be prepended with a global set.

  • return $this
public Symfony\Component\DependencyInjection\Definition :: setAutowired ( bool $autowired ) : static
 

Enables/disables autowiring.

  • return $this
public Symfony\Component\DependencyInjection\Definition :: setBindings ( array $bindings ) : static
 

Sets bindings.

Bindings map $named or FQCN arguments to values that should be
injected in the matching parameters (of the constructor, of methods
called and of controller actions).

  • return $this
public Symfony\Component\DependencyInjection\Definition :: setChanges ( array $changes ) : static
 

Sets the tracked changes for the Definition object.

  • param array $changes An array of changes for this Definition
  • return $this
public Symfony\Component\DependencyInjection\Definition :: setClass ( ? string $class ) : static
 

Sets the service class.

  • return $this
public Symfony\Component\DependencyInjection\Definition :: setConfigurator ( Symfony\Component\DependencyInjection\Reference | array | string | null $configurator ) : static
 

Sets a configurator to call after the service is fully initialized.

public Symfony\Component\DependencyInjection\Definition :: setDecoratedService ( ? string $id , ? string $renamedId = NULL , int $priority = 0 , int $invalidBehavior = 1 Symfony\Component\DependencyInjection\ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) : static
 

Sets the service that this service is decorating.

  • param string | null $id The decorated service id, use null to remove decoration
  • param string | null $renamedId The new decorated service id
  • return $this
  • throws InvalidArgumentException in case the decorated service id and the new decorated service id are equals
public Symfony\Component\DependencyInjection\Definition :: setDeprecated ( string $package , string $version , string $message ) : static
 

Whether this definition is deprecated, that means it should not be called
anymore.

  • param string $package The name of the composer package that is triggering the deprecation
  • param string $version The version of the package that introduced the deprecation
  • param string $message The deprecation message to use
  • return $this
  • throws InvalidArgumentException when the message template is invalid
public Symfony\Component\DependencyInjection\Definition :: setFactory ( Symfony\Component\DependencyInjection\Reference | array | string | null $factory ) : static
 

Sets a factory.

public Symfony\Component\DependencyInjection\Definition :: setFile ( ? string $file ) : static
 

Sets a file to require before creating the service.

  • return $this
public Symfony\Component\DependencyInjection\Definition :: setInstanceofConditionals ( array $instanceof ) : static
 

Sets the definition templates to conditionally apply on the current definition, keyed by parent interface/class.

public Symfony\Component\DependencyInjection\Definition :: setLazy ( bool $lazy ) : static
 

Sets the lazy flag of this service.

  • return $this
public Symfony\Component\DependencyInjection\Definition :: setMethodCalls ( array $calls = [ ] ) : static
 

Sets the methods to call after service initialization.

  • return $this
public setParent ( string $parent ) : static
 

Sets the Definition to inherit from.

  • return $this
public Symfony\Component\DependencyInjection\Definition :: setProperties ( array $properties ) : static
 

Sets the properties to define when creating the service.

  • return $this
public Symfony\Component\DependencyInjection\Definition :: setProperty ( string $name , ? mixed $value ) : static
 

Sets a specific property.

  • return $this
public Symfony\Component\DependencyInjection\Definition :: setPublic ( bool $boolean ) : static
 

Sets the visibility of this service.

  • return $this
public Symfony\Component\DependencyInjection\Definition :: setShared ( bool $shared ) : static
 

Sets if the service must be shared or not.

  • return $this
public Symfony\Component\DependencyInjection\Definition :: setSynthetic ( bool $boolean ) : static
 

Sets whether this definition is synthetic, that is not constructed by the
container, but dynamically injected.

  • return $this
public Symfony\Component\DependencyInjection\Definition :: setTags ( array $tags ) : static
 

Sets tags for this definition.

  • return $this
Properties
protected Symfony\Component\DependencyInjection\Definition :: $arguments
Properties
private string $parent
© 2022 Bruce Wells
Search Namespaces \ Classes
Configuration