CakeSchema Class Reference

Inheritance diagram for CakeSchema:

Object DbAclSchema DbAclSchema i18nSchema i18nSchema SessionsSchema SessionsSchema

List of all members.


Public Member Functions

 _build ($data)
 after ($event=array())
 before ($event=array())
 compare ($old, $new=null)
 load ($options=array())
 read ($options=array())
 write ($object, $options=array())

Public Attributes

 $connection = 'default'
 $file = 'schema.php'
 $name = null
 $path = null
 $tables = array()

Detailed Description

Definition at line 34 of file schema.php.


Member Function Documentation

CakeSchema::_build ( data  ) 

Builds schema object properties

Parameters:
array $data loaded object properties protected

Definition at line 99 of file schema.php.

References $file, and Inflector::underscore().

Referenced by load(), and write().

CakeSchema::after ( event = array()  ) 

After callback to be implemented in subclasses

Parameters:
array $events schema object properties public

Reimplemented in DbAclSchema, i18nSchema, SessionsSchema, DbAclSchema, i18nSchema, and SessionsSchema.

Definition at line 135 of file schema.php.

Referenced by compare().

CakeSchema::before ( event = array()  ) 

Before callback to be implemented in subclasses

Parameters:
array $events schema object properties
Returns:
boolean Should process continue public

Reimplemented in DbAclSchema, i18nSchema, SessionsSchema, DbAclSchema, i18nSchema, and SessionsSchema.

Definition at line 126 of file schema.php.

CakeSchema::compare ( old,
new = null 
)

Compares two sets of schemas

Parameters:
mixed $old Schema object or array
mixed $new Schema object or array
Returns:
array Tables (that are added, dropped, or changed) public

Definition at line 358 of file schema.php.

References $tables, and after().

CakeSchema::load ( options = array()  ) 

Reads database and creates schema tables

Parameters:
array $options schema object properties
Returns:
array Set of name and tables public

Definition at line 144 of file schema.php.

References $file, $name, $path, and _build().

CakeSchema::read ( options = array()  ) 

Reads database and creates schema tables

Parameters:
array $options schema object properties
Returns:
array Array indexed by name and tables public

Definition at line 175 of file schema.php.

References $connection, $tables, Inflector::classify(), config(), ConnectionManager::getDataSource(), App::import(), ClassRegistry::init(), Configure::listObjects(), and Configure::read().

Referenced by write().

CakeSchema::write ( object,
options = array() 
)

Writes schema file from object or options

Parameters:
mixed $object schema object or options array
array $options schema object properties to override object
Returns:
mixed false or string written to file public

Definition at line 271 of file schema.php.

References $connection, $file, $name, $out, $path, $tables, _build(), and read().


Member Data Documentation

CakeSchema::$connection = 'default'

Definition at line 62 of file schema.php.

Referenced by read(), and write().

CakeSchema::$file = 'schema.php'

Definition at line 55 of file schema.php.

Referenced by _build(), load(), and write().

CakeSchema::$name = null

Reimplemented in DbAclSchema, i18nSchema, and SessionsSchema.

Definition at line 41 of file schema.php.

Referenced by load(), and write().

CakeSchema::$path = null

Definition at line 48 of file schema.php.

Referenced by load(), and write().

CakeSchema::$tables = array()

Definition at line 69 of file schema.php.

Referenced by compare(), read(), and write().


The documentation for this class was generated from the following file: