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]);
Afficher le fichier
Open project: bluzphp/framework
Protected Properties
Свойство |
Type |
Description |
|
$options |
|
options store |
|
Méthodes publiques
Méthodes protégées
Méthode |
Description |
|
initOptions ( ) : void |
Check and initialize options in package |
|
Private Methods
Method Details
getOption()
public méthode
getOptions()
public méthode
initOptions()
protected méthode
Check and initialize options in package
setOption()
public méthode
Set option by key over setter
setOptions()
public méthode
Requirements
- options must be a array
- options can be null
Property Details
$options protected_oe property