Cleaned up stray whitespace.
This commit is contained in:
parent
f500e78248
commit
89e2c3db19
26 changed files with 60 additions and 60 deletions
|
@ -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 <josh@gravityblvd.com>
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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 <josh@gravityblvd.com>
|
||||
|
@ -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);
|
||||
|
|
|
@ -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 <josh@gravityblvd.com>
|
||||
|
@ -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']))
|
||||
{
|
||||
|
|
|
@ -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 <josh@gravityblvd.com>
|
||||
|
|
|
@ -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 <josh@gravityblvd.com>
|
||||
|
@ -101,7 +101,7 @@ class Database_Mongo extends Database_Common
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Fetch records from the database
|
||||
*/
|
||||
|
|
|
@ -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 <josh@gravityblvd.com>
|
||||
|
@ -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
|
||||
|
|
|
@ -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 <josh@gravityblvd.com>
|
||||
|
@ -27,7 +27,7 @@ class Database_PDO_MySQL extends Database_PDO_Common
|
|||
* @var string
|
||||
*/
|
||||
protected $driver = 'pdo_mysql';
|
||||
|
||||
|
||||
/**
|
||||
* DSN format
|
||||
*
|
||||
|
|
|
@ -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 <josh@gravityblvd.com>
|
||||
|
|
|
@ -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 <josh@gravityblvd.com>
|
||||
|
@ -27,7 +27,7 @@ class Database_PDO_SQLite extends Database_PDO_Common
|
|||
* @var string
|
||||
*/
|
||||
protected $driver = 'pdo_sqlite';
|
||||
|
||||
|
||||
/**
|
||||
* DSN format
|
||||
*
|
||||
|
|
|
@ -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 <josh@gravityblvd.com>
|
||||
|
|
|
@ -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 <josh@gravityblvd.com>
|
||||
|
|
|
@ -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 <josh@gravityblvd.com>
|
||||
|
@ -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;
|
||||
|
|
|
@ -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 <josh@gravityblvd.com>
|
||||
|
@ -41,7 +41,7 @@ class Display_RSS extends Display_Common
|
|||
private $date_format = 'r';
|
||||
|
||||
// }}}
|
||||
|
||||
|
||||
// {{{ Channel Defaults
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 <josh@gravityblvd.com>
|
||||
|
|
|
@ -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 <josh@gravityblvd.com>
|
||||
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 <josh@gravityblvd.com>
|
||||
|
|
|
@ -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 <josh@gravityblvd.com>
|
||||
|
@ -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
|
||||
|
|
|
@ -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 <josh@gravityblvd.com>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 <josh@gravityblvd.com>
|
||||
|
|
|
@ -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 <josh@gravityblvd.com>
|
||||
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 <josh@gravityblvd.com>
|
||||
|
@ -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', '<span style="color:Orchid">Stopped timer</span> <span style="color:Yellow">' . $timer . '</span> <span style="color:#666">=></span> <span style="color:DarkKhaki">Time Elapsed:</span> ' . number_format((microtime(true) - self::$timers[$timer]) * 100, 3) . ' ms');
|
||||
|
||||
|
||||
unset(self::$timers[$timer]);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Security System for PICKLES
|
||||
* Security System for PICKLES
|
||||
*
|
||||
* 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 <josh@gravityblvd.com>
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ class String
|
|||
// Trims whitespace, lowers the case then applies MD5
|
||||
return md5(strtolower(trim($string)));
|
||||
}
|
||||
|
||||
|
||||
// }}}
|
||||
|
||||
// {{{ Is Empty
|
||||
|
|
10
pickles.php
10
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 <josh@gravityblvd.com>
|
||||
|
@ -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)
|
|||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th style="text-align:left" colspan="2">Trace</th>
|
||||
|
@ -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'] . '()';
|
||||
?>
|
||||
<tr>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue