/**
  * Object constructor
  * @param Library\ObjectConfig $config
  */
 public function __construct(Library\ObjectConfig $config = null)
 {
     parent::__construct($config);
     $this->_cache_chain = $this->getObject('com://oligriffiths/router.command.chain', array('break_condition' => true));
     $this->_rule_chain = $this->getObject('com://oligriffiths/router.command.chain', array('break_condition' => true));
     //Add the caches to the command chain
     foreach ($config->caches->toArray() as $cache => $options) {
         $this->addCache($cache, $options);
     }
     //Add the rules to the command chain
     foreach ($config->rules->toArray() as $rule => $options) {
         if (is_string($options)) {
             $rule = $options;
             $options = array();
         }
         $this->addRule($rule, $options);
     }
 }
 /**
  * @param Library\ObjectConfig $config
  */
 public function __construct(Library\ObjectConfig $config = null)
 {
     parent::__construct($config);
     $this->_root = $config->root;
 }