PHP Trait Bluz\Common\Options
Example of usage
class Foo
{
use \Bluz\Common\Options;
protected $bar = '';
protected $baz = '';
public function setBar($value)
{
$this->bar = $value;
}
public function setBaz($value)
{
$this->baz = $value;
}
}
$Foo = new Foo(['bar'=>123, 'baz'=>456]);
Datei anzeigen
Open project: bluzphp/framework
Protected Properties
Property |
Type |
Description |
|
$options |
|
options store |
|
Public Methods
Protected Methods
Method |
Description |
|
initOptions ( ) : void |
Check and initialize options in package |
|
Private Methods
Method Details
getOption()
public method
getOptions()
public method
initOptions()
protected method
Check and initialize options in package
setOption()
public method
Set option by key over setter
setOptions()
public method
Requirements
- options must be a array
- options can be null
Property Details
$options protected_oe property