PHP 클래스 sfPropelData, sfPropelORMPlugin

저자: Fabien Potencier ([email protected])
상속: extends sfData
파일 보기 프로젝트 열기: propelorm/sfPropelORMPlugin 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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