2014-11-04 09:05:21 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Created by PhpStorm.
|
|
|
|
* User: Administrator
|
|
|
|
* Date: 14-9-25
|
|
|
|
* Time: 下午2:41
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Westdc\Metadata;
|
|
|
|
|
2014-12-18 13:14:30 +00:00
|
|
|
use Zend\ServiceManager\ServiceManager;
|
|
|
|
use Zend\ServiceManager\ServiceManagerAwareInterface;
|
2014-12-18 15:25:15 +00:00
|
|
|
use Westdc\EventModel\AbstractEventManager;
|
2014-11-04 09:05:21 +00:00
|
|
|
|
2014-12-18 15:25:15 +00:00
|
|
|
class Metadata extends AbstractEventManager implements ServiceManagerAwareInterface{
|
2014-11-04 09:05:21 +00:00
|
|
|
|
2014-12-18 15:25:15 +00:00
|
|
|
protected $serviceManager;
|
2014-11-04 09:05:21 +00:00
|
|
|
|
2014-12-18 15:25:15 +00:00
|
|
|
private $db;
|
2014-11-04 09:05:21 +00:00
|
|
|
|
2014-12-18 15:25:15 +00:00
|
|
|
public function setServiceManager(ServiceManager $serviceManager)
|
|
|
|
{
|
|
|
|
$this->serviceManager = $serviceManager;
|
|
|
|
|
|
|
|
$this->init();
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
private function init()
|
|
|
|
{
|
|
|
|
$dbService = $this->serviceManager->get('Db');
|
|
|
|
$this->db = $dbService->getPdo();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function delete($uuid)
|
|
|
|
{
|
|
|
|
|
|
|
|
$tools = $this->serviceManager->get('Tools');
|
|
|
|
|
|
|
|
if( false == $tools->isUUID($uuid) )
|
|
|
|
return "参数错误";
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}//delete 删除元数据
|
2014-11-04 09:05:21 +00:00
|
|
|
|
|
|
|
}
|