Esempio n. 1
0
 /**
  * The Handler Constructor
  * 
  * This takes a destination (presumably an object, where our
  * code is going to GO [forward]), a function/method name and some
  * options
  * 
  * @param object $destination The destination object
  * @param string $function The function/method name to be called
  * @param string $namespace The namespace definition of the destination
  * @param int $priority The priority 
  * 
  */
 public function __construct($destination, $function, $namespace, $priority = self::DEFAULT_PRIORITY, $options = array())
 {
     if (is_array($options)) {
         $options = array_change_key_case($options);
     }
     $options = array_merge(array('strict' => true), $options);
     $this->configure($options);
     parent::__construct($this, $priority, $options);
     $this->object = $destination;
     $this->function = $function;
     $this->namespace = $namespace;
     $restrictions = new Types\Restrictions(array(Type::BASIC_NULL, Type::TYPED_OBJECT), array('Falcraft\\Patterns\\Resource\\PublisherInterface'), array('strict' => true));
     $this->subject = new Types\RestrictedSet(array(), $restrictions, array('strict' => $this->conf->strict));
 }