1
0
mirror of synced 2025-01-18 14:31:40 +03:00
This commit is contained in:
zYne 2007-10-13 08:39:26 +00:00
parent f3867dbf71
commit 6f5ae1c305

View File

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