PHP Class bitExpert\Disco\Annotations\Bean

Exibir arquivo Open project: bitexpert/disco Class Usage Examples

Protected Properties

Property Type Description
$alias string
$lazy boolean
$scope integer
$singleton boolean

Public Methods

Method Description
__construct ( array $attributes = [] ) Creates a new {@link \bitExpert\Disco\Annotations\Bean}.
getAlias ( ) : string Returns the alias for the bean instance. Returns an empty string when no alias was set.
isLazy ( ) : boolean Returns true if the Bean should be a lazily instantiated.
isRequest ( ) : boolean Returns true if the current scope if of type Scope::REQUEST.
isSession ( ) : boolean Returns true if the current scope if of type Scope::SESSION.
isSingleton ( ) : boolean Returns true if the Bean should be a singleton instance.

Protected Methods

Method Description
parseBooleanValue ( string | boolean $value ) : boolean Helper function to cast a string value to a boolean representation.

Method Details

__construct() public method

Creates a new {@link \bitExpert\Disco\Annotations\Bean}.
public __construct ( array $attributes = [] )
$attributes array

getAlias() public method

Returns the alias for the bean instance. Returns an empty string when no alias was set.
public getAlias ( ) : string
return string

isLazy() public method

Returns true if the Bean should be a lazily instantiated.
public isLazy ( ) : boolean
return boolean

isRequest() public method

Returns true if the current scope if of type Scope::REQUEST.
public isRequest ( ) : boolean
return boolean

isSession() public method

Returns true if the current scope if of type Scope::SESSION.
public isSession ( ) : boolean
return boolean

isSingleton() public method

Returns true if the Bean should be a singleton instance.
public isSingleton ( ) : boolean
return boolean

parseBooleanValue() protected method

Helper function to cast a string value to a boolean representation.
protected parseBooleanValue ( string | boolean $value ) : boolean
$value string | boolean
return boolean

Property Details

$alias protected_oe property

protected string $alias
return string

$lazy protected_oe property

protected bool $lazy
return boolean

$scope protected_oe property

protected int $scope
return integer

$singleton protected_oe property

protected bool $singleton
return boolean