Пример #1
0
 /**
  * Constructor
  *
  * @return owa_mailer
  */
 function __construct()
 {
     parent::__construct();
     $this->mailer = new PHPMailer();
     if (owa_coreAPI::getSetting('base', 'mailer-from')) {
         $this->mailer->From = owa_coreAPI::getSetting('base', 'mailer-from');
     }
     if (owa_coreAPI::getSetting('base', 'mailer-fromName')) {
         $this->mailer->FromName = owa_coreAPI::getSetting('base', 'mailer-fromName');
     }
     if (owa_coreAPI::getSetting('base', 'mailer-use-smtp')) {
         $this->mailer->IsSMTP();
         // telling the class to use SMTP
         if (owa_coreAPI::getSetting('base', 'mailer-host')) {
             $this->mailer->Host = owa_coreAPI::getSetting('base', 'mailer-host');
         }
         if (owa_coreAPI::getSetting('base', 'mailer-port')) {
             $this->mailer->Port = owa_coreAPI::getSetting('base', 'mailer-port');
         }
         if (owa_coreAPI::getSetting('base', 'mailer-smtpAuth')) {
             $this->mailer->SMTPAuth = owa_coreAPI::getSetting('base', 'mailer-smtpAuth');
         }
         if (owa_coreAPI::getSetting('base', 'mailer-username') && owa_coreAPI::getSetting('base', 'mailer-password')) {
             $this->mailer->Username = owa_coreAPI::getSetting('base', 'mailer-username');
             $this->mailer->Password = owa_coreAPI::getSetting('base', 'mailer-password');
         }
     }
 }
 /**
  * Class Constructor
  *
  * @return owa_auth
  */
 function __construct()
 {
     // register auth cookies
     owa_coreAPI::registerStateStore('u', time() + 3600 * 24 * 365 * 10, '', '', 'cookie');
     owa_coreAPI::registerStateStore('p', time() + 3600 * 2, '', '', 'cookie');
     parent::__construct();
     $this->eq = owa_coreAPI::getEventDispatch();
 }
Пример #3
0
 /**
  * Constructor
  *
  * @param string $ini_file
  * @param string_type $sections
  * @param string $return_format
  * @access public
  * @return ini_db
  */
 function __construct($ini_file, $sections = null, $return_format = 'object')
 {
     parent::__construct();
     $this->ini_file = $ini_file;
     $this->return_format = $return_format;
     if (!empty($sections)) {
         $this->db = $this->readINIfile($this->ini_file, ';');
     } else {
         $this->db = file($this->ini_file);
     }
 }
 function __construct($ua = '')
 {
     parent::__construct();
     // set user agent
     $this->ua = $ua;
     // init cache
     $this->cache =& owa_coreAPI::cacheSingleton();
     $this->cacheExpiration = owa_coreAPI::getSetting('base', 'default_cache_expiration_period');
     $this->cache->setCollectionExpirationPeriod('browscap', $this->cacheExpiration);
     //lookup robot in main browscap db
     $this->browser = $this->lookup($this->ua);
     $this->e->debug('Browser Name : ' . $this->browser->Browser);
 }
 function __construct()
 {
     return parent::__construct();
 }
 /**
  * Constructor
  *
  */
 function __construct($params = null)
 {
     parent::__construct($params);
     $this->t = new owa_template();
     $this->body = new owa_template($this->module);
     $this->setTheme();
     //header('Content-type: text/html; charset=utf-8');
 }
 function __construct($params = '')
 {
     return parent::__construct($params);
 }
 /**
  * Constructor
  * 
  *  
  */
 function __construct()
 {
     parent::__construct();
     $this->_registerEventHandlers();
     $this->_registerEventProcessors();
     $this->_registerEntities();
 }
 /**
  * Constructor
  *
  * @param array $params
  */
 function __construct($params)
 {
     // call parent constructor to setup objects.
     parent::__construct();
     // set request params
     $this->params = $params;
     // set the default view method
     $this->setViewMethod('delegate');
 }
 /**
  * Constructor
  *
  * @param array $config
  * @return owa_caller
  */
 function __construct($config = array())
 {
     if (empty($config)) {
         $config = array();
     }
     // Start time
     $this->start_time = owa_lib::microtime_float();
     /* SETUP CONFIGURATION AND ERROR LOGGER */
     // Parent Constructor. Sets default config entity and error logger
     parent::__construct();
     // Log version debug
     $this->e->debug(sprintf('*** Starting Open Web Analytics v%s. Running under PHP v%s (%s) ***', OWA_VERSION, PHP_VERSION, PHP_OS));
     if (array_key_exists('REQUEST_URI', $_SERVER)) {
         owa_coreAPI::debug('Request URL: ' . $_SERVER['REQUEST_URI']);
     }
     if (array_key_exists('HTTP_USER_AGENT', $_SERVER)) {
         owa_coreAPI::debug('User Agent: ' . $_SERVER['HTTP_USER_AGENT']);
     }
     if (array_key_exists('HTTP_HOST', $_SERVER)) {
         owa_coreAPI::debug('Host: ' . $_SERVER['HTTP_HOST']);
     }
     //owa_coreAPI::debug('cookie domain in caller: '. owa_coreAPI::getSetting('base', 'cookie_domain'));
     // Backtrace. handy for debugging who called OWA
     //$bt = debug_backtrace();
     //$this->e->debug($bt[4]);
     // load config values from DB
     // Applies config from db or cache
     // check here is needed for installs when the configuration table does not exist.
     if (!defined('OWA_INSTALLING')) {
         if ($this->c->get('base', 'do_not_fetch_config_from_db') != true) {
             if ($this->c->isConfigFilePresent()) {
                 $this->c->load($this->c->get('base', 'configuration_id'));
             }
         }
     }
     /* APPLY CALLER CONFIGURATION OVERRIDES */
     // overrides all default and user config values except defined in the config file
     // must come after user overides are applied
     // This will apply configuration overirdes that are specified by the calling application.
     // This is usually used by plugins to setup integration specific configuration values.
     $this->c->applyModuleOverrides('base', $config);
     $this->e->debug('Caller configuration overrides applied.');
     /* SET ERROR HANDLER */
     // Sets the correct mode of the error logger now that final config values are in place
     // This will flush buffered msgs that were thrown up untill this point
     $this->e->setHandler($this->c->get('base', 'error_handler'));
     /* PHP ERROR LOGGING */
     if (defined('OWA_LOG_PHP_ERRORS')) {
         $this->e->logPhpErrors();
     }
     /* LOAD SERVICE LAYER */
     $this->service =& owa_coreAPI::serviceSingleton();
     // initialize framework
     $this->service->initializeFramework();
     // notify handlers of 'init' action
     $dispatch = owa_coreAPI::getEventDispatch();
     $dispatch->notify($dispatch->makeEvent('init'));
     /* SET SITE ID */
     // needed in standalone installs where site_id is not set in config file.
     // still needed??????
     if (!empty($this->params['site_id'])) {
         $this->c->set('base', 'site_id', $this->params['site_id']);
     }
     // re-fetch the array now that overrides have been applied.
     // needed for backwards compatability
     $this->config = $this->c->fetch('base');
     /* SETUP REQUEST Params */
     // still needed?????
     $this->params = $this->service->request->getAllOwaParams();
 }
Пример #11
0
 function __construct($params = array())
 {
     if (!empty($params)) {
         $this->params = $params;
     }
     //$this->db = owa_coreAPI::dbSingleton();
     //$this->pagination = new owa_pagination;
     return parent::__construct();
 }
 function __construct($db_host, $db_name, $db_user, $db_password, $open_new_connection = true, $persistant = false)
 {
     $this->connectionParams = array('host' => $db_host, 'user' => $db_user, 'password' => $db_password, 'name' => $db_name, 'open_new_connection' => $open_new_connection, 'persistant' => $persistant);
     return parent::__construct();
 }
Пример #13
0
 /**
  * Constructor
  *
  */
 function __construct($params = null)
 {
     parent::__construct($params);
     $this->t = new owa_template();
     $this->body = new owa_template($this->module);
     $this->setTheme();
     $this->setCss("base/css/owa.css");
 }
Пример #14
0
 /**
  * Constructor
  * 
  *  
  */
 function __construct()
 {
     parent::__construct();
     /**
      * Register Filters
      */
     //$this->registerFilters();
     /**
      * Register Metrics
      */
     $this->registerMetrics();
     /**
      * Register Dimensions
      */
     $this->registerDimensions();
     /**
      * Register CLI Commands
      */
     $this->registerCliCommands();
     /**
      * Register API Methods
      */
     $this->registerApiMethods();
     /**
      * Register Background Jobs
      */
     $this->registerBackgroundJobs();
     /**
      * Register Build Packages
      */
     $this->registerBuildPackages();
     $this->_registerEventHandlers();
     $this->_registerEventProcessors();
     $this->_registerEntities();
 }
 function __construct($db = '')
 {
     if ($db) {
         $this->db = $db;
     } else {
         $this->db = owa_coreAPI::dbSingleton();
     }
     $this->formatters = array('timestamp' => array($this, 'formatSeconds'), 'percentage' => array($this, 'formatPercentage'), 'integer' => array($this, 'numberFormatter'), 'currency' => array($this, 'formatCurrency'));
     return parent::__construct();
 }
Пример #16
0
 /**
  * Constructor
  *
  * @return owa_install
  */
 function __construct()
 {
     parent::__construct();
     $this->db = owa_coreAPI::dbSingleton();
 }