public function addPolicy($sec, $ptype, array $rule)
    {
        if (!$this->hasPolicy($sec, $ptype, $rule)) {
            $this->model[$sec][$ptype]->policy[] = $rule;

            return true;
        }

        return false;
    }
public function addPolicy($sec, $ptype, array $rule)
    {
        if (!$this->hasPolicy($sec, $ptype, $rule)) {
            $this->model[$sec][$ptype]->policy[] = $rule;

            return true;
        }

        return false;
    }
public function addPolicy ( $ sec , $ ptype , array $ rule ) { if ( ! $ this -> hasPolicy ( $ sec , $ ptype , $ rule ) ) { $ this -> model [ $ sec ] [ $ ptype ] -> policy [ ] = $ rule ; return true ; } return false ; }
adds a policy rule to the model.

@param $sec
@param $ptype
@param array $rule

@return bool
adds a policy rule to the model .