This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
redir/includes/kohana/modules/orm/classes/Model/Auth/Role.php

32 lines
693 B
PHP
Raw Normal View History

2013-04-13 06:17:56 +00:00
<?php defined('SYSPATH') OR die('No direct access allowed.');
2011-07-20 12:57:07 +00:00
/**
* Default auth role
*
* @package Kohana/Auth
* @author Kohana Team
* @copyright (c) 2007-2009 Kohana Team
* @license http://kohanaphp.com/license.html
*/
class Model_Auth_Role extends ORM {
// Relationships
2013-04-13 06:17:56 +00:00
protected $_has_many = array(
'users' => array('model' => 'User','through' => 'roles_users'),
);
2011-07-20 12:57:07 +00:00
public function rules()
{
return array(
'name' => array(
array('not_empty'),
array('min_length', array(':value', 4)),
array('max_length', array(':value', 32)),
),
'description' => array(
array('max_length', array(':value', 255)),
)
);
}
2013-04-13 06:17:56 +00:00
} // End Auth Role Model