Inheritance diagram for CakeSchema:

Public Member Functions | |
| __columns (&$Obj) | |
| __construct ($options=array()) | |
| __values ($values) | |
| _build ($data) | |
| _compareIndexes ($new, $old) | |
| 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() | |
Definition at line 32 of file schema.php.
| CakeSchema::__construct | ( | $ | options = array() |
) |
Constructor
| array | $options optional load object properties |
Definition at line 73 of file schema.php.
References __construct(), _build(), camelize(), name(), Configure::read(), and slug().
| CakeSchema::__columns | ( | &$ | Obj | ) |
Formats Schema columns from Model Object
| array | $Obj model object |
Definition at line 465 of file schema.php.
References $name, error(), and ConnectionManager::getDataSource().
Referenced by read().
| CakeSchema::__values | ( | $ | values | ) |
Formats Schema columns from Model Object
| array | $values options keys(type, null, default, key, length, extra) |
Definition at line 444 of file schema.php.
Referenced by write().
| CakeSchema::_build | ( | $ | data | ) |
Builds schema object properties
| array | $data loaded object properties |
Definition at line 98 of file schema.php.
References $file, name(), and underscore().
Referenced by __construct(), load(), and write().
| CakeSchema::_compareIndexes | ( | $ | new, | |
| $ | old | |||
| ) |
Compare two schema indexes
| array | $new New indexes | |
| array | $old Old indexes |
Definition at line 507 of file schema.php.
References $name.
Referenced by compare().
| CakeSchema::after | ( | $ | event = array() |
) |
After callback to be implemented in subclasses
| array | $events schema object properties public |
Reimplemented in DbAclSchema, i18nSchema, and SessionsSchema.
Definition at line 134 of file schema.php.
Referenced by compare().
| CakeSchema::before | ( | $ | event = array() |
) |
Before callback to be implemented in subclasses
| array | $events schema object properties |
Reimplemented in DbAclSchema, i18nSchema, and SessionsSchema.
Definition at line 125 of file schema.php.
| CakeSchema::compare | ( | $ | old, | |
| $ | new = null | |||
| ) |
Compares two sets of schemas
| mixed | $old Schema object or array | |
| mixed | $new Schema object or array |
Definition at line 373 of file schema.php.
References $tables, _compareIndexes(), and after().
| CakeSchema::load | ( | $ | options = array() |
) |
| CakeSchema::read | ( | $ | options = array() |
) |
Reads database and creates schema tables
Options
| array | $options schema object properties |
Definition at line 179 of file schema.php.
References $connection, $tables, __columns(), classify(), config(), ConnectionManager::getDataSource(), App::import(), ClassRegistry::init(), Configure::listObjects(), name(), and Configure::read().
Referenced by write().
| CakeSchema::write | ( | $ | object, | |
| $ | options = array() | |||
| ) |
Writes schema file from object or options
| mixed | $object schema object or options array | |
| array | $options schema object properties to override object |
Definition at line 286 of file schema.php.
References $connection, $file, $out, $path, $tables, __values(), _build(), and read().
| CakeSchema::$connection = 'default' |
| CakeSchema::$file = 'schema.php' |
| CakeSchema::$name = null |
Reimplemented in DbAclSchema, i18nSchema, and SessionsSchema.
Definition at line 39 of file schema.php.
Referenced by __columns(), _compareIndexes(), and load().
| CakeSchema::$path = null |
| CakeSchema::$tables = array() |
1.4.7