예제 #1
0
$meta1->addCollections($collections);
// Add the collections to the metadata object
echo "Two collections added:\n";
print_r($meta1->getCollections());
// Read and display the collections in the metadata object
echo "One more collection added:\n";
$meta1->addCollections('red');
// Add a collection to the metadata object as a string
print_r($meta1->getCollections());
// Read and display the collections in the metadata object
echo "One collection deleted:\n";
$meta1->deleteCollections('fruit');
// Delete a collection from the metadata object
print_r($meta1->getCollections());
// Read and display the collections in the metadata object
$doc1->writeMetadata($meta1);
// Write the metadata object for the document to the database
echo "Final written collections:\n";
$meta1 = $doc1->readMetadata();
// Read the metadata for the document
print_r($meta1->getCollections());
// Read and display the collections in the metadata object
echo "\n\n\n";
// Properties
$properties = array('size' => 'large', 'color' => 'blue', 'qty' => 12);
$meta1->addProperties($properties);
// Add the properties to the metadata object
echo "Three properties added:\n";
print_r($meta1->getProperties());
// Read and display the properties in the metadata object
$meta1->deleteProperties('color');