public function getPermission($key, $default = self::GUEST)
    {
        if ($key == 'access') {
            return $this->access;
        }

        return $this->permissions->get($key, $default);
    }
public function getPermission($key, $default = self::GUEST)
    {
        if ($key == 'access') {
            return $this->access;
        }

        return $this->permissions->get($key, $default);
    }
public function getPermission ( $ key , $ default = self :: GUEST ) { if ( $ key == 'access' ) { return $ this -> access ; } return $ this -> permissions -> get ( $ key , $ default ) ; }
Return a permission value for of a resource. If the permission doesn't exists then it returns the default
value.

@param string $key     The name of the resource
@param mixed  $default The default value, if the permission is not set yet

@return mixed
Return a permission value for of a resource . If the permission doesn t exists then it returns the default value .