Fixed compiler task and made Compiler return the path compiled file was written to.
This commit is contained in:
parent
d5c91081e0
commit
24e264ac99
@ -39,7 +39,7 @@ class Doctrine_Compiler
|
||||
* cases dozens of files) can improve performance by an order of magnitude
|
||||
*
|
||||
* @throws Doctrine_Compiler_Exception if something went wrong during the compile operation
|
||||
* @return void
|
||||
* @return $target Path the compiled file was written to
|
||||
*/
|
||||
public static function compile($target = null, $includedDrivers = array())
|
||||
{
|
||||
@ -133,5 +133,7 @@ class Doctrine_Compiler
|
||||
|
||||
fwrite($fp, $stripped);
|
||||
fclose($fp);
|
||||
|
||||
return $target;
|
||||
}
|
||||
}
|
||||
|
@ -39,8 +39,8 @@ class Doctrine_Task_Compile extends Doctrine_Task
|
||||
|
||||
public function execute()
|
||||
{
|
||||
Doctrine::compile($this->getArgument('compiled_path'), $this->getArgument('drivers', array()));
|
||||
|
||||
$this->notify('Compiled Doctrine successfully to: ' . $this->getArgument('compiled_path'));
|
||||
$compiledPath = Doctrine_Compiler::compile($this->getArgument('compiled_path'), $this->getArgument('drivers', array()));
|
||||
|
||||
$this->notify('Compiled Doctrine successfully to: ' . $compiledPath);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user