summaryrefslogtreecommitdiffstats
path: root/system/libraries/Loader.php
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2008-05-13 06:22:33 +0200
committerDerek Jones <derek.jones@ellislab.com>2008-05-13 06:22:33 +0200
commit0b59f270a432f8c7b6128981f0a39b4a2e2fbd34 (patch)
tree1e7655eabd76bb981692f5d4f21cb1fc7be3e9cd /system/libraries/Loader.php
parent5cf664748ee295867f593d7eb7991bd35fe8eca6 (diff)
Some sweeping syntax changes for consistency:
(! foo) changed to ( ! foo) || changed to OR changed newline standardization code in various places from preg_replace to str_replace
Diffstat (limited to 'system/libraries/Loader.php')
-rw-r--r--system/libraries/Loader.php40
1 files changed, 20 insertions, 20 deletions
diff --git a/system/libraries/Loader.php b/system/libraries/Loader.php
index 7c6da8849..5e3819ea6 100644
--- a/system/libraries/Loader.php
+++ b/system/libraries/Loader.php
@@ -1,4 +1,4 @@
-<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -152,7 +152,7 @@ class CI_Loader {
$model = strtolower($model);
- if (! file_exists(APPPATH.'models/'.$path.$model.EXT))
+ if ( ! file_exists(APPPATH.'models/'.$path.$model.EXT))
{
show_error('Unable to locate the model you have specified: '.$model);
}
@@ -165,7 +165,7 @@ class CI_Loader {
$CI->load->database($db_conn, FALSE, TRUE);
}
- if (! class_exists('Model'))
+ if ( ! class_exists('Model'))
{
load_class('Model', FALSE);
}
@@ -230,7 +230,7 @@ class CI_Loader {
*/
function dbutil()
{
- if (! class_exists('CI_DB'))
+ if ( ! class_exists('CI_DB'))
{
$this->database();
}
@@ -260,7 +260,7 @@ class CI_Loader {
*/
function dbforge()
{
- if (! class_exists('CI_DB'))
+ if ( ! class_exists('CI_DB'))
{
$this->database();
}
@@ -355,7 +355,7 @@ class CI_Loader {
*/
function helper($helpers = array())
{
- if (! is_array($helpers))
+ if ( ! is_array($helpers))
{
$helpers = array($helpers);
}
@@ -376,7 +376,7 @@ class CI_Loader {
{
$base_helper = BASEPATH.'helpers/'.$helper.EXT;
- if (! file_exists($base_helper))
+ if ( ! file_exists($base_helper))
{
show_error('Unable to load the requested file: helpers/'.$helper.EXT);
}
@@ -437,7 +437,7 @@ class CI_Loader {
*/
function plugin($plugins = array())
{
- if (! is_array($plugins))
+ if ( ! is_array($plugins))
{
$plugins = array($plugins);
}
@@ -507,7 +507,7 @@ class CI_Loader {
*/
function script($scripts = array())
{
- if (! is_array($scripts))
+ if ( ! is_array($scripts))
{
$scripts = array($scripts);
}
@@ -521,7 +521,7 @@ class CI_Loader {
continue;
}
- if (! file_exists(APPPATH.'scripts/'.$script.EXT))
+ if ( ! file_exists(APPPATH.'scripts/'.$script.EXT))
{
show_error('Unable to load the requested script: scripts/'.$script.EXT);
}
@@ -546,7 +546,7 @@ class CI_Loader {
{
$CI =& get_instance();
- if (! is_array($file))
+ if ( ! is_array($file))
{
$file = array($file);
}
@@ -632,7 +632,7 @@ class CI_Loader {
// Set the default data variables
foreach (array('_ci_view', '_ci_vars', '_ci_path', '_ci_return') as $_ci_val)
{
- $$_ci_val = (! isset($_ci_data[$_ci_val])) ? FALSE : $_ci_data[$_ci_val];
+ $$_ci_val = ( ! isset($_ci_data[$_ci_val])) ? FALSE : $_ci_data[$_ci_val];
}
// Set the path to the requested file
@@ -648,7 +648,7 @@ class CI_Loader {
$_ci_file = end($_ci_x);
}
- if (! file_exists($_ci_path))
+ if ( ! file_exists($_ci_path))
{
show_error('Unable to load the requested file: '.$_ci_file);
}
@@ -662,7 +662,7 @@ class CI_Loader {
$_ci_CI =& get_instance();
foreach (get_object_vars($_ci_CI) as $_ci_key => $_ci_var)
{
- if (! isset($this->$_ci_key))
+ if ( ! isset($this->$_ci_key))
{
$this->$_ci_key =& $_ci_CI->$_ci_key;
}
@@ -703,7 +703,7 @@ class CI_Loader {
if ((bool) @ini_get('short_open_tag') === FALSE AND config_item('rewrite_short_tags') == TRUE)
{
- echo eval('?>'.preg_replace("/;*\s*\?>/", "; ?>", str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
+ echo eval(preg_replace("/;*\s*\?>/", "; ?>", str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
}
else
{
@@ -770,7 +770,7 @@ class CI_Loader {
{
$baseclass = BASEPATH.'libraries/'.ucfirst($class).EXT;
- if (! file_exists($baseclass))
+ if ( ! file_exists($baseclass))
{
log_message('error', "Unable to load the requested class: ".$class);
show_error("Unable to load the requested class: ".$class);
@@ -799,7 +799,7 @@ class CI_Loader {
$filepath = $path.'libraries/'.$class.EXT;
// Does the file exist? No? Bummer...
- if (! file_exists($filepath))
+ if ( ! file_exists($filepath))
{
continue;
}
@@ -860,7 +860,7 @@ class CI_Loader {
}
// Set the variable name we will assign the class to
- $classvar = (! isset($this->_ci_varmap[$class])) ? $class : $this->_ci_varmap[$class];
+ $classvar = ( ! isset($this->_ci_varmap[$class])) ? $class : $this->_ci_varmap[$class];
// Instantiate the class
$CI =& get_instance();
@@ -890,7 +890,7 @@ class CI_Loader {
{
include_once(APPPATH.'config/autoload'.EXT);
- if (! isset($autoload))
+ if ( ! isset($autoload))
{
return FALSE;
}
@@ -918,7 +918,7 @@ class CI_Loader {
// A little tweak to remain backward compatible
// The $autoload['core'] item was deprecated
- if (! isset($autoload['libraries']))
+ if ( ! isset($autoload['libraries']))
{
$autoload['libraries'] = $autoload['core'];
}