Unified PHP code header styling

This commit is contained in:
Andy Miller 2016-07-11 16:07:14 -06:00
parent 9b7b953684
commit 6c042b4804
133 changed files with 927 additions and 452 deletions

View File

@ -3,6 +3,7 @@
1. [](#improved)
* Added support for validation of multiple email in the `type: email` field [grav-plugin-email#31](https://github.com/getgrav/grav-plugin-email/issues/31)
* Unified PHP code header styling
1. [](#bugfix)
* Fix backend validation for file fields marked as required [grav-plugin-form#78](https://github.com/getgrav/grav-plugin-form/issues/78)

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Core
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav;
// Ensure vendor libraries exist

View File

@ -1,4 +1,10 @@
<?php
/**
* @package Grav.Core
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
// Some standard defines
define('GRAV', true);

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common;
use Closure;
@ -13,14 +20,6 @@ use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
define('CSS_ASSET', true);
define('JS_ASSET', false);
/**
* Handles Asset management (CSS & JS) and also pipelining (combining into a single file for each asset)
*
* Based on stolz/assets (https://github.com/Stolz/Assets) package modified for use with Grav
*
* @author RocketTheme
* @license MIT
*/
class Assets
{
/** @const Regex to match CSS and JavaScript files */

View File

@ -1,15 +1,16 @@
<?php
/**
* @package Grav.Common.Backup
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Backup;
use Grav\Common\Grav;
use Grav\Common\Inflector;
/**
* The ZipBackup class lets you create simple zip-backups of a grav site
*
* @author RocketTheme
* @license MIT
*/
class ZipBackup
{
protected static $ignorePaths = [

View File

@ -1,13 +1,15 @@
<?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common;
/**
* Handles browser and platform versions
*
* Internally uses the PhpUserAgent package https://github.com/donatj/PhpUserAgent
*
* @author RocketTheme
* @license MIT
*/
class Browser
{

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common;
use \Doctrine\Common\Cache as DoctrineCache;
@ -16,9 +23,6 @@ use Grav\Common\Grav;
* MemCache
* MemCacheD
* FileSystem
*
* @author RocketTheme
* @license MIT
*/
class Cache extends Getters
{

View File

@ -1,13 +1,13 @@
<?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common;
/**
* Offers composer helper methods.
*
* @author eschmar
* @license MIT
*/
class Composer
{
/** @const Default composer location */

View File

@ -1,11 +1,15 @@
<?php
/**
* @package Grav.Common.Config
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Config;
use RocketTheme\Toolbox\File\PhpFile;
/**
* The Compiled base class.
*/
abstract class CompiledBase
{
/**
@ -192,9 +196,9 @@ abstract class CompiledBase
}
$this->createObject($cache['data']);
$this->finalizeObject();
return true;
}

View File

@ -1,13 +1,16 @@
<?php
/**
* @package Grav.Common.Config
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Config;
use Grav\Common\Data\Blueprint;
use Grav\Common\Data\BlueprintSchema;
use Grav\Common\Grav;
/**
* The Compiled Blueprints class.
*/
class CompiledBlueprints extends CompiledBase
{
/**

View File

@ -1,11 +1,15 @@
<?php
/**
* @package Grav.Common.Config
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Config;
use Grav\Common\File\CompiledYamlFile;
/**
* The Compiled Configuration class.
*/
class CompiledConfig extends CompiledBase
{
/**

View File

@ -1,11 +1,15 @@
<?php
/**
* @package Grav.Common.Config
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Config;
use Grav\Common\File\CompiledYamlFile;
/**
* The Compiled Languages class.
*/
class CompiledLanguages extends CompiledBase
{
/**

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Config
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Config;
use Grav\Common\Debugger;
@ -6,12 +13,6 @@ use Grav\Common\Grav;
use Grav\Common\Data\Data;
use Grav\Common\Service\ConfigServiceProvider;
/**
* The Config class contains configuration information.
*
* @author RocketTheme
* @license MIT
*/
class Config extends Data
{
protected $checksum;

View File

@ -1,11 +1,15 @@
<?php
/**
* @package Grav.Common.Config
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Config;
use Grav\Common\Filesystem\Folder;
/**
* The Configuration & Blueprints Finder class.
*/
class ConfigFileFinder
{
protected $base = '';

View File

@ -1,14 +1,15 @@
<?php
/**
* @package Grav.Common.Config
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Config;
use Grav\Common\Data\Data;
/**
* The Languages class contains configuration rules.
*
* @author RocketTheme
* @license MIT
*/
class Languages extends Data
{
public function checksum($checksum = null)

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Config
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Config;
use Grav\Common\File\CompiledYamlFile;
@ -8,12 +15,6 @@ use Pimple\Container;
use RocketTheme\Toolbox\File\YamlFile;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
/**
* The Config class contains configuration information.
*
* @author RocketTheme
* @license MIT
*/
class Setup extends Data
{
protected $streams = [

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Data
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Data;
use Grav\Common\File\CompiledYamlFile;
@ -6,11 +13,6 @@ use Grav\Common\Grav;
use RocketTheme\Toolbox\Blueprints\BlueprintForm;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
/**
* The Config class contains configuration information.
*
* @author RocketTheme
*/
class Blueprint extends BlueprintForm
{
/**

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Data
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Data;
use Grav\Common\Grav;
@ -6,12 +13,6 @@ use RocketTheme\Toolbox\ArrayTraits\Export;
use RocketTheme\Toolbox\ArrayTraits\ExportInterface;
use RocketTheme\Toolbox\Blueprints\BlueprintSchema as BlueprintSchemaBase;
/**
* Blueprint schema handles the internal logic of blueprints.
*
* @author RocketTheme
* @license MIT
*/
class BlueprintSchema extends BlueprintSchemaBase implements ExportInterface
{
use Export;

View File

@ -1,15 +1,16 @@
<?php
/**
* @package Grav.Common.Data
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Data;
use Grav\Common\Grav;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
/**
* Blueprints class keeps track on blueprint instances.
*
* @author RocketTheme
* @license MIT
*/
class Blueprints
{
protected $search;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Data
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Data;
use RocketTheme\Toolbox\ArrayTraits\Countable;
@ -8,12 +15,6 @@ use RocketTheme\Toolbox\ArrayTraits\NestedArrayAccessWithGetters;
use RocketTheme\Toolbox\File\File;
use RocketTheme\Toolbox\File\FileInterface;
/**
* Recursive data object
*
* @author RocketTheme
* @license MIT
*/
class Data implements DataInterface, \ArrayAccess, \Countable, ExportInterface
{
use NestedArrayAccessWithGetters, Countable, Export;

View File

@ -1,14 +1,15 @@
<?php
/**
* @package Grav.Common.Data
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Data;
use RocketTheme\Toolbox\File\FileInterface;
/**
* Data interface
*
* @author RocketTheme
* @license MIT
*/
interface DataInterface
{
/**

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Data
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Data;
use Grav\Common\Grav;
@ -6,12 +13,6 @@ use Symfony\Component\Yaml\Exception\ParseException;
use Symfony\Component\Yaml\Parser;
use Symfony\Component\Yaml\Yaml;
/**
* Data validation.
*
* @author RocketTheme
* @license MIT
*/
class Validation
{
/**

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Data
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Data;
use Grav\Common\Grav;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common;
use DebugBar\DataCollector\ConfigCollector;
@ -6,10 +13,6 @@ use DebugBar\JavascriptRenderer;
use DebugBar\StandardDebugBar;
use Grav\Common\Config\Config;
/**
* Class Debugger
* @package Grav\Common
*/
class Debugger
{
/** @var Grav $grav */

View File

@ -1,13 +1,16 @@
<?php
/**
* @package Grav.Common.Errors
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Errors;
use Grav\Common\Grav;
use Whoops;
/**
* Class Debugger
* @package Grav\Common
*/
class Errors
{
public function resetHandlers()

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Errors
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Errors;
use Whoops\Handler\Handler;

View File

@ -1,17 +1,15 @@
<?php
/**
* @package Grav.Common.File
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\File;
use RocketTheme\Toolbox\File\PhpFile;
/**
* Class CompiledFile
* @package Grav\Common\File
*
* @property string $filename
* @property string $extension
* @property string $raw
* @property array|string $content
*/
trait CompiledFile
{
/**

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.File
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\File;
use RocketTheme\Toolbox\File\MarkdownFile;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.File
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\File;
use RocketTheme\Toolbox\File\YamlFile;

View File

@ -1,15 +1,16 @@
<?php
/**
* @package Grav.Common.FileSystem
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Filesystem;
use Grav\Common\Grav;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
/**
* Folder helper class.
*
* @author RocketTheme
* @license MIT
*/
abstract class Folder
{
/**

View File

@ -1,12 +1,15 @@
<?php
/**
* @package Grav.Common.FileSystem
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Filesystem;
use Grav\Common\Grav;
/**
* Class RecursiveFolderFilterIterator
* @package Grav\Common\Filesystem
*/
class RecursiveFolderFilterIterator extends \RecursiveFilterIterator
{
protected static $folder_ignores;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM;
use Grav\Common\Iterator;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Common;
use Grav\Common\Iterator;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Common;
use Grav\Common\Iterator;

View File

@ -1,19 +1,15 @@
<?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Common;
use Grav\Common\Data\Data;
/**
* @property string name
* @property string version
* @property string available
* @property string package_type
* @property string description_plain
* @property string slug
* @property array author
* @property mixed changelog
*/
class Package {
protected $data;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM;
use Grav\Common\Grav;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM;
use Grav\Common\Filesystem\Folder;

View File

@ -1,4 +1,10 @@
<?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Local;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Local;
use Grav\Common\Data\Data;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Local;
use Grav\Common\GPM\Common\CachedCollection;

View File

@ -1,12 +1,15 @@
<?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Local;
use Grav\Common\Grav;
/**
* Class Plugins
* @package Grav\Common\GPM\Local
*/
class Plugins extends AbstractPackageCollection
{
/**

View File

@ -1,12 +1,15 @@
<?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Local;
use Grav\Common\Grav;
/**
* Class Themes
* @package Grav\Common\GPM\Local
*/
class Themes extends AbstractPackageCollection
{
/**

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Remote;
use Grav\Common\Grav;
@ -6,10 +13,6 @@ use Grav\Common\GPM\Common\AbstractPackageCollection as BaseCollection;
use Grav\Common\GPM\Response;
use \Doctrine\Common\Cache\FilesystemCache;
/**
* Class AbstractPackageCollection
* @package Grav\Common\GPM\Remote
*/
class AbstractPackageCollection extends BaseCollection
{
/**

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Remote;
use Grav\Common\Grav;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Remote;
use Grav\Common\Data\Data;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Remote;
use Grav\Common\GPM\Common\CachedCollection;

View File

@ -1,10 +1,13 @@
<?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Remote;
/**
* Class Plugins
* @package Grav\Common\GPM\Remote
*/
class Plugins extends AbstractPackageCollection
{
/**

View File

@ -1,10 +1,13 @@
<?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Remote;
/**
* Class Themes
* @package Grav\Common\GPM\Remote
*/
class Themes extends AbstractPackageCollection
{
/**

View File

@ -1,13 +1,16 @@
<?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM;
use Grav\Common\Utils;
use Grav\Common\Grav;
/**
* Class Response
* @package Grav\Common\GPM
*/
class Response
{
/**

View File

@ -1,7 +1,12 @@
<?php
namespace Grav\Common\GPM;
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
use Grav\Common\Grav;
namespace Grav\Common\GPM;
/**
* Class Upgrader

View File

@ -1,13 +1,13 @@
<?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common;
/**
* Abstract class to implement magic __get(), __set(), __isset() and __unset().
* Also implements ArrayAccess.
*
* @author RocketTheme
* @license MIT
*/
abstract class Getters implements \ArrayAccess, \Countable
{
/**

View File

@ -1,19 +1,17 @@
<?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common;
use Grav\Common\Page\Medium\ImageMedium;
use RocketTheme\Toolbox\DI\Container;
use RocketTheme\Toolbox\Event\Event;
/**
* Grav
*
* @author Andy Miller
* @link http://www.rockettheme.com
* @license http://opensource.org/licenses/MIT
*
* Influenced by Pico, Stacey, Kirby, PieCrust and other great platforms...
*/
class Grav extends Container
{
@ -447,7 +445,7 @@ class Grav extends Container
public function fallbackUrl($path)
{
$this->fireEvent('onPageFallBackUrl');
/** @var Uri $uri */
$uri = $this['uri'];

View File

@ -1,12 +1,13 @@
<?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common;
/**
* Class GravTrait
*
* @package Grav\Common
* @deprecated
*/
trait GravTrait
{
protected static $grav;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Helpers
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Helpers;
use DOMDocument;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common;
use Grav\Common\Grav;
@ -7,19 +14,6 @@ use Grav\Common\Grav;
* This file was originally part of the Akelos Framework
*/
/**
* Inflector for pluralize and singularize English nouns.
*
* This Inflector is a port of Ruby on Rails Inflector.
*
* It can be really helpful for developers that want to
* create frameworks based on naming conventions rather than
* configurations.
*
* @author RocketTheme
* @license MIT
*/
class Inflector
{
protected $plural;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common;
use RocketTheme\Toolbox\ArrayTraits\ArrayAccessWithGetters;
@ -8,10 +15,6 @@ use RocketTheme\Toolbox\ArrayTraits\Countable;
use RocketTheme\Toolbox\ArrayTraits\Export;
use RocketTheme\Toolbox\ArrayTraits\Serializable;
/**
* Class Iterator
* @package Grav\Common
*/
class Iterator implements \ArrayAccess, \Iterator, \Countable, \Serializable
{
use Constructor, ArrayAccessWithGetters, ArrayIterator, Countable, Serializable, Export;

View File

@ -1,12 +1,16 @@
<?php
/**
* @package Grav.Common.Language
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Language;
use Grav\Common\Grav;
use Grav\Common\Config\Config;
/**
* Language and translation functionality for Grav
*/
class Language
{
protected $grav;

View File

@ -1,9 +1,13 @@
<?php
/**
* @package Grav.Common.Language
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Language;
/**
* Language and translation functionality for Grav
*/
class LanguageCodes
{
protected static $codes = [

View File

@ -1,10 +1,13 @@
<?php
/**
* @package Grav.Common.Markdown
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Markdown;
/**
* Class Parsedown
* @package Grav\Common\Markdown
*/
class Parsedown extends \Parsedown
{
use ParsedownGravTrait;

View File

@ -1,10 +1,13 @@
<?php
/**
* @package Grav.Common.Markdown
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Markdown;
/**
* Class ParsedownExtra
* @package Grav\Common\Markdown
*/
class ParsedownExtra extends \ParsedownExtra
{
use ParsedownGravTrait;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Markdown
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Markdown;
use Grav\Common\Grav;
@ -6,9 +13,6 @@ use Grav\Common\Uri;
use Grav\Common\Utils;
use RocketTheme\Toolbox\Event\Event;
/**
* A trait to add some custom processing to the identifyLink() method in Parsedown and ParsedownExtra
*/
trait ParsedownGravTrait
{
/** @var Page $page */

View File

@ -1,16 +1,17 @@
<?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page;
use Grav\Common\Grav;
use Grav\Common\Iterator;
use Grav\Common\Utils;
/**
* Collection of Pages.
*
* @author RocketTheme
* @license MIT
*/
class Collection extends Iterator
{
/**
@ -283,7 +284,7 @@ class Collection extends Iterator
}
}
}
$this->items = $date_range;
return $this;
}

View File

@ -1,14 +1,16 @@
<?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page;
use RocketTheme\Toolbox\ArrayTraits\Constructor;
use RocketTheme\Toolbox\ArrayTraits\NestedArrayAccess;
/**
* Class Header
* @package Grav\Common\Page
*/
class Header implements \ArrayAccess
{
use NestedArrayAccess, Constructor;

View File

@ -1,17 +1,17 @@
<?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page;
use Grav\Common\Getters;
use Grav\Common\Page\Medium\Medium;
use Grav\Common\Page\Medium\MediumFactory;
/**
* Media is a holder object that contains references to the media of page. This object is created and
* populated during the getMedia() method in the Pages object
*
* @author RocketTheme
* @license MIT
*/
class Media extends Getters
{
protected $gettersVariable = 'instances';

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page\Medium;
class AudioMedium extends Medium

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page\Medium;
use Grav\Common\Grav;
@ -6,7 +13,6 @@ use Gregwar\Image\Exceptions\GenerationError;
use Gregwar\Image\Image;
use RocketTheme\Toolbox\Event\Event;
class ImageFile extends Image
{
/**

View File

@ -1,14 +1,17 @@
<?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page\Medium;
use Grav\Common\Data\Blueprint;
use Grav\Common\Grav;
use Grav\Common\Utils;
/**
* Class ImageMedium
* @package Grav\Common\Page\Medium
*/
class ImageMedium extends Medium
{
/**

View File

@ -1,12 +1,13 @@
<?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page\Medium;
use Grav\Common\Grav;
/**
* Class Link
* @package Grav\Common\Page\Medium
*/
class Link implements RenderableInterface
{
use ParsedownHtmlTrait;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page\Medium;
use Grav\Common\File\CompiledYamlFile;
@ -6,13 +13,6 @@ use Grav\Common\Grav;
use Grav\Common\Data\Data;
use Grav\Common\Data\Blueprint;
/**
* The Medium is a general class for multimedia objects in Grav pages, specific implementations will derive from
*
* @author Grav
* @license MIT
*
*/
class Medium extends Data implements RenderableInterface
{
use ParsedownHtmlTrait;

View File

@ -1,17 +1,16 @@
<?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page\Medium;
use Grav\Common\Grav;
use Grav\Common\Data\Blueprint;
/**
* MediumFactory can be used to more easily create various Medium objects from files or arrays, it should
* contain most logic for instantiating a Medium object.
*
* @author Grav
* @license MIT
*
*/
class MediumFactory
{
/**

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page\Medium;
use Grav\Common\Markdown\Parsedown;

View File

@ -1,13 +1,13 @@
<?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page\Medium;
/**
* Renderable Medium objects can be rendered to HTML markup and Parsedown objects
*
* @author Grav
* @license MIT
*
*/
interface RenderableInterface
{
/**

View File

@ -1,13 +1,13 @@
<?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page\Medium;
/**
* The Image medium holds information related to an individual image. These are then stored in the Media object.
*
* @author Grav
* @license MIT
*
*/
class StaticImageMedium extends Medium
{
use StaticResizeTrait;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page\Medium;
trait StaticResizeTrait

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page\Medium;
class ThumbnailImageMedium extends ImageMedium

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page\Medium;
class VideoMedium extends Medium

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page;
use Exception;
@ -20,15 +27,6 @@ use Symfony\Component\Yaml\Yaml;
define('PAGE_ORDER_PREFIX_REGEX', '/^[0-9]+\./u');
/**
* The Page object, or "Page" object is the main powerhouse of Grav. It contains all the information
* related to the nested pages structure that represents the content. Each page has several attributes that
* can be retrieved via public functions. Also each page can potentially contain an array of sub-pages.
* Recursively traversing the page structure allows Grav to create navigation systems.
*
* @author RocketTheme
* @license MIT
*/
class Page
{
/**

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page;
use Grav\Common\Cache;
@ -15,12 +22,6 @@ use RocketTheme\Toolbox\Event\Event;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
use Whoops\Exception\ErrorException;
/**
* Pages is the class that is the entry point into the hierarchy of pages
*
* @author RocketTheme
* @license MIT
*/
class Pages
{
/**

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page;
use Grav\Common\Filesystem\Folder;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common;
use Grav\Common\Data\Data;
@ -9,12 +16,6 @@ use RocketTheme\Toolbox\Event\EventSubscriberInterface;
use RocketTheme\Toolbox\File\YamlFile;
use Symfony\Component\Console\Exception\LogicException;
/**
* The Plugin object just holds the id and path to a plugin.
*
* @author RocketTheme
* @license MIT
*/
class Plugin implements EventSubscriberInterface, \ArrayAccess
{
/**

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common;
use Grav\Common\Config\Config;
@ -8,13 +15,6 @@ use Grav\Common\File\CompiledYamlFile;
use RocketTheme\Toolbox\Event\EventDispatcher;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
/**
* The Plugins object holds an array of all the plugin objects that
* Grav knows about
*
* @author RocketTheme
* @license MIT
*/
class Plugins extends Iterator
{
public $formFieldTypes;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Processors
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Processors;
class AssetsProcessor extends ProcessorBase implements ProcessorInterface {

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Processors
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Processors;
class ConfigurationProcessor extends ProcessorBase implements ProcessorInterface {

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Processors
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Processors;
class DebuggerAssetsProcessor extends ProcessorBase implements ProcessorInterface {

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Processors
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Processors;
class DebuggerInitProcessor extends ProcessorBase implements ProcessorInterface {

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Processors
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Processors;
class ErrorsProcessor extends ProcessorBase implements ProcessorInterface {

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Processors
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Processors;
class InitializeProcessor extends ProcessorBase implements ProcessorInterface {

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Processors
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Processors;
class PagesProcessor extends ProcessorBase implements ProcessorInterface {

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Processors
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Processors;
class PluginsProcessor extends ProcessorBase implements ProcessorInterface {

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Processors
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Processors;
class ProcessorBase {

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Processors
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Processors;
interface ProcessorInterface {

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Processors
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Processors;
class RenderProcessor extends ProcessorBase implements ProcessorInterface {

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Processors
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Processors;
class SiteSetupProcessor extends ProcessorBase implements ProcessorInterface {

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Processors
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Processors;
class TasksProcessor extends ProcessorBase implements ProcessorInterface {

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Processors
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Processors;
class ThemesProcessor extends ProcessorBase implements ProcessorInterface {

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Processors
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Processors;
class TwigProcessor extends ProcessorBase implements ProcessorInterface {

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Service
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Service;
use Pimple\Container;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Service
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Service;
use Grav\Common\Config\CompiledBlueprints;
@ -11,12 +18,6 @@ use Pimple\Container;
use Pimple\ServiceProviderInterface;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
/**
* The Config class contains configuration information.
*
* @author RocketTheme
* @license MIT
*/
class ConfigServiceProvider implements ServiceProviderInterface
{
public function register(Container $container)

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Service
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Service;
use Grav\Common\Errors\Errors;

View File

@ -1,4 +1,11 @@
<?php
/**
* @package Grav.Common.Service
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Service;
use Pimple\Container;

Some files were not shown because too many files have changed in this diff Show More