'/^[a-z_]+$/', 'object_perms' => '/^[a-z_]+(,[a-z_]+)*$/', ); function getPrimaryKey() { return 'object_id'; } function getTable() { return 'objects'; } } class PermRolesDefinition extends FAModelDefinition { var $_constraints = array( 'role_name' => '/^[a-z_]+$/', ); function getPrimaryKey() { return 'role_id'; } function getTable() { return 'roles'; } } class PermPermsDefinition extends FAModelDefinition { var $_constraints = array( 'role_id' => '/^[0-9]+$/', 'object_id' => '/^[0-9]+$/', 'perm_grant' => '/^[0-9]+$/', 'perm_deny' => '/^[0-9]+$/', 'perm_level' => '/^[0-9]+$/', ); function getPrimaryKey() { return 'perm_id'; } function getTable() { return 'perms'; } } ?>