class Feature extends Base

Standard feature class.

Properties

protected string $_name from Base
protected $_classes from Base
protected array $_methods from Base

Methods

string
getName()

Returns the name.

from Base
boolean
setName(string $name)

Sets the name.

from Base
array
getClasses()

Returns all declared classes.

from Base
addMethod(IMethod $method)

Adds a new method to the feature.

from Base
delMethod(string $name)

Deletes a method from a feature by name.

from Base
boolean
existsMethod(string $name)

Returns a boolean if a method exists in the _methods array.

from Base
getMethod(string $name)

Returns a method of a feature if it exists.

from Base

Details

in Base at line 30
final string getName()

Returns the name.

Return Value

string

in Base at line 41
final boolean setName(string $name)

Sets the name.

Parameters

string $name

Return Value

boolean

in Base at line 57
array getClasses()

Returns all declared classes.

We need this way, because the autoloader will try to include the class file if we use "class_exists" or similar functions.

Return Value

array

in Base at line 36
addMethod(IMethod $method)

Adds a new method to the feature.

Parameters

IMethod $method A method object.

Exceptions

Method If the method already exists we need to raise a exception to inform the calling part.

in Base at line 51
delMethod(string $name)

Deletes a method from a feature by name.

Parameters

string $name The method name inside of the _methods array.

Exceptions

Method If the method doesn't exist we need to raise a exception to inform the calling part.

in Base at line 66
boolean existsMethod(string $name)

Returns a boolean if a method exists in the _methods array.

Parameters

string $name The name of the method we're looking for.

Return Value

boolean If the method already exists in our _methods array TRUE otherwhise FALSE.

in Base at line 79
IMethod getMethod(string $name)

Returns a method of a feature if it exists.

Parameters

string $name The name of your requested method.

Return Value

IMethod The requested method.

Exceptions

Method If the method is not set we need to raise a exception to inform the calling part.