public static function getInstance(Zend_Config $config) { $keys = $config->keys instanceof Zend_Config ? $config->keys->toArray() : array(); $reqs = $config->reqs instanceof Zend_Config ? $config->reqs->toArray() : array(); $defs = $config->defaults instanceof Zend_Config ? $config->defaults->toArray() : array(); $route = new self($config->route, $defs, $reqs); $route->setActionKey(isset($keys['action']) ? $keys['action'] : $route->getActionKey())->setModuleKey(isset($keys['module']) ? $keys['module'] : $route->getModuleKey())->setRestMethodKey(isset($keys['method']) ? $keys['method'] : $route->getRestMethodKey()); return $route; }