DBConstraint Class Reference
[Model]
Base class for constraints. More...
Inheritance diagram for DBConstraint:
Public Member Functions |
|
__construct ($tablename, $fields=null, $policy=self::NONE) | |
get_fields () | |
Returns field taking parts in this relation.
|
|
validate ($arr_fields, $arr_keys) | |
Check if constraints are fullfiled. |
|
Public Attributes |
|
const | NONE = 0 |
Protected Attributes |
|
$arr_fields = array() | |
$tablename |
Detailed Description
Base class for constraints.
Definition at line 10 of file dbconstraint.cls.php.
Constructor & Destructor Documentation
DBConstraint::__construct | ( | $ | tablename, | |
$ | fields = null , |
|||
$ | policy =
self::NONE |
|||
) |
Definition at line 25 of file dbconstraint.cls.php.
00025 { 00026 parent::__construct($policy); 00027 $this->tablename = $tablename; 00028 00029 if (!empty($fields)) { 00030 $this->arr_fields = Arr::force($fields); 00031 } 00032 }
Member Function Documentation
DBConstraint::get_fields | ( | ) |
Returns field taking parts in this relation.
- Returns:
- array Array with column name as value
Implements IDBConstraint.
Definition at line 39 of file dbconstraint.cls.php.
DBConstraint::validate | ( | $ | arr_fields, | |
$ | arr_keys | |||
) |
Check if constraints are fullfiled.
- Parameters:
-
array Cosntraint Column data Associative array of form fieldname => fieldvalue array Key Column Data Associative array of form fieldname => fieldvalue
- Returns:
- Status
Implements IDBConstraint.
Reimplemented in DBConstraintUnique.
Definition at line 50 of file dbconstraint.cls.php.
00050 { 00051 return new Status(); 00052 }
Member Data Documentation
DBConstraint::$arr_fields = array()
[protected] |
Definition at line 23 of file dbconstraint.cls.php.
DBConstraint::$tablename
[protected] |
Definition at line 17 of file dbconstraint.cls.php.
const DBConstraint::NONE = 0 |
Implements IPolicyHolder.
Definition at line 11 of file dbconstraint.cls.php.
The documentation for this class was generated from the following file:
- gyro/core/model/base/dbconstraint.cls.php