$content = $meta->getContentInstance($content->entry->content->params->name); $content_obj = new MetaContent(); $content_obj->from_entry($content); echo "\nRetrieved content instance with id = " . $content->entry->id . " and meta objs: "; foreach ($content_obj->get_meta_objs() as $m) { echo "\n- meta obj with vocab = {$m->vocab}, meta_name = {$m->meta_name}, text = {$m->text}, lang = {$m->lang}"; if ($m->has_attrs()) { echo "\n meta obj attrs:"; foreach ($m->get_attrs() as $key => $value) { echo "\n * {$key}:{$value}"; } } } # Create content instance without meta objects for "/test/content/sintel.mp4" $content_obj2 = new MetaContent("sintel"); $content_obj2->add_file_obj($item2->entry->content->params->path); $content = $meta->createContent($content_obj2->to_entry()); echo "\nCreated new content instance with name = " . $content->entry->content->params->name . "\n"; # Update content instance, adding meta objects $content_obj2->from_entry($content); $content_obj2->add_meta_obj("title", "media", "Sintel"); $content_obj2->add_meta_obj("description", "media", "Sintel (code-named Durian) is a short computer animated film by the Blender Institute, part of the Blender Foundation."); $content_obj2->add_meta_obj("tag", "myvocab", "animation", "en"); $content = $meta->updateContent($content_obj2->to_entry()); echo "\nAdded meta objects to content instance with name = " . $content->entry->content->params->name . "\n"; # search for content echo "\n\nGetting content list, search on 'iqmeta=blender' ..."; $feed = $meta->getContentList('iqmeta=blender'); foreach ($feed->feed->entry as $content_entry) { $content_obj = new MetaContent(); $content_obj->from_entry($content_entry);