Manager.php 804 Bytes
<?php 
/**
 * Manager
 *
 */

class Manager extends CActiveRecord
{
    /**
     * REST behavior
     */
    public function behaviors()
    {
        return array(
            'RestModelBehavior' => array(
                'class' => 'WRestModelBehavior',
            )
        );
    }
    
    public static function model($className=__CLASS__)
    {
        return parent::model($className);
    }
 
    public function tableName()
    {
        return 'users';
    }
    
	public function primaryKey()
	{
	    return 'id';
	}
    
    public function relations()
    {
        return array(
            "access" => array(
                self::HAS_ONE, 
                "Transport",
                array( "id" => "domid" ),
                "joinType" => "LEFT JOIN"
            )
        );
    }
}