Compare commits
7 commits
Author | SHA1 | Date | |
---|---|---|---|
|
c865e74ebd | ||
|
8bc9d52e06 | ||
|
43da0ac172 | ||
|
0c3b239417 | ||
|
d8e6c43868 | ||
|
ed90ee3501 | ||
|
8752540f31 |
46 changed files with 140 additions and 341 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,6 +5,7 @@
|
||||||
##########################
|
##########################
|
||||||
.*
|
.*
|
||||||
!.gitignore
|
!.gitignore
|
||||||
|
!.travis.yml
|
||||||
*~
|
*~
|
||||||
|
|
||||||
# Global/OSX.gitignore #
|
# Global/OSX.gitignore #
|
||||||
|
|
3
.travis.yml
Normal file
3
.travis.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2007-2013 Joshua Sherman
|
Copyright (c) 2007-2014 Joshua Sherman
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Common API Class File for PICKLES
|
* Common API Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Google Profanity Class File for PICKLES
|
* Google Profanity Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Gravatar Class File for PICKLES
|
* Gravatar Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Tinychat Class File for PICKLES
|
* Tinychat Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Browser Utility Collection
|
* Browser Utility Collection
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Caching System for PICKLES
|
* Caching System for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Configuration Class File for PICKLES
|
* Configuration Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
@ -171,19 +171,10 @@ class Config extends Object
|
||||||
// Defaults profiler to true if it doesn't match an option exactly
|
// Defaults profiler to true if it doesn't match an option exactly
|
||||||
if (isset($this->data['pickles']['profiler']))
|
if (isset($this->data['pickles']['profiler']))
|
||||||
{
|
{
|
||||||
if ($this->data['pickles']['profiler'] !== true)
|
// If we have an array convert to a string
|
||||||
|
if (is_array($this->data['pickles']['profiler']))
|
||||||
{
|
{
|
||||||
// If we have an array convert to a string
|
$this->data['pickles']['profiler'] = implode(',', $this->data['pickles']['profiler']);
|
||||||
if (is_array($this->data['pickles']['profiler']))
|
|
||||||
{
|
|
||||||
$this->data['pickles']['profiler'] = implode(',', $this->data['pickles']['profiler']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Checks that one of our known values exists, if not, force true
|
|
||||||
if (preg_match('/(objects|timers|queries|explains)/', $this->data['pickles']['profiler'] == false))
|
|
||||||
{
|
|
||||||
$this->data['pickles']['profiler'] = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Single Entry Controller
|
* Single Entry Controller
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
@ -487,7 +487,14 @@ class Controller extends Object
|
||||||
// Scrubs class names with hyphens
|
// Scrubs class names with hyphens
|
||||||
if (strpos($module_class, '-') !== false)
|
if (strpos($module_class, '-') !== false)
|
||||||
{
|
{
|
||||||
$module_class = preg_replace('/(-(.{1}))/e', 'strtoupper("$2")', $module_class);
|
$module_class = preg_replace_callback(
|
||||||
|
'/(-(.{1}))/',
|
||||||
|
function ($matches)
|
||||||
|
{
|
||||||
|
return strtoupper($matches[2]);
|
||||||
|
},
|
||||||
|
$module_class
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return array($module_class, $module_filename, $template_basename, $css_class, $js_basename);
|
return array($module_class, $module_filename, $template_basename, $css_class, $js_basename);
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Converter
|
* Converter
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Database Class File for PICKLES
|
* Database Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Common Database Class File for PICKLES
|
* Common Database Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* PDO Class File for PICKLES
|
* PDO Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
@ -227,7 +227,7 @@ class Database_PDO_Common extends Database_Common
|
||||||
$end_time = microtime(true);
|
$end_time = microtime(true);
|
||||||
$duration = $end_time - $start_time;
|
$duration = $end_time - $start_time;
|
||||||
|
|
||||||
if ($duration >= 1)
|
if ($duration >= 1 && isset($loggable_query))
|
||||||
{
|
{
|
||||||
Log::slowQuery($duration . ' seconds: ' . $loggable_query);
|
Log::slowQuery($duration . ' seconds: ' . $loggable_query);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* MySQL Class File for PICKLES
|
* MySQL Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* PostgreSQL Class File for PICKLES
|
* PostgreSQL Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* SQLite Class File for PICKLES
|
* SQLite Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Date Utility Collection
|
* Date Utility Collection
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Common Display Class File for PICKLES
|
* Common Display Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* JSON Display Class File for PICKLES
|
* JSON Display Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* PHP Display Class File for PICKLES
|
* PHP Display Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* RSS Display Class File for PICKLES
|
* RSS Display Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* XML Display Class File for PICKLES
|
* XML Display Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Distance
|
* Distance
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Dynamic Content Class File for PICKLES
|
* Dynamic Content Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Error Reporting for PICKLES
|
* Error Reporting for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* File Utility Collection
|
* File Utility Collection
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Form Class File for PICKLES
|
* Form Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* HTML Class File for PICKLES
|
* HTML Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Logging System for PICKLES
|
* Logging System for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Model Parent Class for PICKLES
|
* Model Parent Class for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Module Class File for PICKLES
|
* Module Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Number Utility Collection
|
* Number Utility Collection
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Object Class File for PICKLES
|
* Object Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Profiler
|
* Profiler
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Security System for PICKLES
|
* Security System for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Session Handling for PICKLES
|
* Session Handling for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Sorting Utility Collection
|
* Sorting Utility Collection
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* String Utility Collection
|
* String Utility Collection
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
@ -225,11 +225,11 @@ class String
|
||||||
{
|
{
|
||||||
if ($hover == true)
|
if ($hover == true)
|
||||||
{
|
{
|
||||||
$string = '<span title="' . $string . '">' . substr($string, 0, $length) . '…</span>';
|
$string = '<span title="' . $string . '">' . mb_strcut($string, 0, $length, 'UTF-8') . '…</span>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$string = substr($string, 0, $length) . '...';
|
$string = mb_strcut($string, 0, $length, 'UTF-8') . '…';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Time Utility Collection
|
* Time Utility Collection
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Validator
|
* Validator
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -8,13 +8,13 @@
|
||||||
* base is established as well as the path that Smarty will use to store
|
* base is established as well as the path that Smarty will use to store
|
||||||
* the compiled pages.
|
* the compiled pages.
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
@ -140,7 +140,7 @@ function __autoload($class)
|
||||||
|
|
||||||
if ($class == 'AYAH')
|
if ($class == 'AYAH')
|
||||||
{
|
{
|
||||||
$loaded = require_once PICKLES_VENDOR_PATH . '/ayah/' . $filename;
|
$loaded = require_once PICKLES_VENDOR_PATH . '/ayah/' . strtolower($filename);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,59 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
require_once 'classes/Convert.php';
|
|
||||||
define('JSON_AVAILABLE', true);
|
|
||||||
|
|
||||||
class ConvertTest extends PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @dataProvider providerToJSON
|
|
||||||
*/
|
|
||||||
public function testToJSON($a, $b)
|
|
||||||
{
|
|
||||||
$this->assertEquals(Convert::toJSON($a), $b);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function providerToJSON()
|
|
||||||
{
|
|
||||||
$object = (object)'object';
|
|
||||||
$object->foo = 'foo';
|
|
||||||
$object->bar = 'bar';
|
|
||||||
|
|
||||||
return array(
|
|
||||||
array('', '""'),
|
|
||||||
array('foo', '"foo"'),
|
|
||||||
array(array('bar'), '["bar"]'),
|
|
||||||
array(array('foo', 'bar'), '["foo","bar"]'),
|
|
||||||
array(19810223, '19810223'),
|
|
||||||
array(array(1981, 02, 23), '[1981,2,23]'),
|
|
||||||
array(array('foo', 1981), '["foo",1981]'),
|
|
||||||
array(array('foo', array('bar')), '["foo",["bar"]]'),
|
|
||||||
array($object, '{"scalar":"object","foo":"foo","bar":"bar"}'),
|
|
||||||
array(true, 'true'),
|
|
||||||
array(false, 'false'),
|
|
||||||
array(null, 'null'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @dataProvider providerArrayToXML
|
|
||||||
*/
|
|
||||||
public function testArrayToXML($a, $b, $c)
|
|
||||||
{
|
|
||||||
$this->assertEquals(Convert::arrayToXML($a, $b), $c);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function providerArrayToXML()
|
|
||||||
{
|
|
||||||
return array(
|
|
||||||
array('foo', false, ''),
|
|
||||||
array(array('foo', 'bar'), false, '<0>foo</0><1>bar</1>'),
|
|
||||||
array(array('foo', 'bar'), true, "<0>foo</0>\n<1>bar</1>\n"),
|
|
||||||
array(array('foo' => 'bar'), false, '<foo>bar</foo>'),
|
|
||||||
array(array('children' => array('child' => array('foo', 'bar'))), false, '<children><child>foo</child><child>bar</child></children>'),
|
|
||||||
array(array('children' => array('child' => array('foo', 'bar'))), true, "<children>\n\t<child>foo</child>\n\t<child>bar</child>\n</children>\n"),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
|
@ -1,32 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
require_once 'classes/Date.php';
|
|
||||||
|
|
||||||
class DateTest extends PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @dataProvider providerAge
|
|
||||||
*/
|
|
||||||
public function testAge($a, $b)
|
|
||||||
{
|
|
||||||
$this->assertEquals(Date::age($a), $b);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function providerAge()
|
|
||||||
{
|
|
||||||
ini_set('date.timezone', 'America/New_York');
|
|
||||||
|
|
||||||
$time = strtotime('-25 years');
|
|
||||||
|
|
||||||
return array(
|
|
||||||
array(date('Y-m-d', $time), '25'),
|
|
||||||
array(date('m/d/Y', $time), '25'),
|
|
||||||
array(date('r', $time), '25'),
|
|
||||||
array('today', '0'),
|
|
||||||
array('400 days ago', '1'),
|
|
||||||
array(true, Date::age('1969-12-31')),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
|
@ -1,112 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
require_once 'classes/String.php';
|
|
||||||
|
|
||||||
class StringTest extends PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @dataProvider providerFormatPhoneNumber
|
|
||||||
*/
|
|
||||||
public function testFormatPhoneNumber($a, $b)
|
|
||||||
{
|
|
||||||
$this->assertEquals(String::formatPhoneNumber($a), $b);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function providerFormatPhoneNumber()
|
|
||||||
{
|
|
||||||
return array(
|
|
||||||
array('1234567890', '123-456-7890'),
|
|
||||||
array('123 456 7890', '123-456-7890'),
|
|
||||||
array('123.456.7890', '123-456-7890'),
|
|
||||||
array('123_456_7890', '123-456-7890'),
|
|
||||||
array('1234567890', '123-456-7890'),
|
|
||||||
array('1234-56-7890', '123-456-7890'),
|
|
||||||
array('(123) 456-7890', '123-456-7890'),
|
|
||||||
array('1234567890 x1000', '123-456-7890x1000'),
|
|
||||||
array('(123) 456-7890_x10.00', '123-456-7890x1000'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @dataProvider providerGenerateGravatarHash
|
|
||||||
*/
|
|
||||||
public function testGenerateGravatarHash($a, $b)
|
|
||||||
{
|
|
||||||
$this->assertEquals(String::generateGravatarHash($a), $b);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function providerGenerateGravatarHash()
|
|
||||||
{
|
|
||||||
return array(
|
|
||||||
array('foo@bar.com', 'f3ada405ce890b6f8204094deb12d8a8'),
|
|
||||||
array('FOO@BAR.COM', 'f3ada405ce890b6f8204094deb12d8a8'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testIsEmpty()
|
|
||||||
{
|
|
||||||
$this->assertTrue(String::isEmpty(''));
|
|
||||||
$this->assertTrue(String::isEmpty(' '));
|
|
||||||
$this->assertTrue(String::isEmpty(false));
|
|
||||||
$this->assertTrue(String::isEmpty(null));
|
|
||||||
$this->assertTrue(String::isEmpty(true, false));
|
|
||||||
|
|
||||||
$this->assertFalse(String::isEmpty(0));
|
|
||||||
$this->assertFalse(String::isEmpty('foo'));
|
|
||||||
$this->assertFalse(String::isEmpty(' bar '));
|
|
||||||
$this->assertFalse(String::isEmpty(true));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testRandom()
|
|
||||||
{
|
|
||||||
$this->assertEquals(strlen(String::random()), 8);
|
|
||||||
$this->assertEquals(strlen(String::random(16)), 16);
|
|
||||||
|
|
||||||
$this->assertEquals(preg_match('/[A-Z0-9]/', String::random(32, true, true)), 1);
|
|
||||||
$this->assertEquals(preg_match('/[A-Z]/', String::random(32, true, false)), 1);
|
|
||||||
$this->assertEquals(preg_match('/[0-9]/', String::random(32, false, true)), 1);
|
|
||||||
|
|
||||||
$this->assertEquals(preg_match('/[0-9]/', String::random(32, true, false)), 0);
|
|
||||||
$this->assertEquals(preg_match('/[A-Z]/', String::random(32, false, true)), 0);
|
|
||||||
$this->assertEquals(preg_match('/[A-Z0-9]/', String::random(32, false, false)), 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @dataProvider providerTruncate
|
|
||||||
*/
|
|
||||||
public function testTruncate($a, $b, $c, $d)
|
|
||||||
{
|
|
||||||
$this->assertEquals(String::truncate($a, $b, $c), $d);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function providerTruncate()
|
|
||||||
{
|
|
||||||
return array(
|
|
||||||
array('foo bar', 3, true, '<span title="foo bar" style="cursor:help">foo...</span>'),
|
|
||||||
array('foo bar', 3, false, 'foo...'),
|
|
||||||
array('foo bar', 7, true, 'foo bar'),
|
|
||||||
array('foo bar', 8, true, 'foo bar'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @dataProvider providerUpperWords
|
|
||||||
*/
|
|
||||||
public function testUpperWords($a, $b)
|
|
||||||
{
|
|
||||||
$this->assertEquals(String::upperWords($a), $b);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function providerUpperWords()
|
|
||||||
{
|
|
||||||
return array(
|
|
||||||
array('foo bar', 'Foo Bar'),
|
|
||||||
array('FOO BAR', 'Foo Bar'),
|
|
||||||
array('fOO bAR', 'Foo Bar'),
|
|
||||||
array('foo@bar.com', 'foo@bar.com'),
|
|
||||||
array('FOO@BAR.COM', 'FOO@BAR.COM'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
Loading…
Add table
Add a link
Reference in a new issue