public function setRoles($resourceUri, $roles = null) {
        //Check if the data has been loaded yet, and load it if not
        if (!$this->ready) {
            $this->init();
        }

        //If no roles were passed in, use the default
        $roles = $roles ?: $this->defaultRoles;

        //Call the create node method
        return $this->createNode($resourceUri, $roles);
    }
public function setRoles($resourceUri, $roles = null) {
        //Check if the data has been loaded yet, and load it if not
        if (!$this->ready) {
            $this->init();
        }

        //If no roles were passed in, use the default
        $roles = $roles ?: $this->defaultRoles;

        //Call the create node method
        return $this->createNode($resourceUri, $roles);
    }
public function setRoles ( $ resourceUri , $ roles = null ) { //Check if the data has been loaded yet, and load it if not if ( ! $ this -> ready ) { $ this -> init ( ) ; } //If no roles were passed in, use the default $ roles = $ roles ? : $ this -> defaultRoles ; //Call the create node method return $ this -> createNode ( $ resourceUri , $ roles ) ; }
Sets the roles that can view a resource

@param string   $resourceUri The uri of the resource on the server to view
@param array    $roles       The array of roles (string names) that can view this resource

@return boolean              Whether the node was set or not (false if the node does not exist)
Sets the roles that can view a resource