Commit 6f5ae1c3 authored by zYne's avatar zYne

--no commit message

--no commit message
parent f3867dbf
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
class Doctrine_Search class Doctrine_Search
{ {
protected $_options = array('generateFiles' => false, protected $_options = array('generateFiles' => false,
'className' => '%CLASS%Index'); 'className' => '%CLASS%Index',
'generatePath' => false);
public function __construct(array $options) public function __construct(array $options)
...@@ -195,19 +196,19 @@ class Doctrine_Search ...@@ -195,19 +196,19 @@ class Doctrine_Search
$builder = new Doctrine_Import_Builder(); $builder = new Doctrine_Import_Builder();
if ($this->_options['generateFiles']) { if ($this->_options['generateFiles']) {
if (isset($this->_options['generatePath']) && $this->_options['generatePath']) { if (isset($this->_options['generatePath']) && $this->_options['generatePath']) {
$builder->setTargetPath($this->_options['generatePath']); $builder->setTargetPath($this->_options['generatePath']);
$builder->buildRecord($options, $columns, $relations); $builder->buildRecord($options, $columns, $relations);
} else { } else {
throw new Doctrine_Search_Exception('If you wish to generate files then you must specify the path to generate the files in.'); throw new Doctrine_Search_Exception('If you wish to generate files then you must specify the path to generate the files in.');
} }
} else { } else {
$def = $builder->buildDefinition($options, $columns, $relations); $def = $builder->buildDefinition($options, $columns, $relations);
eval($def); eval($def);
} }
return true; return true;
} }
} }
\ 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