Commit 24e264ac authored by jwage's avatar jwage

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

parent d5c91081
...@@ -39,7 +39,7 @@ class Doctrine_Compiler ...@@ -39,7 +39,7 @@ class Doctrine_Compiler
* cases dozens of files) can improve performance by an order of magnitude * cases dozens of files) can improve performance by an order of magnitude
* *
* @throws Doctrine_Compiler_Exception if something went wrong during the compile operation * @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()) public static function compile($target = null, $includedDrivers = array())
{ {
...@@ -133,5 +133,7 @@ class Doctrine_Compiler ...@@ -133,5 +133,7 @@ class Doctrine_Compiler
fwrite($fp, $stripped); fwrite($fp, $stripped);
fclose($fp); fclose($fp);
return $target;
} }
} }
...@@ -39,8 +39,8 @@ class Doctrine_Task_Compile extends Doctrine_Task ...@@ -39,8 +39,8 @@ class Doctrine_Task_Compile extends Doctrine_Task
public function execute() public function execute()
{ {
Doctrine::compile($this->getArgument('compiled_path'), $this->getArgument('drivers', array())); $compiledPath = Doctrine_Compiler::compile($this->getArgument('compiled_path'), $this->getArgument('drivers', array()));
$this->notify('Compiled Doctrine successfully to: ' . $this->getArgument('compiled_path')); $this->notify('Compiled Doctrine successfully to: ' . $compiledPath);
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment