PHP code example of islandora / chullo
1. Go to this page and download the library: Download islandora/chullo library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
islandora / chullo example snippets
use Islandora\Chullo\Chullo;
// Instantiated with static factory
$chullo = FedoraApi::create('http://localhost:8080/fcrepo/rest');
// Create a new resource
$uri = $chullo->createResource(); // http://localhost:8080/fcrepo/rest/0b/0b/6c/68/0b0b6c68-30d8-410c-8a0e-154d0fd4ca20
// Parse resource as an EasyRdf Graph
$graph = $chullo->getGraph($uri);
// Set the resource's title
$graph->set($uri, 'dc:title', 'My Sweet Title');
// Save the graph to Fedora
$chullo->saveGraph($uri, $graph);