Merge branch 'master' into 2.0

This commit is contained in:
Josh Sherman 2014-10-03 11:08:50 -04:00
commit a866a1a61b
21 changed files with 84 additions and 111 deletions

View file

@ -32,7 +32,7 @@ before_script:
- phpenv rehash - phpenv rehash
script: script:
- phpunit --coverage-clover /home/travis/build/joshtronic/pickles/build/logs/clover.xml - phpunit --coverage-clover /home/travis/build/picklesphp/pickles/build/logs/clover.xml
after_success: after_success:
- php vendor/bin/coveralls --config ../.coveralls.yml -v - php vendor/bin/coveralls --config ../.coveralls.yml -v

View file

@ -1,7 +1,9 @@
# Pickles # Pickles
[![Build Status](https://travis-ci.org/joshtronic/pickles.png?branch=master)](https://travis-ci.org/joshtronic/pickles) [![Coverage Status](https://coveralls.io/repos/joshtronic/pickles/badge.png)](https://coveralls.io/r/joshtronic/pickles) [![Dependency Status](https://www.versioneye.com/user/projects/52d1bc1eec13751bde00002a/badge.png)](https://www.versioneye.com/user/projects/52d1bc1eec13751bde00002a) [![Build Status](https://travis-ci.org/picklesphp/pickles.png?branch=master)](https://travis-ci.org/picklesphp/pickles)
[![Stories in Ready](https://badge.waffle.io/joshtronic/pickles.png?label=ready&title=Ready)](https://waffle.io/joshtronic/pickles) [![Coverage Status](https://coveralls.io/repos/picklesphp/pickles/badge.png)](https://coveralls.io/r/picklesphp/pickles)
[![Dependency Status](https://www.versioneye.com/user/projects/52d1bc1eec13751bde00002a/badge.png)](https://www.versioneye.com/user/projects/52d1bc1eec13751bde00002a)
[![Stories in Ready](https://badge.waffle.io/picklesphp/pickles.png?label=ready&title=Ready)](https://waffle.io/picklesphp/pickles)
Pickles f/k/a PICKLES (PHP Interface Collection of Killer Libraries to Enhance Pickles f/k/a PICKLES (PHP Interface Collection of Killer Libraries to Enhance
Stuff) is an open source framework for the rapid development of RESTful Stuff) is an open source framework for the rapid development of RESTful
@ -23,7 +25,6 @@ acronym.
[JustinDavis]: http://justindavis.co [JustinDavis]: http://justindavis.co
[HolidayAPI]: https://github.com/gravityblvd/tools.gravityblvd.com [HolidayAPI]: https://github.com/gravityblvd/tools.gravityblvd.com
[MasterZip]: https://github.com/joshtronic/pickles/archive/master.zip [MasterZip]: https://github.com/picklesphp/pickles/archive/master.zip
[StackPost]: http://joshtronic.com/2014/01/13/your-stack-is-outdated/#.UuVzI3n0A18 [StackPost]: http://joshtronic.com/2014/01/13/your-stack-is-outdated/#.UuVzI3n0A18
[UPOZ]: https://github.com/krakjoe/uopz [v13.12]: https://github.com/picklesphp/pickles/tree/13.12
[v13.12]: https://github.com/joshtronic/pickles/tree/13.12

View file

@ -1,9 +1,9 @@
{ {
"name": "joshtronic/pickles", "name": "picklesphp/pickles",
"description": "The Pickles SOA Framework", "description": "The Pickles SOA Framework",
"type": "library", "type": "library",
"keywords": ["framework", "api", "soa", "oauth"], "keywords": ["framework", "api", "soa", "oauth"],
"homepage": "https://github.com/joshtronic/pickles", "homepage": "http://picklesphp.com",
"license": "MIT", "license": "MIT",
"authors": [ "authors": [
{ {
@ -13,8 +13,8 @@
} }
], ],
"support": { "support": {
"issues": "https://github.com/joshtronic/pickles/issues", "issues": "https://github.com/picklesphp/pickles/issues",
"source": "https://github.com/joshtronic/pickles" "source": "https://github.com/picklesphp/pickles"
}, },
"minimum-stability" : "dev", "minimum-stability" : "dev",
"require-dev": { "require-dev": {

View file

@ -1,9 +1,32 @@
<?php <?php
/**
* Auth Abstraction
*
* Licensed under The MIT License
* Redistribution of these files must retain the above copyright notice.
*
* @copyright Copyright 2007-2014, Josh Sherman
* @license http://www.opensource.org/licenses/mit-license.html
* @link http://picklesphp.com
* @package Pickles
*/
namespace Pickles; namespace Pickles;
/**
* Auth Abstract Class
*/
abstract class Auth extends Object abstract class Auth extends Object
{ {
/**
* Basic Auth
*
* Implement this method when using 'basic' auth. Allows you to roll a
* custom solution based on your needs. Want to use username and password?
* Rather use an API key and not worry about the password? Do it. Return
* true when authentication is successful and false when it is not.
*/
public function basic() public function basic()
{ {

View file

@ -3,16 +3,13 @@
/** /**
* Browser Utility Collection * Browser Utility Collection
* *
* PHP version 5
*
* 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 Josh Sherman <josh@gravityblvd.com>
* @copyright Copyright 2007-2014, Josh Sherman * @copyright Copyright 2007-2014, Josh Sherman
* @license http://www.opensource.org/licenses/mit-license.html * @license http://www.opensource.org/licenses/mit-license.html
* @package PICKLES * @link http://picklesphp.com
* @link https://github.com/joshtronic/pickles * @package Pickles
*/ */
namespace Pickles; namespace Pickles;

View file

@ -1,18 +1,15 @@
<?php <?php
/** /**
* Caching System for PICKLES * Caching System
*
* PHP version 5
* *
* 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 Josh Sherman <josh@gravityblvd.com>
* @copyright Copyright 2007-2014, Josh Sherman * @copyright Copyright 2007-2014, Josh Sherman
* @license http://www.opensource.org/licenses/mit-license.html * @license http://www.opensource.org/licenses/mit-license.html
* @package PICKLES * @link http://picklesphp.com
* @link https://github.com/joshtronic/pickles * @package Pickles
*/ */
namespace Pickles; namespace Pickles;
@ -26,7 +23,7 @@ namespace Pickles;
* don't entirely remember specifics, but the reason for not using Memcached() * don't entirely remember specifics, but the reason for not using Memcached()
* was due to an unexplainable bug in the version in the repository for Ubuntu * was due to an unexplainable bug in the version in the repository for Ubuntu
* 10.04 LTS. Memcached() does support more of the memcached protocol and will * 10.04 LTS. Memcached() does support more of the memcached protocol and will
* eventually be what PICKLES uses. Keys are forced to be uppercase for * eventually be what Pickles uses. Keys are forced to be uppercase for
* consistencies sake as I've been burned by the case sensitivity due to typos * consistencies sake as I've been burned by the case sensitivity due to typos
* in my code. * in my code.
* *

View file

@ -1,18 +1,15 @@
<?php <?php
/** /**
* Configuration Class File for PICKLES * Configuration
*
* PHP version 5
* *
* 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 Josh Sherman <josh@gravityblvd.com>
* @copyright Copyright 2007-2014, Josh Sherman * @copyright Copyright 2007-2014, Josh Sherman
* @license http://www.opensource.org/licenses/mit-license.html * @license http://www.opensource.org/licenses/mit-license.html
* @package PICKLES * @link http://picklesphp.com
* @link https://github.com/joshtronic/pickles * @package Pickles
*/ */
namespace Pickles; namespace Pickles;
@ -23,7 +20,7 @@ namespace Pickles;
* Handles loading the site's configuration file (if available). At the moment * Handles loading the site's configuration file (if available). At the moment
* this class is a very skewed Singleton. The plan is to eventually extend this * this class is a very skewed Singleton. The plan is to eventually extend this
* out to support multiple configuration files, and the ability to load in * out to support multiple configuration files, and the ability to load in
* custom config files on the fly as well. The core of PICKLES uses the class * custom config files on the fly as well. The core of Pickles uses the class
* as a Singleton so we're not loading the configuration multiple times per * as a Singleton so we're not loading the configuration multiple times per
* page load. * page load.
*/ */

View file

@ -3,16 +3,13 @@
/** /**
* Converter * Converter
* *
* PHP version 5
*
* 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 Josh Sherman <josh@gravityblvd.com>
* @copyright Copyright 2007-2014, Josh Sherman * @copyright Copyright 2007-2014, Josh Sherman
* @license http://www.opensource.org/licenses/mit-license.html * @license http://www.opensource.org/licenses/mit-license.html
* @package PICKLES * @link http://picklesphp.com
* @link https://github.com/joshtronic/pickles * @package Pickles
*/ */
namespace Pickles; namespace Pickles;

View file

@ -1,18 +1,15 @@
<?php <?php
/** /**
* Database Class File for PICKLES * Database Abstraction Layer
*
* PHP version 5
* *
* 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 Josh Sherman <josh@gravityblvd.com>
* @copyright Copyright 2007-2014, Josh Sherman * @copyright Copyright 2007-2014, Josh Sherman
* @license http://www.opensource.org/licenses/mit-license.html * @license http://www.opensource.org/licenses/mit-license.html
* @package PICKLES * @link http://picklesphp.com
* @link https://github.com/joshtronic/pickles * @package Pickles
* @todo Drop driver, hardcode drivers based on the type * @todo Drop driver, hardcode drivers based on the type
* @todo More assumptions for the datasource variables * @todo More assumptions for the datasource variables
*/ */

View file

@ -3,16 +3,13 @@
/** /**
* Date Utility Collection * Date Utility Collection
* *
* PHP version 5
*
* 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 Josh Sherman <josh@gravityblvd.com>
* @copyright Copyright 2007-2014, Josh Sherman * @copyright Copyright 2007-2014, Josh Sherman
* @license http://www.opensource.org/licenses/mit-license.html * @license http://www.opensource.org/licenses/mit-license.html
* @package PICKLES * @link http://picklesphp.com
* @link https://github.com/joshtronic/pickles * @package Pickles
*/ */
namespace Pickles; namespace Pickles;

View file

@ -3,16 +3,13 @@
/** /**
* Distance * Distance
* *
* PHP version 5
*
* 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 Josh Sherman <josh@gravityblvd.com>
* @copyright Copyright 2007-2014, Josh Sherman * @copyright Copyright 2007-2014, Josh Sherman
* @license http://www.opensource.org/licenses/mit-license.html * @license http://www.opensource.org/licenses/mit-license.html
* @package PICKLES * @link http://picklesphp.com
* @link https://github.com/joshtronic/pickles * @package Pickles
*/ */
namespace Pickles; namespace Pickles;

View file

@ -3,16 +3,13 @@
/** /**
* File Utility Collection * File Utility Collection
* *
* PHP version 5
*
* 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 Josh Sherman <josh@gravityblvd.com>
* @copyright Copyright 2007-2014, Josh Sherman * @copyright Copyright 2007-2014, Josh Sherman
* @license http://www.opensource.org/licenses/mit-license.html * @license http://www.opensource.org/licenses/mit-license.html
* @package PICKLES * @link http://picklesphp.com
* @link https://github.com/joshtronic/pickles * @package Pickles
*/ */
namespace Pickles; namespace Pickles;

View file

@ -1,18 +1,15 @@
<?php <?php
/** /**
* Model Parent Class for PICKLES * Model Parent Class
*
* PHP version 5
* *
* 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 Josh Sherman <josh@gravityblvd.com>
* @copyright Copyright 2007-2014, Josh Sherman * @copyright Copyright 2007-2014, Josh Sherman
* @license http://www.opensource.org/licenses/mit-license.html * @license http://www.opensource.org/licenses/mit-license.html
* @package PICKLES * @link http://picklesphp.com
* @link https://github.com/joshtronic/pickles * @package Pickles
*/ */
namespace Pickles; namespace Pickles;
@ -20,9 +17,9 @@ namespace Pickles;
/** /**
* Model Class * Model Class
* *
* This is a parent class that all PICKLES data models should be extending. When * This is a parent class that all Pickles data models should be extending.
* using the class as designed, objects will function as active record pattern * When using the class as designed, objects will function as active record
* objects. * pattern objects.
*/ */
class Model extends Object class Model extends Object
{ {

View file

@ -3,16 +3,13 @@
/** /**
* Number Utility Collection * Number Utility Collection
* *
* PHP version 5
*
* 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 Josh Sherman <josh@gravityblvd.com>
* @copyright Copyright 2007-2014, Josh Sherman * @copyright Copyright 2007-2014, Josh Sherman
* @license http://www.opensource.org/licenses/mit-license.html * @license http://www.opensource.org/licenses/mit-license.html
* @package PICKLES * @link http://picklesphp.com
* @link https://github.com/joshtronic/pickles * @package Pickles
*/ */
namespace Pickles; namespace Pickles;

View file

@ -1,18 +1,15 @@
<?php <?php
/** /**
* Object Class File for PICKLES * Parent Object
*
* PHP version 5
* *
* 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 Josh Sherman <josh@gravityblvd.com>
* @copyright Copyright 2007-2014, Josh Sherman * @copyright Copyright 2007-2014, Josh Sherman
* @license http://www.opensource.org/licenses/mit-license.html * @license http://www.opensource.org/licenses/mit-license.html
* @package PICKLES * @link http://picklesphp.com
* @link https://github.com/joshtronic/pickles * @package Pickles
*/ */
namespace Pickles; namespace Pickles;
@ -20,7 +17,7 @@ namespace Pickles;
/** /**
* Object Class * Object Class
* *
* Every instantiated class in PICKLES should be extending this class. By doing * Every instantiated class in Pickles should be extending this class. By doing
* so the class is automatically hooked into the profiler, and the object will * so the class is automatically hooked into the profiler, and the object will
* have access to some common components as well. * have access to some common components as well.
*/ */

View file

@ -3,16 +3,13 @@
/** /**
* Profiler * Profiler
* *
* PHP version 5
*
* 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 Josh Sherman <josh@gravityblvd.com>
* @copyright Copyright 2007-2014, Josh Sherman * @copyright Copyright 2007-2014, Josh Sherman
* @license http://www.opensource.org/licenses/mit-license.html * @license http://www.opensource.org/licenses/mit-license.html
* @package PICKLES * @link http://picklesphp.com
* @link https://github.com/joshtronic/pickles * @package Pickles
*/ */
namespace Pickles; namespace Pickles;

View file

@ -1,18 +1,15 @@
<?php <?php
/** /**
* Resource Class File for PICKLES * Resource Class
*
* PHP version 5
* *
* 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 Josh Sherman <josh@gravityblvd.com>
* @copyright Copyright 2007-2014, Josh Sherman * @copyright Copyright 2007-2014, Josh Sherman
* @license http://www.opensource.org/licenses/mit-license.html * @license http://www.opensource.org/licenses/mit-license.html
* @package PICKLES * @link http://picklesphp.com
* @link https://github.com/joshtronic/pickles * @package Pickles
*/ */
namespace Pickles; namespace Pickles;
@ -20,7 +17,7 @@ namespace Pickles;
/** /**
* Resource Class * Resource Class
* *
* This is a parent class that all PICKLES modules should be extending. Each * This is a parent class that all Pickles modules should be extending. Each
* module can specify it's own meta data and whether or not a user must be * module can specify it's own meta data and whether or not a user must be
* properly authenticated to view the page. Currently any pages without a * properly authenticated to view the page. Currently any pages without a
* template are treated as pages being requested via AJAX and the return will * template are treated as pages being requested via AJAX and the return will
@ -362,7 +359,7 @@ class Resource extends Object
{ {
http_response_code($this->status); http_response_code($this->status);
header('Content-Type: application/json'); header('Content-Type: application/json');
header('X-Powered-By: Pickles v2 - https://github.com/joshtronic/pickles'); header('X-Powered-By: Pickles v2 - https://picklesphp.com');
$meta = [ $meta = [
'status' => $this->status, 'status' => $this->status,

View file

@ -1,18 +1,15 @@
<?php <?php
/** /**
* Single Entry Router * Endpoint Router
*
* PHP version 5
* *
* 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 Josh Sherman <josh@gravityblvd.com>
* @copyright Copyright 2007-2014, Josh Sherman * @copyright Copyright 2007-2014, Josh Sherman
* @license http://www.opensource.org/licenses/mit-license.html * @license http://www.opensource.org/licenses/mit-license.html
* @package PICKLES * @link http://picklesphp.com
* @link https://github.com/joshtronic/pickles * @package Pickles
*/ */
namespace Pickles; namespace Pickles;
@ -20,7 +17,7 @@ namespace Pickles;
/** /**
* Router Class * Router Class
* *
* The heavy lifter of PICKLES, makes the calls to get the session and * The heavy lifter of Pickles, makes the calls to get the session and
* configuration loaded. Loads modules, serves up user authentication when the * configuration loaded. Loads modules, serves up user authentication when the
* module asks for it, and loads the viewer that the module requested. Default * module asks for it, and loads the viewer that the module requested. Default
* values are present to make things easier on the user. * values are present to make things easier on the user.

View file

@ -3,16 +3,13 @@
/** /**
* Sorting Utility Collection * Sorting Utility Collection
* *
* PHP version 5
*
* 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 Josh Sherman <josh@gravityblvd.com>
* @copyright Copyright 2007-2014, Josh Sherman * @copyright Copyright 2007-2014, Josh Sherman
* @license http://www.opensource.org/licenses/mit-license.html * @license http://www.opensource.org/licenses/mit-license.html
* @package PICKLES * @link http://picklesphp.com
* @link https://github.com/joshtronic/pickles * @package Pickles
*/ */
namespace Pickles; namespace Pickles;

View file

@ -3,16 +3,13 @@
/** /**
* String Utility Collection * String Utility Collection
* *
* PHP version 5
*
* 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 Josh Sherman <josh@gravityblvd.com>
* @copyright Copyright 2007-2014, Josh Sherman * @copyright Copyright 2007-2014, Josh Sherman
* @license http://www.opensource.org/licenses/mit-license.html * @license http://www.opensource.org/licenses/mit-license.html
* @package PICKLES * @link http://picklesphp.com
* @link https://github.com/joshtronic/pickles * @package Pickles
*/ */
namespace Pickles; namespace Pickles;

View file

@ -3,16 +3,13 @@
/** /**
* Time Utility Collection * Time Utility Collection
* *
* PHP version 5
*
* 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 Josh Sherman <josh@gravityblvd.com>
* @copyright Copyright 2007-2014, Josh Sherman * @copyright Copyright 2007-2014, Josh Sherman
* @license http://www.opensource.org/licenses/mit-license.html * @license http://www.opensource.org/licenses/mit-license.html
* @package PICKLES * @link http://picklesphp.com
* @link https://github.com/joshtronic/pickles * @package Pickles
*/ */
namespace Pickles; namespace Pickles;