示例#1
0
 /**
  * Constructor
  *
  * @author Art <*****@*****.**>
  *
  * @param array $cfg Your custom configuration parameters
  */
 public function __construct(array $cfg = [])
 {
     parent::__construct(self::$default);
     foreach ($cfg as $k => $v) {
         //Perform all the checks while adding
         $this->set($k, $v);
     }
 }
示例#2
0
 /**
  * Constructor
  *
  * @author Art <*****@*****.**>
  *
  * @param array $defaults The default config of extending classes
  * @param array $cfg      Default configuration overrides
  */
 public function __construct(array $defaults = [], array $cfg = [])
 {
     self::setDefaults();
     parent::__construct(array_merge(self::$defaults, $defaults), $cfg);
 }
示例#3
0
 /**
  * Constructor
  *
  * @author Art <*****@*****.**>
  *
  * @param array $cfg Your custom config overrides
  */
 public function __construct(array $cfg = [])
 {
     self::setDefaultConfig();
     parent::__construct(self::$defaults, $cfg);
 }