Exemplo n.º 1
0
 /**
  * Invokes the plugin specific code.
  *
  * @throws PIECE_UNITY_ERROR_INVALID_CONFIGURATION
  */
 function invoke()
 {
     $configDirectory = $this->_getConfiguration('configDirectory');
     if (is_null($configDirectory)) {
         Piece_Unity_Error::push(PIECE_UNITY_ERROR_INVALID_CONFIGURATION, "The value of the configuration point [ configDirectory ] on the plug-in [ {$this->_name} ] is required.");
         return;
     }
     $cacheDirectory = $this->_getConfiguration('cacheDirectory');
     if (is_null($cacheDirectory)) {
         Piece_Unity_Error::push(PIECE_UNITY_ERROR_INVALID_CONFIGURATION, "The value of the configuration point [ cacheDirectory ] on the plug-in [ {$this->_name} ] is required.");
         return;
     }
     $mapperConfigDirectory = $this->_getConfiguration('mapperConfigDirectory');
     if (is_null($mapperConfigDirectory)) {
         Piece_Unity_Error::push(PIECE_UNITY_ERROR_INVALID_CONFIGURATION, "The value of the configuration point [ mapperConfigDirectory ] on the plug-in [ {$this->_name} ] is required.");
         return;
     }
     Piece_ORM::configure($configDirectory, $cacheDirectory, $mapperConfigDirectory);
 }