Task class for creating and updating fixtures files.
BakeTask
FixtureTask $_Schema protected $path public string$tasks public arrayInteract with the user to get a custom SQL condition and use that to extract data to build a fixture.
Execution method always used for tasks Handles dispatching to interactive, named, or all processes.
__construct( ConsoleOutput $stdout null , ConsoleOutput $stderr null , ConsoleInput $stdin null )
Override initialize
ConsoleOutput $stdout optional null ConsoleOutput $stderr optional null ConsoleInput $stdin optional null _generateRecords( array $tableInfo , integer $recordCount 1 )
Generate String representation of Records
$tableInfo $recordCount optional 1 _generateSchema( array $tableInfo )
Generates a string representation of a schema.
$tableInfo _getRecordsFromTable( string $modelName , string $useTable null )
Interact with the user to get a custom SQL condition and use that to extract data to build a fixture.
$modelName $useTable optional null _makeRecordString( array $records )
Convert a $records array into a string.
$records all( )
Bake All the Fixtures at once. Will only bake fixtures for models that exist.
bake( string $model , string $useTable false , array $importOptions array() )
Assembles and writes a Fixture file
$model $useTable optional false $importOptions optional array() execute( )
Execution method always used for tasks Handles dispatching to interactive, named, or all processes.
BakeTask::execute() generateFixtureFile( string $model , string $otherVars )
Generate the fixture file, and write to disk
$model $otherVars getOptionParser( )
Gets the option parser instance and configures it.
ConsoleOptionParsergetPath( )
Get the path to the fixtures.
BakeTask::getPath() importOptions( string $modelName )
Interacts with the User to setup an array of import options. For a fixture.
$modelName startup( )
Disable caching and enable debug for baking. This forces the most current database schema to be used.
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/2.9/class-FixtureTask.html