PHP Класс sfPropelData, sfPropelORMPlugin

Автор: Fabien Potencier ([email protected])
Наследование: extends sfData
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$cacheKeepDuration The cache duration
$con
$deletedClasses
$dispatcher
$formatter

Открытые методы

Метод Описание
__construct ( $cacheKeepDuration = 7200 )
dumpData ( string $directoryOrFile, mixed $tables = 'all', string $connectionName = 'propel' ) Dumps data to fixture from one or more tables.
fixOrderingOfForeignKeyData ( array $classes ) Fixes the ordering of foreign key data, by outputting data a foreign key depends on before the table with the foreign key.
getData ( mixed $tables = 'all', string $connectionName = 'propel' ) : array Returns data from one or more tables.
initialize ( sfEventDispatcher $dispatcher, sfFormatter $formatter ) Initializes the sfPropelData instance.
loadData ( mixed $directoryOrFile = null, string $connectionName = 'propel' ) Loads data from a file or directory into a Propel data source
loadDataFromArray ( array $data ) Implements the abstract loadDataFromArray method and loads the data using the generated data model.
log ( $message, $size = null, $style = 'INFO' )

Защищенные методы

Метод Описание
doDeleteCurrentData ( array $files ) Clears existing data from the data source by reading the fixture files and deleting the existing data for only those classes that are mentioned in the fixtures.
doLoadDataFromFile ( string $file ) Loads data for the database from a YAML file
fixOrderingOfForeignKeyDataInSameTable ( $resultsSets, $tableName, $column, $in = null )
loadMany2Many ( BaseObject $obj, string $middleTableName, array $values ) Loads many to many objects.
loadMapBuilders ( $connectionName ) Loads all map builders for a given connection name

Описание методов

__construct() публичный Метод

public __construct ( $cacheKeepDuration = 7200 )

doDeleteCurrentData() защищенный Метод

Clears existing data from the data source by reading the fixture files and deleting the existing data for only those classes that are mentioned in the fixtures.
protected doDeleteCurrentData ( array $files )
$files array The list of YAML files.

doLoadDataFromFile() защищенный Метод

Loads data for the database from a YAML file
protected doLoadDataFromFile ( string $file )
$file string The path to the YAML file.

dumpData() публичный Метод

Dumps data to fixture from one or more tables.
public dumpData ( string $directoryOrFile, mixed $tables = 'all', string $connectionName = 'propel' )
$directoryOrFile string The directory or file to dump to
$tables mixed The name or names of tables to dump (or all to dump all tables)
$connectionName string The connection name (default to propel)

fixOrderingOfForeignKeyData() публичный Метод

Fixes the ordering of foreign key data, by outputting data a foreign key depends on before the table with the foreign key.
public fixOrderingOfForeignKeyData ( array $classes )
$classes array The array with the class names.

fixOrderingOfForeignKeyDataInSameTable() защищенный Метод

protected fixOrderingOfForeignKeyDataInSameTable ( $resultsSets, $tableName, $column, $in = null )

getData() публичный Метод

Returns data from one or more tables.
public getData ( mixed $tables = 'all', string $connectionName = 'propel' ) : array
$tables mixed name or names of tables to dump (or all to dump all tables)
$connectionName string connection name
Результат array An array of database data

initialize() публичный Метод

Initializes the sfPropelData instance.
public initialize ( sfEventDispatcher $dispatcher, sfFormatter $formatter )
$dispatcher sfEventDispatcher A sfEventDispatcher instance
$formatter sfFormatter A sfFormatter instance

loadData() публичный Метод

Loads data from a file or directory into a Propel data source
См. также: sfPropelData::loadData()
public loadData ( mixed $directoryOrFile = null, string $connectionName = 'propel' )
$directoryOrFile mixed A file or directory path or an array of files or directories
$connectionName string The Propel connection name, default 'propel'

loadDataFromArray() публичный Метод

Implements the abstract loadDataFromArray method and loads the data using the generated data model.
public loadDataFromArray ( array $data )
$data array The data to be loaded into the data source

loadMany2Many() защищенный Метод

Loads many to many objects.
protected loadMany2Many ( BaseObject $obj, string $middleTableName, array $values )
$obj BaseObject A Propel object
$middleTableName string The middle table name
$values array An array of values

loadMapBuilders() защищенный Метод

Use sfFileCache to cache propel databaseMap
protected loadMapBuilders ( $connectionName )

log() публичный Метод

public log ( $message, $size = null, $style = 'INFO' )

Описание свойств

$cacheKeepDuration защищенное свойство

The cache duration
protected $cacheKeepDuration

$con защищенное свойство

protected $con

$deletedClasses защищенное свойство

protected $deletedClasses

$dispatcher защищенное свойство

protected $dispatcher

$formatter защищенное свойство

protected $formatter