/** * Static initializer; this runs ONE time only. * * @return boolean Returns the `$initialized` property w/ a TRUE value. * * @throws exception If attempting to run this from a root directory. */ public static function initialize() { if (self::$initialized) { return TRUE; } // Initialized already. /* * Handle some dynamic regex replacement codes in class properties (as follows). */ $webshark_home_dir = !empty($_SERVER['WEBSHARK_HOME']) ? (string) $_SERVER['WEBSHARK_HOME'] : '/webshark/home'; self::$local_wp_dev_dir = str_replace('%%$_SERVER[WEBSHARK_HOME]%%', $webshark_home_dir, self::$local_wp_dev_dir); /* * Easier access for those who DON'T CARE about the version (PHP v5.3+ only). */ if (!$GLOBALS[__FILE__]['is_in_stand_alone_mode'] && !class_exists('xd__deps_x') && function_exists('class_alias')) { class_alias('deps_x_xd_v141226_dev', 'xd__deps_x'); } if ($GLOBALS[__FILE__]['is_in_stand_alone_mode'] && !class_exists('xd__deps_x_stand_alone') && function_exists('class_alias')) { class_alias('deps_x_stand_alone_xd_v141226_dev', 'xd__deps_x_stand_alone'); } return self::$initialized = TRUE; }