westdc-zf1/application/module/Westdc/Visual/Handle/VisualHandle.php

64 lines
1.1 KiB
PHP
Raw Normal View History

<?php
namespace Westdc\Visual\Handle;
use \Helpers\View as view;
use \Helpers\Table;
//事件中存在的操作
class VisualHandle extends \Westdc\Visual\VariableEncoder
{
private $db; //传入PDO对象误
private $config; //全局配置
function __construct()
{
$this->db = \Zend_Registry::get('db');
$this->config = \Zend_Registry::get('config');
}
public function checkParam(\Zend_EventManager_Event $e)
{
$data = $e->getParam('data');
if(empty($data['uuid']))
{
return "请填写数据UUID";
}
if(!is_array($data['vars']) || count($data['vars']) < 1)
{
return "参数错误";
}
return true;
}
public function processData(\Zend_EventManager_Event $e)
{
$data = $e->getParam('data');
$data['vars'] = $this->encode($data['vars']);
if(!isset($data['status']))
{
$data['status'] = 1;
}
return $data;
}
public function recordPosted(\Zend_EventManager_Event $e)
{
$id = $e->getParam('id');
}
public function recordChanged(\Zend_EventManager_Event $e)
{
$id = $e->getParam('id');
}
}