Skip to content

Commit

Permalink
adding php5 public and static keywords to functions
Browse files Browse the repository at this point in the history
removing php4 constructorrs
  • Loading branch information
padams committed Jul 5, 2010
1 parent 702156b commit 333d456
Show file tree
Hide file tree
Showing 46 changed files with 166 additions and 599 deletions.
34 changes: 14 additions & 20 deletions eventQueue.php
Expand Up @@ -54,15 +54,6 @@ class eventQueue {
*/
var $listenersByFilterType;

/**
* PHP4 Constructor
*
*/
function eventQueue() {

return eventQueue::__construct();
}

/**
* Constructor
*
Expand Down Expand Up @@ -139,17 +130,20 @@ function notify($event) {
owa_coreAPI::debug("Notifying listeners of ".$event->getEventType());
//print_r($this->listenersByEventType[$event_type] );
//print $event->getEventType();
$list = $this->listenersByEventType[$event->getEventType()];
//print_r($list);
if (!empty($list)) {
foreach ($this->listenersByEventType[$event->getEventType()] as $k => $observer_id) {
//print_r($list);
call_user_func_array($this->listeners[$observer_id], array($event));
//owa_coreAPI::debug(print_r($event, true));
owa_coreAPI::debug(sprintf("%s event handled by %s.",$event->getEventType(), get_class($this->listeners[$observer_id][0])));
if (array_key_exists($event->getEventType(), $this->listenersByEventType)) {
$list = $this->listenersByEventType[$event->getEventType()];
//print_r($list);
if (!empty($list)) {
foreach ($this->listenersByEventType[$event->getEventType()] as $k => $observer_id) {
//print_r($list);
call_user_func_array($this->listeners[$observer_id], array($event));
//owa_coreAPI::debug(print_r($event, true));
owa_coreAPI::debug(sprintf("%s event handled by %s.",$event->getEventType(), get_class($this->listeners[$observer_id][0])));
}
}
}

} else {
owa_coreAPI::debug("no listeners registered for this event type.");
}

}

Expand Down Expand Up @@ -318,7 +312,7 @@ function makeEvent($type = '') {
* @return object
* @access public
*/
function &get_instance() {
public static function &get_instance() {

static $eq;

Expand Down
3 changes: 2 additions & 1 deletion includes/template_class.php
Expand Up @@ -80,7 +80,8 @@ function set_template($file = null) {
function set($name, $value) {

if (is_object($value)) {
if (is_a($value, 'Template')) {
$class = 'Template';
if ($value instanceof $this) {
$value = $value->fetch();
}
}
Expand Down
5 changes: 0 additions & 5 deletions modules/base/classes/browscap.php
Expand Up @@ -60,11 +60,6 @@ class owa_browscap extends owa_base {
var $cache;
var $cacheExpiration;

function owa_browscap($ua = '') {

return owa_browscap::__construct($ua);
}

function __construct($ua = '') {

parent::__construct();
Expand Down
7 changes: 0 additions & 7 deletions modules/base/classes/cache.php
Expand Up @@ -67,13 +67,6 @@ function __construct($cache_dir = '') {
}
}

function owa_cache($cache_dir = '') {

register_shutdown_function(array(&$this, "__destruct"));
return $this->__construct($cache_dir);

}

function setGlobalCollection($collection) {

return $this->global_collections[] = $collection;
Expand Down
5 changes: 0 additions & 5 deletions modules/base/classes/date.php
Expand Up @@ -56,11 +56,6 @@ function __construct() {
return;
}

function owa_date() {

return owa_date::__construct();
}

function set($date, $format = 'yyyymmdd') {

switch ($format) {
Expand Down
11 changes: 0 additions & 11 deletions modules/base/classes/error.php
Expand Up @@ -54,17 +54,6 @@ class owa_error {

var $c;


/**
* PHP4 Constructor
*
*/
function owa_error() {

return owa_error::__construct();
}


/**
* Constructor
*
Expand Down
7 changes: 1 addition & 6 deletions modules/base/classes/event.php
Expand Up @@ -74,12 +74,7 @@ class owa_event {
/**
* Constructor
* @access public
*/
function owa_event() {

return owa_event::__construct();
}

*/
function __construct() {

// Set GUID for event
Expand Down
5 changes: 0 additions & 5 deletions modules/base/classes/mailer.php
Expand Up @@ -34,11 +34,6 @@ class owa_mailer extends owa_base {

var $mailer;

function owa_mailer() {

return owa_mailer::__construct();
}

/**
* Constructor
*
Expand Down
1 change: 1 addition & 0 deletions modules/base/classes/resultSetManager.php
Expand Up @@ -97,6 +97,7 @@ class owa_resultSetManager extends owa_base {
var $query_params = array();
var $baseEntity;
var $metricObjectsByEntityMap = array();
var $errors = array();

function __construct($db = '') {

Expand Down
5 changes: 0 additions & 5 deletions modules/base/classes/service.php
Expand Up @@ -47,11 +47,6 @@ class owa_service extends owa_base {
var $denormalizedDimensions = array();
var $browscap;

function owa_service() {

return owa_service::__construct();
}

function __construct() {
owa_coreAPI::profile($this, __FUNCTION__, __LINE__);

Expand Down
7 changes: 0 additions & 7 deletions modules/base/classes/serviceUser.php
Expand Up @@ -40,13 +40,6 @@ function __construct() {

//parent::__construct();
$this->user = owa_coreApi::entityFactory('base.user');

return;
}

function owa_serviceUser() {

return owa_serviceUser::__construct();
}

function load($user_id) {
Expand Down
6 changes: 0 additions & 6 deletions modules/base/classes/state.php
Expand Up @@ -45,13 +45,7 @@ function __destruct() {

$this->persistState();
}

function owa_state() {

register_shutdown_function(array(&$this, "__destruct"));
return owa_state::__construct();
}

function persistState() {

return false;
Expand Down
5 changes: 0 additions & 5 deletions modules/base/entities/click.php
Expand Up @@ -29,11 +29,6 @@
*/

class owa_click extends owa_entity {

function owa_click() {

return owa_click::__construct();
}

function __construct() {

Expand Down
12 changes: 1 addition & 11 deletions modules/base/entities/configuration.php
Expand Up @@ -39,17 +39,7 @@ function __construct() {
$this->properties['settings'] = new owa_dbColumn;
$this->properties['settings']->setDataType(OWA_DTD_TEXT);
$this->setCachable();

return;

}

function owa_configuration() {
return owa_configuration::__construct();
}

}
}



?>
12 changes: 0 additions & 12 deletions modules/base/entities/exit.php
Expand Up @@ -29,19 +29,7 @@
*/

class owa_exit extends owa_entity {

//var $id = array('data_type' => OWA_DTD_BIGINT, 'is_primary_key' => true); // BIGINT,
//var $url = array('data_type' => OWA_DTD_VARCHAR255); // VARCHAR(255),
//var $site_name = array('data_type' => OWA_DTD_VARCHAR255); // VARCHAR(255),
//var $site = array('data_type' => OWA_DTD_VARCHAR255); // VARCHAR(255),
//var $exit_anchortext = array('data_type' => OWA_DTD_VARCHAR255); // VARCHAR(255),
//var $page_title = array('data_type' => OWA_DTD_VARCHAR255); // VARCHAR(255),

function owa_exit() {

return owa_exit::__construct();
}

function __construct() {

$this->setTableName('exit');
Expand Down
14 changes: 0 additions & 14 deletions modules/base/entities/host.php
Expand Up @@ -30,20 +30,6 @@

class owa_host extends owa_entity {

//var $id = array('data_type' => OWA_DTD_BIGINT, 'is_primary_key' => true); // BIGINT,
//var $ip_address = array('data_type' => OWA_DTD_VARCHAR255); // VARCHAR(255),
//var $host = array('data_type' => OWA_DTD_VARCHAR255); // VARCHAR(255),
//var $full_host = array('data_type' => OWA_DTD_VARCHAR255); // VARCHAR(255),
//var $city = array('data_type' => OWA_DTD_VARCHAR255); // varchar(255),
//var $country = array('data_type' => OWA_DTD_VARCHAR255); // varchar(255),
//var $latitude = array('data_type' => OWA_DTD_VARCHAR255); // varchar(255),
//var $longitude = array('data_type' => OWA_DTD_VARCHAR255); // varchar(255),

function owa_host() {

return owa_host::__construct();
}

function __construct() {

$this->setTableName('host');
Expand Down
33 changes: 0 additions & 33 deletions modules/base/entities/impression.php
Expand Up @@ -29,39 +29,6 @@
*/

class owa_impression extends owa_entity {
/*
var $id = array('data_type' => OWA_DTD_BIGINT, 'is_primary_key' => true); // BIGINT,
var $visitor_id = array('data_type' => OWA_DTD_BIGINT); // BIGINT,
var $session_id = array('data_type' => OWA_DTD_BIGINT); // BIGINT,
var $tag_id = array('data_type' => OWA_DTD_BIGINT); // BIGINT,
var $placement_id = array('data_type' => OWA_DTD_BIGINT); // BIGINT,
var $campaign_id = array('data_type' => OWA_DTD_BIGINT); // BIGINT,
var $ad_group_id = array('data_type' => OWA_DTD_BIGINT); // BIGINT,
var $ad_id = array('data_type' => OWA_DTD_BIGINT); // BIGINT,
var $site_id = array('data_type' => OWA_DTD_VARCHAR255); // VARCHAR(255),
var $last_impression_id = array('data_type' => OWA_DTD_BIGINT); // BIGINT,
var $last_impression_timestamp = array('data_type' => OWA_DTD_BIGINT); // BIGINT,
var $timestamp = array('data_type' => OWA_DTD_BIGINT); // BIGINT,
var $year = array('data_type' => OWA_DTD_INT); // INT,
var $month = array('data_type' => OWA_DTD_INT); // INT,
var $day = array('data_type' => OWA_DTD_INT); // INT,
var $dayofyear = array('data_type' => OWA_DTD_INT); // INT,
var $weekofyear = array('data_type' => OWA_DTD_INT); // INT,
var $hour = array('data_type' => OWA_DTD_TINYINT2); // tinyINT,
var $minute = array('data_type' => OWA_DTD_TINYINT2); // tinyINT,
var $msec = array('data_type' => OWA_DTD_BIGINT); // INT,
var $url = array('data_type' => OWA_DTD_VARCHAR255); // VARCHAR(255),
var $ua_id = array('data_type' => OWA_DTD_BIGINT); // BIGINT
var $ip_address = array('data_type' => OWA_DTD_VARCHAR255); // VARCHAR(255),
var $host = array('data_type' => OWA_DTD_VARCHAR255); // VARCHAR(255),
var $host_id = array('data_type' => OWA_DTD_VARCHAR255); // VARCHAR(255),
*/
function owa_impression() {

return owa_impression::__construct();
}

function __construct() {

Expand Down
8 changes: 0 additions & 8 deletions modules/base/entities/os.php
Expand Up @@ -30,14 +30,6 @@

class owa_os extends owa_entity {

//var $id = array('data_type' => OWA_DTD_BIGINT, 'is_primary_key' => true); // BIGINT,
//var $name = array('data_type' => OWA_DTD_VARCHAR255); // VARCHAR(255),

function owa_os() {

return owa_os::__construct();
}

function __construct() {

$this->setTableName('os');
Expand Down
5 changes: 0 additions & 5 deletions modules/base/entities/session.php
Expand Up @@ -30,11 +30,6 @@

class owa_session extends owa_entity {

function owa_session() {

return owa_session::__construct();
}

function __construct() {

// table name
Expand Down
5 changes: 0 additions & 5 deletions modules/base/entities/site.php
Expand Up @@ -32,11 +32,6 @@

class owa_site extends owa_entity {

function owa_site() {

return owa_site::__construct();
}

function __construct() {

$this->setTableName('site');
Expand Down
7 changes: 0 additions & 7 deletions modules/base/entities/ua.php
Expand Up @@ -29,12 +29,7 @@
*/

class owa_ua extends owa_entity {

function owa_ua() {

return owa_ua::__construct();
}

function __construct() {

$this->setTableName('ua');
Expand All @@ -53,6 +48,4 @@ function __construct() {
}
}



?>
8 changes: 0 additions & 8 deletions modules/base/handlers/clickHandlers.php
Expand Up @@ -29,14 +29,6 @@
*/
class owa_clickHandlers extends owa_observer {

/**
* Constructor
*
*/
function __construct() {

return parent::__construct();
}
/**
* Notify Handler
*
Expand Down

0 comments on commit 333d456

Please sign in to comment.