Esempio n. 1
0
 /**
  * 
  * @param string $eventName
  * @param mixed $callable
  * @param string|null $method
  */
 public function __construct($eventName, $callable, $method = null)
 {
     $this->setEventName($eventName);
     $this->setCallable($callable);
     $this->setMethod($method);
     parent::__construct();
 }
Esempio n. 2
0
 /**
  * Get value (will call getter )
  * @param string $key
  * @param mixed $defaultValue
  * @return mixed
  * @throws \InvalidArgumentException
  */
 public function get($key, $defaultValue = null)
 {
     $key = $this->_getKey($key);
     if (!is_string($key)) {
         throw new \InvalidArgumentException("key must be a string");
     }
     if (!$key) {
         return null;
     }
     return parent::get($key, $defaultValue);
 }