SharedTimeTableMgrImpl.php 870 Bytes
<?php
/**
 * @class SharedTimeTableMgrImpl
 * @version 
 * 
 */

class SharedTimeTableMgrImpl extends SharedObjectMgrAbstract {
	public static $ROOT_DIR_NAME = "TT";
	
	private $ttMgr = NULL;
	
	function __construct() {
		$this->rootdirname  = self::$ROOT_DIR_NAME;
		$this->ttMgr = new TimeTableMgr("", TRUE);
		parent::__construct();
	}
	
	protected function getDataInfo($object_id) {
		$result = $this->ttMgr->getObject($object_id, 'sharedtimeTable');
		
		if (!isset($result) || array_key_exists('error', $result))
			return array();
		
		return $result;
	}
	
	protected function addData($src_object_path, $dst_data_path, $newId, $newName) {
		$result = $this->ttMgr->copyTT($src_object_path, $dst_data_path, $newId, $newName);
		if (!$result)
			return array('success' => FALSE, 'message' => 'Cannot copy the TimeTable');
		return array('success' => TRUE);
	}
}

?>