class ConfigurationProperty (View source)

Injection property as used in a Object Configuration

Constants

PROPERTY_TYPES_STRAIGHTVALUE

PROPERTY_TYPES_OBJECT

PROPERTY_TYPES_CONFIGURATION

PROPERTY_TYPES_CACHE

Properties

protected string $name
protected mixed $value
protected int $type
protected Configuration $objectConfiguration

If specified, this configuration is used for instantiating / retrieving an property of type object

protected int $autowiring
protected bool $lazyLoading

Should this property be lazy loaded

Methods

__construct(string $name, mixed $value, int $type = self::PROPERTY_TYPES_STRAIGHTVALUE, Configuration $objectConfiguration = null, bool $lazyLoading = true)

Constructor - sets the name, type and value of the property

void
set(string $name, mixed $value, int $type = self::PROPERTY_TYPES_STRAIGHTVALUE, Configuration $objectConfiguration = null, bool $lazyLoading = true)

Sets the name, type and value of the property

string
getName()

Returns the name of the property

mixed
getValue()

Returns the value of the property

int
getType()

Returns the type of the property

getObjectConfiguration()

Returns the (optional) object configuration which may be defined for properties of type OBJECT

void
setAutowiring(int $autowiring)

Sets autowiring for this property

int
getAutowiring()

Returns the autowiring mode for this property

bool
isLazyLoading()

If this property can be lazy loaded if the dependency injection mechanism offers that.

Details

__construct(string $name, mixed $value, int $type = self::PROPERTY_TYPES_STRAIGHTVALUE, Configuration $objectConfiguration = null, bool $lazyLoading = true)

Constructor - sets the name, type and value of the property

Parameters

string $name

Name of the property

mixed $value

Value of the property

int $type

Type of the property - one of the PROPERTYTYPE* constants

Configuration $objectConfiguration

If $type is OBJECT, a custom object configuration may be specified

bool $lazyLoading

void set(string $name, mixed $value, int $type = self::PROPERTY_TYPES_STRAIGHTVALUE, Configuration $objectConfiguration = null, bool $lazyLoading = true)

Sets the name, type and value of the property

Parameters

string $name

Name of the property

mixed $value

Value of the property

int $type

Type of the property - one of the PROPERTYTYPE* constants

Configuration $objectConfiguration

If $type is OBJECT, a custom object configuration may be specified

bool $lazyLoading

Return Value

void

string getName()

Returns the name of the property

Return Value

string

Name of the property

mixed getValue()

Returns the value of the property

Return Value

mixed

Value of the property

int getType()

Returns the type of the property

Return Value

int

Type of the property

Configuration|null getObjectConfiguration()

Returns the (optional) object configuration which may be defined for properties of type OBJECT

Return Value

Configuration|null

The object configuration or NULL

void setAutowiring(int $autowiring)

Sets autowiring for this property

Parameters

int $autowiring

One of the Configuration::AUTOWIRINGMODE* constants

Return Value

void

int getAutowiring()

Returns the autowiring mode for this property

Return Value

int

Value of one of the Configuration::AUTOWIRINGMODE* constants

bool isLazyLoading()

If this property can be lazy loaded if the dependency injection mechanism offers that.

Return Value

bool