示例#1
0
 public function tearDown()
 {
     try {
         Doctrine::dropDatabases();
         Util_Log::get()->UnitTests()->debug('Executed TearDown');
     } catch (Exception $e) {
         Util_Log::get()->UnitTests()->err($e->getMessage());
     }
 }
示例#2
0
 public function addAction()
 {
     $params = $this->getRequest()->getParams();
     $coords = explode("/", $params['vn_coords']);
     $point = new stdClass();
     $point->lat = array_shift($coords);
     $point->lng = array_shift($coords);
     $venue = new Venue();
     $venue->group_id = NULL;
     $venue->name = $params['gid'] . "_" . $params['vn_name'];
     $venue->address = utf8_decode($params['vn_address']);
     $venue->coords = $this->_helper->json->encodeJson($point);
     $venue->description = $params['vn_description'];
     $venue->icon = $params['vn_icon'];
     try {
         $venue->save();
         $this->_helper->json->sendJson(array("msg" => Zend_Registry::get('Zend_Translate')->_("Venue added!")));
     } catch (Exception $e) {
         Util_Log::get()->DataAccess()->err("Doctrine Save Error: " . $e->getMessage());
         $this->_helper->json->sendJson(array("msg" => Zend_Registry::get('Zend_Translate')->_("Error adding Venue")));
     }
 }
示例#3
0
 /**
  * 
  */
 public function __construct()
 {
     $this->handle = Util_Guid::generate();
     $this->logger = Util_Log::get()->UGAMON_Mng();
 }
示例#4
0
 /**
  * 
  */
 public function __construct($handle)
 {
     $this->handle = $handle;
     $this->logger = Util_Log::get()->UGAMON_Wrk();
     stream_set_blocking(STDIN, 0);
 }
示例#5
0
 public function initLogger()
 {
     if (PHP_SAPI == "cli") {
         Util_Log::loadLogger($this->_env . "_cli");
     } else {
         Util_Log::loadLogger($this->_env . "web");
     }
 }