diff --git a/classes/Config.php b/classes/Config.php index 91bf82a..849d974 100644 --- a/classes/Config.php +++ b/classes/Config.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman @@ -78,7 +78,7 @@ class Config extends Object { $environments = $config['environments']; - // Is this a CLI script + // Is this a CLI script $is_cli = !isset($_SERVER['REQUEST_METHOD']); // If we're on the CLI, check an environment was even passed in @@ -214,7 +214,7 @@ class Config extends Object $array[$key] = $value; } } - + return $array; } diff --git a/classes/Controller.php b/classes/Controller.php index ba037b2..49333cb 100644 --- a/classes/Controller.php +++ b/classes/Controller.php @@ -334,7 +334,7 @@ class Controller extends Object $valid_request = false; $error_message = 'An unexpected error has occurred'; - + // Determines if the request method is valid for this request if ($module->method != false) { diff --git a/classes/Convert.php b/classes/Convert.php index a1df500..1844f07 100644 --- a/classes/Convert.php +++ b/classes/Convert.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman @@ -25,7 +25,7 @@ class Convert /** * To JSON * - * Encodes passed variable as JSON. + * Encodes passed variable as JSON. * * Requires PHP 5 >= 5.2.0 or PECL json >= 1.2.0 * Note: PECL json 1.2.1 is included /vendors @@ -94,7 +94,7 @@ class Convert { // Nest the value if the node is an integer $new_value = (is_int($node2) ? $value2 : array($node2 => $value2)); - + $xml .= ($format ? str_repeat("\t", $level) : ''); $xml .= '<' . $node . '>' . ($format ? "\n" : ''); $xml .= self::arrayToXML($new_value, $format, $level + 1); diff --git a/classes/Database.php b/classes/Database.php index fae2826..a65231e 100644 --- a/classes/Database.php +++ b/classes/Database.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman @@ -20,7 +20,7 @@ * * Generic class to simplify connecting to a database. All database objects * should be created by this class to future proof against any internal changes - * to PICKLES. + * to PICKLES. */ class Database extends Object { @@ -77,7 +77,7 @@ class Database extends Object if (isset($config->datasources[$name])) { $datasource = $config->datasources[$name]; - + $datasource['driver'] = strtolower($datasource['driver']); if (!isset(self::$instances['Database'][$name])) @@ -98,7 +98,7 @@ class Database extends Object // Instantiates our database class $class = 'Database_' . $class; $instance = new $class(); - + // Sets our database parameters if (isset($datasource['hostname'])) { diff --git a/classes/Database/Common.php b/classes/Database/Common.php index 75c8afb..3b226f1 100644 --- a/classes/Database/Common.php +++ b/classes/Database/Common.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman diff --git a/classes/Database/Mongo.php b/classes/Database/Mongo.php index 4c35939..0f93549 100644 --- a/classes/Database/Mongo.php +++ b/classes/Database/Mongo.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman @@ -101,7 +101,7 @@ class Database_Mongo extends Database_Common return true; } - + /** * Fetch records from the database */ diff --git a/classes/Database/PDO/Common.php b/classes/Database/PDO/Common.php index 0ffe65c..9edd037 100644 --- a/classes/Database/PDO/Common.php +++ b/classes/Database/PDO/Common.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman @@ -20,7 +20,7 @@ * * Parent class for any of our database classes that use PDO. */ -class Database_PDO_Common extends Database_Common +class Database_PDO_Common extends Database_Common { /** * DSN format diff --git a/classes/Database/PDO/MySQL.php b/classes/Database/PDO/MySQL.php index e44f638..f6bfe2c 100644 --- a/classes/Database/PDO/MySQL.php +++ b/classes/Database/PDO/MySQL.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman @@ -27,7 +27,7 @@ class Database_PDO_MySQL extends Database_PDO_Common * @var string */ protected $driver = 'pdo_mysql'; - + /** * DSN format * diff --git a/classes/Database/PDO/PostgreSQL.php b/classes/Database/PDO/PostgreSQL.php index 11b5751..e7c728e 100644 --- a/classes/Database/PDO/PostgreSQL.php +++ b/classes/Database/PDO/PostgreSQL.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman diff --git a/classes/Database/PDO/SQLite.php b/classes/Database/PDO/SQLite.php index eb6134c..d3a15e2 100644 --- a/classes/Database/PDO/SQLite.php +++ b/classes/Database/PDO/SQLite.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman @@ -27,7 +27,7 @@ class Database_PDO_SQLite extends Database_PDO_Common * @var string */ protected $driver = 'pdo_sqlite'; - + /** * DSN format * diff --git a/classes/Display/Common.php b/classes/Display/Common.php index 5cbd11a..29d3c8e 100644 --- a/classes/Display/Common.php +++ b/classes/Display/Common.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman diff --git a/classes/Display/JSON.php b/classes/Display/JSON.php index d07bd20..acba198 100644 --- a/classes/Display/JSON.php +++ b/classes/Display/JSON.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman diff --git a/classes/Display/PHP.php b/classes/Display/PHP.php index 079977b..b554890 100644 --- a/classes/Display/PHP.php +++ b/classes/Display/PHP.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman @@ -61,7 +61,7 @@ class Display_PHP extends Display_Common { // Starts up the buffer ob_start(); - + // Puts the class variables in local scope of the template $__config = $this->config; $__meta = $this->meta_data; diff --git a/classes/Display/RSS.php b/classes/Display/RSS.php index b298c0b..f2694cb 100644 --- a/classes/Display/RSS.php +++ b/classes/Display/RSS.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman @@ -41,7 +41,7 @@ class Display_RSS extends Display_Common private $date_format = 'r'; // }}} - + // {{{ Channel Defaults /** diff --git a/classes/Display/XML.php b/classes/Display/XML.php index 4bbbefa..ed5bb47 100644 --- a/classes/Display/XML.php +++ b/classes/Display/XML.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman diff --git a/classes/Dynamic.php b/classes/Dynamic.php index b904f6c..589f666 100644 --- a/classes/Dynamic.php +++ b/classes/Dynamic.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman @@ -23,7 +23,7 @@ * * Note: you will want to add a mod_rewrite line to your .htaccess to support * the routing to the filenames with the timestamp injected: - * + * * RewriteRule ^(.+)\.([\d]+)\.(css|js|gif|png|jpg|jpeg)$ /$1.$3 [NC,QSA] */ class Dynamic extends Object @@ -64,7 +64,7 @@ class Dynamic extends Object // Adds the dot so the file functions can find the file $file = '.' . $reference; } - + if (file_exists($file)) { // Replaces the extension with time().extension @@ -103,7 +103,7 @@ class Dynamic extends Object { throw new Exception('Reference value must be absolute (e.g. /path/to/file.png)'); } - + return $reference; } @@ -141,7 +141,7 @@ class Dynamic extends Object $parts[key($parts)] = 'min.' . current($parts); $minified_reference = implode('.', $parts); } - + $original_filename = '.' . $original_reference; $minified_filename = '.' . $minified_reference; @@ -192,7 +192,7 @@ class Dynamic extends Object { throw new Exception('Supplied reference does not exist'); } - + break; default: @@ -234,7 +234,7 @@ class Dynamic extends Object $parts[key($parts)] = 'min.' . current($parts); $minified_reference = implode('.', $parts); } - + $original_filename = '.' . $original_reference; $minified_filename = '.' . $minified_reference; diff --git a/classes/Error.php b/classes/Error.php index 5b09547..8b92cad 100644 --- a/classes/Error.php +++ b/classes/Error.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman diff --git a/classes/Form.php b/classes/Form.php index 8528363..56fb51a 100644 --- a/classes/Form.php +++ b/classes/Form.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman @@ -21,7 +21,7 @@ * This class contains methods for easily generating form elements. There is a * heavy focus on select boxes as they have the most overhead for a developer. */ -class Form extends Object +class Form extends Object { /** * Get Instance diff --git a/classes/Log.php b/classes/Log.php index d273e85..053647b 100644 --- a/classes/Log.php +++ b/classes/Log.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman diff --git a/classes/Model.php b/classes/Model.php index 13fd3db..6fab52b 100644 --- a/classes/Model.php +++ b/classes/Model.php @@ -250,7 +250,7 @@ class Model extends Object $this->table = $this->collection; } - // If we're using an RDBMS (not Mongo) proceed with using SQL to pull the data + // If we're using an RDBMS (not Mongo) proceed with using SQL to pull the data if ($this->db->getDriver() != 'mongo') { // Starts with a basic SELECT ... FROM @@ -547,7 +547,7 @@ class Model extends Object $sql .= implode(', ', array_fill(1, count($value), '?')); $this->input_parameters = array_merge($this->input_parameters, $value); } - + $sql .= ')'; } else diff --git a/classes/Module.php b/classes/Module.php index c68c4d0..e0770d8 100644 --- a/classes/Module.php +++ b/classes/Module.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman diff --git a/classes/Object.php b/classes/Object.php index 0163f4a..4fea38c 100644 --- a/classes/Object.php +++ b/classes/Object.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman @@ -66,7 +66,7 @@ class Object { $this->config = Config::getInstance(); } - + // Assigns the profiler flag $this->profiler = (isset($this->config->pickles['profiler']) && $this->config->pickles['profiler'] != '' ? $this->config->pickles['profiler'] : false); diff --git a/classes/Profiler.php b/classes/Profiler.php index fd9eef2..9642c02 100644 --- a/classes/Profiler.php +++ b/classes/Profiler.php @@ -5,7 +5,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman @@ -88,7 +88,7 @@ class Profiler { } - + /** * Enabled * @@ -106,7 +106,7 @@ class Profiler $config = Config::getInstance(); self::$config = $config->pickles['profiler']; } - + // Checks if we're set to boolean true if (self::$config === true) { @@ -124,7 +124,7 @@ class Profiler } } } - + return false; } @@ -259,7 +259,7 @@ class Profiler else { self::Log('timer', 'Stopped timer ' . $timer . ' => Time Elapsed: ' . number_format((microtime(true) - self::$timers[$timer]) * 100, 3) . ' ms'); - + unset(self::$timers[$timer]); } diff --git a/classes/Security.php b/classes/Security.php index 5137c7b..d3d2da1 100644 --- a/classes/Security.php +++ b/classes/Security.php @@ -1,11 +1,11 @@ @@ -36,7 +36,7 @@ class Security * @var array */ private static $cache = array(); - + /** * Generate Hash * @@ -243,7 +243,7 @@ class Security { if (!isset($config[$variable])) { - $config[$variable] = $value; + $config[$variable] = $value; } } @@ -275,7 +275,7 @@ class Security } } } - + return false; } diff --git a/classes/String.php b/classes/String.php index 908152d..127dd76 100644 --- a/classes/String.php +++ b/classes/String.php @@ -63,7 +63,7 @@ class String // Trims whitespace, lowers the case then applies MD5 return md5(strtolower(trim($string))); } - + // }}} // {{{ Is Empty diff --git a/pickles.php b/pickles.php index 41a606f..b81cfcd 100644 --- a/pickles.php +++ b/pickles.php @@ -10,7 +10,7 @@ * * PHP version 5 * - * Licensed under The MIT License + * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * * @author Josh Sherman @@ -158,7 +158,7 @@ function __autoload($class) * since namespace support is 5.3+ and PICKLES strives to be 5.0+ compatible. * * Keep in mind that fatal errors cannot and will not be handled. - * + * * @param integer $errno the level of the error raised * @param string $errstr the error message * @param string $errfile filename that the error was raised in @@ -237,7 +237,7 @@ function __handleException($exception) - + @@ -251,12 +251,12 @@ function __handleException($exception) foreach ($trace as $key => $data) { $method = ''; - + if (isset($data['class'])) { $method .= $data['class'] . $data['type']; } - + $method .= $data['function'] . '()'; ?>
Trace