1
0
mirror of synced 2024-12-13 06:46:03 +03:00

Fixed compiler task and made Compiler return the path compiled file was written to.

This commit is contained in:
jwage 2008-01-22 22:08:08 +00:00
parent d5c91081e0
commit 24e264ac99
2 changed files with 6 additions and 4 deletions

View File

@ -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;
}
}

View File

@ -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);
}
}