Ejemplo n.º 1
0
 /**
  * Check if specified version of resource exists. If not - exception is thrown.
  *
  * @param string $resourceName
  * @param string $resourceVersion
  * @throws RuntimeException When resource does not exist.
  */
 protected function _checkIfResourceVersionExists($resourceName, $resourceVersion)
 {
     if (!isset($this->_data['resources'][$resourceName])) {
         throw new RuntimeException($this->_helper->__('Unknown resource "%s".', $resourceName));
     }
     if (!isset($this->_data['resources'][$resourceName]['versions'][$resourceVersion])) {
         throw new RuntimeException($this->_helper->__('Unknown version "%s" for resource "%s".', $resourceVersion, $resourceName));
     }
 }