コード例 #1
0
 /**
  * @return bool
  */
 protected function _validateData()
 {
     $sourceClassName = $this->getSourceClassName();
     $resultClassName = $this->_getResultClassName();
     $resultDir = $this->_ioObject->getResultFileDirectory($resultClassName);
     if (!$this->definedClasses->isClassLoadable($sourceClassName)) {
         $this->_addError('Source class ' . $sourceClassName . ' doesn\'t exist.');
         return false;
     } elseif (!$this->_ioObject->makeResultFileDirectory($resultClassName) && !$this->_ioObject->fileExists($resultDir)) {
         $this->_addError('Can\'t create directory ' . $resultDir . '.');
         return false;
     }
     return true;
 }