AbstractController.class.php
976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* Created by PhpStorm.
* 应用回调控制层
* User: zhoutao
* Date: 16/7/14
* Time: 下午2:56
*/
namespace Frontend\Controller\Callback;
use VcySDK\Service;
abstract class AbstractController extends \Common\Controller\Frontend\AbstractController
{
// 回调数据
protected $callBackData = [];
public function before_action($action = '')
{
// 不必登陆
$this->_require_login = false;
// 接收消息
$serviceSdk = &Service::instance();
$this->callBackData = $serviceSdk->streamJsonData();
return parent::before_action($action);
}
/**
* 后置操作
*
* @param string $action
*
* @return bool
*/
public function after_action($action = '')
{
exit('success');
return true;
}
/**
* 获取 identifier
*
* @return bool
*/
protected function _identifier()
{
return true;
}
}