本文整理汇总了PHP中Action::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Action::__construct方法的具体用法?PHP Action::__construct怎么用?PHP Action::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Action
的用法示例。
在下文中一共展示了Action::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* 构造方法-初始化数据
*/
public function __construct() {
parent::__construct();
$this->_model = loadModel('Index');
$this->_admin_model = loadModel('Admin.Admin');
$this->_config = array('verify_error' => '验证码错误', 'userNull' => '用户信息不能为空', 'userError' => '用户名密码错误');
$this->_username = $this->getParam("username");
$this->_password = $this->getParam("password");
$this->_verify = $this->getParam("verify");
$this->_p = $this->getParam('p') ? intval($this->getParam('p')) : 0;
$this->_openid = $this->getParam("openid");
$this->_memberEdit = $this->getParam("memberEdit");
$this->_member = $this->getParam("member");
$this->_cardid = $this->getParam("cardid");
//获取card id
$this->_card_id = $this->getParam('card_id');
if (!$this->_card_id) {
$id = $this->getParam('id') ? intval($this->getParam('id')) : 1;
$this->_card_id = $this->_model->getCardId($id);
}
//验证是否登录用户
if ((!isset($_COOKIE['huishi_admin_uid']) || !$_COOKIE['huishi_admin_uid']) && ($this->getParam("m") != 'login') && ($this->getParam("m") != 'index') && ($this->getParam("m") != 'verify')) {
header('location:' . url('index', 'index', array(), 'admin.php'));
exit();
}
}
示例2: __construct
public function __construct()
{
parent::__construct();
$path = C('PROJECT.SITE_PATH') . '/' . $_GET['site'] . '/' . C('PROJECT.SRC_DIR') . '/' . $_GET['module'] . '/' . C('M3D_FILENAME');
// $path = '/home/music/javey/music_1-0-165-34_BRANCH/m3d.php';
$this->tool = new InstantmergeTool($path);
}
示例3: __construct
public function __construct()
{
parent::__construct();
$this->page = M('page');
//实例化一个数据模型
$this->article = M('article');
}
示例4: __construct
public function __construct($data = '')
{
$this->param = $data;
$this->setServerId($this->param['from_server_id']);
$this->player_id = $this->param['from_player_id'];
parent::__construct();
}
示例5: __construct
public function __construct()
{
parent::__construct();
$this->_manage = new ManageModel();
$this->_goods = new GoodsModel();
$this->_order = new OrderModel();
}
示例6: __construct
/**
* @param Grido\Grid $grid
* @param string $name
* @param string $label
* @param callback $onClick
*/
public function __construct($grid, $name, $label, $onClick = NULL)
{
parent::__construct($grid, $name, $label);
if ($onClick !== NULL) {
$this->onClick[] = $onClick;
}
}
示例7: __construct
/**
* Initializes a new instance of a AMQP action to report
*/
public function __construct($method, $target, $routingKey = '')
{
parent::__construct();
$this->method = $method;
$this->target = $target;
$this->routingKey = $routingKey;
}
示例8:
function __construct()
{
parent::__construct();
// if(MODULE_NAME != 'Index') $this->iM = D(MODULE_NAME);
$this->quoteRequestData();
$this->assignGlobalData();
}
示例9: __construct
public function __construct()
{
parent::__construct();
$this->goods = new GoodsModel();
$this->rotator = new RotatorModel();
$this->user = new UserModel();
}
示例10: __construct
public function __construct()
{
parent::__construct();
$this->_aBaseOptions = (require CONF_PATH . 'dataConfig.inc.php');
$this->para = $_REQUEST;
if (empty($_SESSION['app_index'])) {
$_SESSION['app_index'] = (array) C('APP_INFO');
}
$this->oApp = $_SESSION['app_index'];
$uid = D('Session')->check();
if ($uid) {
$user = D('User')->where(array('id' => $uid))->find();
$_SESSION['user'] = $user;
$this->oUser = $user;
#用户名
$this->assign('user', $this->oUser);
#未读私信数
$this->assign('letterCount', D('Letter')->where(array('recipient' => $uid, 'isread' => 0))->count());
$collect['case'] = D('collect')->where(array('uid' => $this->oUser['id'], 'type' => 1))->select();
$collect['house'] = D('collect')->where(array('uid' => $this->oUser['id'], 'type' => 2))->select();
$collect['active'] = D('collect')->where(array('uid' => $this->oUser['id'], 'type' => 3))->select();
$_SESSION['collect'] = $collect;
$this->oCollect = $collect;
} else {
unset($_SESSION['user']);
$this->oUser = array();
}
$this->assign('hot_designer', D('User_designer')->getHotDesigner());
$this->assign('hot_case', D('Case')->getHotCase());
}
示例11: __construct
public function __construct()
{
parent::__construct();
$this->article = M("article");
$this->note = M("guestbook");
$this->product = M("product");
}
示例12: __construct
public function __construct($tpl)
{
//构造方法 初始化
global $templates;
parent::__construct($tpl);
//初始化父类
}
示例13: __construct
public function __construct()
{
parent::__construct();
global $mobile_cfg;
if ($mobile_cfg == null) {
$mobile_cfg = (require_once APP_ROOT_PATH . "system/mobile_cfg/" . APP_TYPE . "/webnav_cfg.php");
}
check_install();
//重新处理后台的语言加载机制,后台语言环境配置于后台config.php文件
$langSet = conf('DEFAULT_LANG');
// 定义当前语言
define('LANG_SET', strtolower($langSet));
// 读取项目公共语言包
if (is_file(LANG_PATH . $langSet . '/common.php')) {
L(include LANG_PATH . $langSet . '/common.php');
$this->lang_pack = (require LANG_PATH . $langSet . '/common.php');
if (!file_exists(APP_ROOT_PATH . "public/runtime/admin/lang.js")) {
$str = "var LANG = {";
foreach ($this->lang_pack as $k => $lang) {
$str .= "\"" . $k . "\":\"" . $lang . "\",";
}
$str = substr($str, 0, -1);
$str .= "};";
file_put_contents(APP_ROOT_PATH . "public/runtime/admin/lang.js", $str);
}
}
es_session::close();
}
示例14: __construct
public function __construct()
{
parent::__construct();
$this->product = M('product');
import('ORG.Util.Page');
//分页
}
示例15: __construct
public function __construct()
{
parent::__construct();
check_install();
//重新处理后台的语言加载机制,后台语言环境配置于后台config.php文件
$langSet = conf('DEFAULT_LANG');
// 定义当前语言
define('LANG_SET', strtolower($langSet));
// 读取项目公共语言包
if (is_file(LANG_PATH . $langSet . '/common.php')) {
L(include LANG_PATH . $langSet . '/common.php');
$this->lang_pack = (require LANG_PATH . $langSet . '/common.php');
if (is_file(LANG_PATH . $langSet . '/weixin.php')) {
L(include LANG_PATH . $langSet . '/weixin.php');
$weixin_lang = (require LANG_PATH . $langSet . '/weixin.php');
$this->lang_pack = array_merge($this->lang_pack, $weixin_lang);
}
if (!file_exists(APP_ROOT_PATH . "public/runtime/admin/lang.js")) {
$str = "var LANG = {";
foreach ($this->lang_pack as $k => $lang) {
$str .= "\"" . $k . "\":\"" . $lang . "\",";
}
$str = substr($str, 0, -1);
$str .= "};";
file_put_contents(APP_ROOT_PATH . "public/runtime/admin/lang.js", $str);
}
}
}