SharedCatalogMgrImpl.php
895 Bytes
<?php
/**
* @class SharedCatalogMgrImpl
* @version
*
*/
class SharedCatalogMgrImpl extends SharedObjectMgrAbstract {
public static $ROOT_DIR_NAME = "CAT";
private $catMgr = NULL;
function __construct() {
$this->rootdirname = self::$ROOT_DIR_NAME;
$this->catMgr = new CatalogMgr(TRUE);
parent::__construct();
}
protected function getDataInfo($object_id) {
$result = $this->catMgr->getObject($object_id, 'sharedcatalog');
if (!isset($result) || array_key_exists('error', $result))
return array();
return $result;
}
protected function addData($src_object_path, $dst_data_path, $newId, $newName, $newDescription) {
$result = $this->catMgr->copyTT($src_object_path, $dst_data_path, $newId, $newName, $newDescription);
if (!$result)
return array('success' => FALSE, 'message' => 'Cannot copy the Catalog');
return array('success' => TRUE);
}
}
?>