*/ // Setup use MarkLogic\MLPHP; require_once 'setup.php'; $client = $mlphp->newClient(); $client->setUsername($mlphp->config['username-admin']); $client->setPassword($mlphp->config['password-admin']); // Write a sample document $doc1 = new MLPHP\Document($client); $file1 = 'example.xml'; $doc1->setContentFile($file1); $doc1->setContentType('application/xml'); $uri1 = '/' . $file1; $doc1->write($uri1); // Reset metadata to default by deleting $doc1->deleteMetadata(); // Delete the metadata for the document $meta1 = $doc1->readMetadata(); // Read the metadata for the document echo "Starting collections:\n"; print_r($meta1->getCollections()); // Read and display the collections metadata for the document echo "Starting properties:\n"; print_r($meta1->getProperties()); // Read and display the properties metadata for the document echo "Starting permissions:\n"; print_r($meta1->getPermissions()); // Read and display the permissions metadata for the document echo "Starting quality:\n"; print_r($meta1->getQuality()); // Read and display the quality metadata for the document