westdc-zf1/application/module/Open/Server.php

37 lines
626 B
PHP

<?php
namespace Open;
class Server extends \Zend_Controller_Plugin_Abstract
{
public $db;
public $auth = NULL;
public $user;
private $config;
public function __construct($db = NULL,$auth = NULL){
$this->config = \Zend_Registry::get('config');
if(empty($db))
{
$this->db = \Zend_Registry::get('db');
}else{
$this->db = $db;
}
if(empty($auth))
{
$this->auth = \Zend_Auth::getInstance();
if($this->auth->hasIdentity())
{
$this->user = $this->auth->getIdentity();
}
}else{
$this->auth = false;
}
}
public function getCode()
{
}
}