. */ /** * Doctrine_Task_LoadDummyData * * @package Doctrine * @subpackage Task * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.phpdoctrine.com * @since 1.0 * @version $Revision: 2761 $ * @author Jonathan H. Wage */ class Doctrine_Task_LoadDummyData extends Doctrine_Task { public $description = 'Load data from a yaml data fixture file.', $requiredArguments = array('models_path' => 'Specify path to your Doctrine_Record definitions.'), $optionalArguments = array('append' => 'Whether or not to append the data or to delete all data before loading.', 'num' => 'Number of records to populate for each model.'); public function execute() { Doctrine::loadModels($this->getArgument('models_path')); Doctrine::loadDummyData($this->getArgument('append') ? true:false, $this->getArgument('num') ? $this->getArgument('num'):5); $this->dispatcher->notify('Dummy data was successfully loaded'); } }