public function __construct($strMessage = "General Exception", $intExceptionCode = null)
 {
     parent::__construct($strMessage);
     if ($intExceptionCode) {
         $this->intExceptionCode = $intExceptionCode;
     }
     // TODO: Inject this
     $this->objConfig = YarblesLocator::getConfig();
 }
示例#2
0
 public static function load($strClass)
 {
     $objConfig = YarblesLocator::getConfig();
     $strFile = str_replace("\\", "/", $strClass);
     $strFile = str_replace("_", "/", $strFile);
     // Application
     if (file_exists($objConfig->getProperty("web_path") . "/" . $strFile . ".php")) {
         include_once $objConfig->getProperty("web_path") . "/" . $strFile . ".php";
     } elseif (file_exists($objConfig->getProperty("fw_path") . "/" . $strFile . ".php")) {
         include_once $objConfig->getProperty("fw_path") . "/" . $strFile . ".php";
     }
 }
示例#3
0
 public function __construct()
 {
     $this->objConfig = YarblesLocator::getConfig();
     $this->dblTimeStart = microtime(true);
     parent::__construct();
 }
示例#4
0
 public function __construct()
 {
     $this->objConfig = YarblesLocator::getConfig();
     $this->strApiKey = $this->objConfig->getProperty('tmdb_api_key');
     $this->objRestService = YarblesLocator::getRestService(self::API_HOST);
 }
示例#5
0
 public static function getReadWriteDatabase()
 {
     return YarblesLocator::getDatabaseAdapter(YarblesLocator::getConfig()->getProperty("readwrite_database_adapter"), YarblesLocator::getConfig()->getProperty("readwrite_database_server"), YarblesLocator::getConfig()->getProperty("readwrite_database_username"), YarblesLocator::getConfig()->getProperty("readwrite_database_password"), YarblesLocator::getConfig()->getProperty("readwrite_database_name"));
 }
示例#6
0
 public static function getCache()
 {
     return YarblesLocator::getCacheAdapter(YarblesLocator::getConfig()->getProperty("cache_adapter"), YarblesLocator::getConfig()->getProperty("cache_server"), YarblesLocator::getConfig()->getProperty("cache_port"));
 }
 /**
  * Get app state
  * @return string
  */
 public static function getState()
 {
     $objConfig = YarblesLocator::getConfig();
     return $objConfig->fw_state;
 }
示例#8
0
 /**
  * Create image file path
  * @static
  * @param string $strFileLocation
  * @return string
  */
 public static function createImgPath($strFileLocation = "")
 {
     $objConfig = YarblesLocator::getConfig();
     return $objConfig->getProperty("img_path") . "/" . $strFileLocation;
 }
示例#9
0
 public function __construct()
 {
     // TODO: This should be injected
     $this->objConfig = YarblesLocator::getConfig();
     $this->objSession = YarblesLocator::getSession();
 }
示例#10
0
 public function __construct()
 {
     $this->objConfig = YarblesLocator::getConfig();
 }
示例#11
0
<?php

use yarbles\framework\common\YarblesLocator;
// External libraries
include_once YarblesLocator::getConfig()->getProperty('fw_path') . "/michelf/PHPMarkdownExtra/markdown.php";
include_once YarblesLocator::getConfig()->getProperty('fw_path') . "/michelf/PHPSmartyPants/smartypants.php";
include_once YarblesLocator::getConfig()->getProperty('fw_path') . "/ajaxray/UniversalFeedGenerator/FeedWriter.php";
include_once YarblesLocator::getConfig()->getProperty('fw_path') . "/ajaxray/UniversalFeedGenerator/FeedItem.php";