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

46 lines
945 B
PHP
Raw Normal View History

<?php
namespace Open;
use \Helpers\View as view;
use \Open\Listener\OpenListener as Listener;
class Open extends \Zend_Controller_Plugin_Abstract
{
public $db;
public $config;
public $table;
public function __construct($db = NULL,$auth = NULL){
if(empty($db))
{
$this->db = \Zend_Registry::get('db');
}else{
$this->db = $db;
}
$this->config = \Zend_Registry::get('config');
$Listener = new Listener();
@$this->events()->attachAggregate($Listener);
$this->table = new \Helpers\Table();
}
public function events(\Zend_EventManager_EventCollection $events = NULL)
{
if ($events !== NULL) {
$this->events = $events;
} elseif ($this->events === NULL) {
$this->events = new \Zend_EventManager_EventManager(__CLASS__);
}
return $this->events;
}
public function clientCredentials()
{
}
}