├── core
├── Exception
│ ├── .gitkeep
│ ├── ViewNotFoundException.php
│ ├── JsonException.php
│ ├── ContainerException.php
│ ├── RepositoryException.php
│ ├── RouterException.php
│ ├── MajordomoException.php
│ └── FrontControllerException.php
├── Helper
│ ├── .gitkeep
│ ├── Monolog.php
│ ├── Server.php
│ ├── JsonParser.php
│ ├── CLISHELLCOLOR.md
│ ├── RouterCLI.php
│ ├── Doctrine.php
│ ├── ConfigurationManagerCLI.php
│ ├── Install.php
│ ├── Repository.php
│ ├── SERVICECONTAINER.md
│ ├── TrafficTracker.php
│ ├── ServiceContainerCLI.php
│ ├── ROUTER.md
│ ├── Request.php
│ ├── CONFIGURATIONMANAGER.md
│ ├── ConfigurationManager.php
│ ├── CLITABLEBUILDER.md
│ ├── Profiler.php
│ ├── Controller.php
│ ├── Majordomo.php
│ ├── CLIShellColor.php
│ ├── ArtefactBuilder.php
│ ├── FrontController.php
│ ├── Router.php
│ ├── Response.php
│ ├── CLITableBuilder.php
│ └── ServiceContainer.php
├── Interface
│ └── .gitkeep
├── logs
│ └── .htaccess
├── config
│ ├── config.json
│ ├── routes.json
│ ├── services.json
│ └── commands.json
└── builder
│ └── templates
│ ├── controller.method.php.twig
│ └── controller.php.twig
├── View
├── scafolding
│ ├── 404.html.twig
│ ├── exception.html.twig
│ └── php-version-error.php
├── ehmerde.html.twig
├── about.html.twig
├── home.html.twig
└── base.html.twig
├── phpunit.xml
├── .gitignore
├── init.php
├── containerTest.php
├── ControllerBuilderTest.php
├── cli-config.php
├── Model
├── PageRepository.php
├── TrafficTrackerRepository.php
└── Entity
│ ├── Page.php
│ └── TrafficTracker.php
├── Public
└── index.php
├── config.php
├── README.md
├── composer.json
├── LICENSE
├── doctrineBootstrap.php
├── bin
└── console
├── Controller
└── PageController.php
├── Tests
└── CLITableBuilderTest.php
└── composer.lock
/core/Exception/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/core/Helper/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/core/Interface/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/core/logs/.htaccess:
--------------------------------------------------------------------------------
1 | deny from all
2 |
--------------------------------------------------------------------------------
/core/Exception/ViewNotFoundException.php:
--------------------------------------------------------------------------------
1 |
4 |
Feature not found
5 |
6 | {% endblock %}
--------------------------------------------------------------------------------
/View/ehmerde.html.twig:
--------------------------------------------------------------------------------
1 | {% extends "base.html.twig" %}
2 | {% block content %}
3 |
4 |
I am surrounded with morons
5 |
6 | {% endblock %}
7 |
--------------------------------------------------------------------------------
/View/about.html.twig:
--------------------------------------------------------------------------------
1 | {% extends "base.html.twig" %}
2 | {% block content %}
3 |
4 |
Agad la television et twig dort
5 |
{{ val }}
6 |
7 | {% endblock %}
8 |
9 |
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Tests
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | composer.phar
3 | vendor/
4 | core/logs/*.log
5 | !core/logs/.htaccess
6 | core/cache/*
7 | !core/cache/.gitkeep
8 | .DS_Store
9 | Public/bootstrap
10 | Public/jquery
11 | runtests.sh
12 |
--------------------------------------------------------------------------------
/View/scafolding/exception.html.twig:
--------------------------------------------------------------------------------
1 | {% extends "base.html.twig" %}
2 | {% block content %}
3 |
4 |
Exception caught
5 |
6 |
7 | {{ exception.__toString|nl2br }}
8 |
9 | {% endblock %}
--------------------------------------------------------------------------------
/core/Exception/JsonException.php:
--------------------------------------------------------------------------------
1 |
7 | * @package Exception
8 | */
9 | class JsonException extends \Exception
10 | {
11 |
12 | }
--------------------------------------------------------------------------------
/core/Exception/ContainerException.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 | class ContainerException extends \Exception
10 | {
11 |
12 | }
--------------------------------------------------------------------------------
/core/Exception/RepositoryException.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 | class RepositoryException extends \Exception
10 | {
11 |
12 | }
--------------------------------------------------------------------------------
/core/Exception/RouterException.php:
--------------------------------------------------------------------------------
1 |
10 | */
11 | class RouterException extends \Exception
12 | {
13 |
14 | }
--------------------------------------------------------------------------------
/core/config/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "APP_DEV_MODE": true,
3 | "APP_DEFAULT_ROUTE": "home",
4 | "APP_DB_HOST": "localhost",
5 | "APP_DB_PORT": "3306",
6 | "APP_DB_NAME": "nymfony",
7 | "APP_DB_USER": "root",
8 | "APP_DB_PASS": "root",
9 | "APP_DB_DRIVER": "pdo_mysql"
10 | }
--------------------------------------------------------------------------------
/core/Exception/MajordomoException.php:
--------------------------------------------------------------------------------
1 |
10 | */
11 | class MajordomoException extends \Exception
12 | {
13 |
14 | }
--------------------------------------------------------------------------------
/core/Exception/FrontControllerException.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 | class FrontControllerException extends \Exception
10 | {
11 |
12 | }
--------------------------------------------------------------------------------
/core/builder/templates/controller.method.php.twig:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Method {{ method }}
4 | * @return Response HTTP response
5 | */
6 | public function {{ method }}()
7 | {
8 | return $this->render('{{ controllerArtefact }}/{{ methodArtefact | lower }}.html.twig', [
9 | // your parameters here
10 | ]);
11 | }
12 |
--------------------------------------------------------------------------------
/core/Helper/Monolog.php:
--------------------------------------------------------------------------------
1 | pushHandler(new StreamHandler(APP_LOG_FILE, Logger::INFO));
13 | return $logger;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/core/Helper/Server.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 | class Server
10 | {
11 | /**
12 | * Runs server
13 | * @fixme fix PHP version issues
14 | */
15 | public static function run()
16 | {
17 | `php -S localhost:8000 -t Public/`;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/View/home.html.twig:
--------------------------------------------------------------------------------
1 | {% extends "base.html.twig" %}
2 | {% block content %}
3 |
4 |
HOOOOOME
5 |
6 |
9 |
10 | {% for onePage in pageList %}
11 | -
12 | {{ onePage.getTitle }}
13 |
14 | {% endfor %}
15 |
16 | {% endblock %}
17 |
--------------------------------------------------------------------------------
/init.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {% block title %}Default title{% endblock %}
7 | {% block cssstyle %}{% endblock %}
8 |
9 |
10 |
11 | {% block content %}{% endblock %}
12 |
13 | {% block javascript %}{% endblock %}
14 |
15 |
16 |
--------------------------------------------------------------------------------
/containerTest.php:
--------------------------------------------------------------------------------
1 | APP_CACHE_DIR,
12 | ));
13 | echo $twig->render('controller.php.twig', [
14 | 'controllerName' => 'SomeClass',
15 | 'methods' => [
16 | 'index',
17 | 'kylian',
18 | 'list'
19 | ]
20 | ]);
21 |
--------------------------------------------------------------------------------
/core/builder/templates/controller.php.twig:
--------------------------------------------------------------------------------
1 |
9 | * @package Helper
10 | */
11 | class JsonParser
12 | {
13 | public static function getJson(string $file, string $exceptionMessage = 'JSON file \'%s\' not found')
14 | {
15 | if (!file_exists($file)) {
16 | throw new JsonException(printf($exceptionMessage, $file));
17 | }
18 | if (!$data = json_decode(file_get_contents($file), true)) {
19 | throw new JsonException('JSON file \'$file\' badly formated');
20 | }
21 | return $data;
22 | }
23 | }
--------------------------------------------------------------------------------
/core/Helper/CLISHELLCOLOR.md:
--------------------------------------------------------------------------------
1 | # CLIShellColor
2 |
3 | ``` php
4 | \Helper\CLIShellColor::mecho(String $string[, String $FGColor = null[, String $BGColor = null]]) : void
5 | ```
6 |
7 | ## Input
8 |
9 | ### String $string
10 |
11 | String to colorize with shell colors.
12 |
13 | ### String $FGColor = null
14 |
15 | String specifying the foreground color.
16 | See ```\Helper\CLIShellColor::$FGColors``` for reference.
17 |
18 | ### String $BGColor = null
19 |
20 | String specifying the background color.
21 | See ```\Helper\CLIShellColor::$BGColors``` for reference.
22 |
23 | ## Output
24 |
25 | Method echoes the ```$string``` with ```$FGColor``` as foreground and ```$BGColor``` as background shell colors.
26 |
--------------------------------------------------------------------------------
/cli-config.php:
--------------------------------------------------------------------------------
1 |
8 | * @package Model
9 | */
10 | class PageRepository extends Repository
11 | {
12 |
13 | /**
14 | * Entity name
15 | * @var string
16 | */
17 | protected $entity = 'Model\\Entity\\Page';
18 |
19 | /**
20 | * @return array
21 | */
22 | public function get()
23 | {
24 | $qb = $this->entityManager->createQueryBuilder();
25 | $qb->add('select', 'p')
26 | ->add('from', 'Model\Entity\Page p')
27 | ->add('orderBy', 'p.title ASC');
28 | $query = $qb->getQuery();
29 | return $query->getResult();
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/core/Helper/RouterCLI.php:
--------------------------------------------------------------------------------
1 |
7 | * @package core\Helper
8 | */
9 | class RouterCLI
10 | {
11 | /**
12 | * Outputs router debug information
13 | * @return void
14 | */
15 | public static function router()
16 | {
17 | $routerOutput = '[Router]' . PHP_EOL;
18 | Router::init();
19 | $routes = Router::dump();
20 | $routerOutput .= CLITableBuilder::init(
21 | $routes,
22 | ['identifier', 'name', 'controller', 'action', 'method'],
23 | false,
24 | 10
25 | );
26 | CLIShellColor::commandOutput($routerOutput.PHP_EOL, 'white', 'green');
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/core/Helper/Doctrine.php:
--------------------------------------------------------------------------------
1 | APP_DB_DRIVER,
22 | 'user' => APP_DB_USER,
23 | 'password' => APP_DB_PASS,
24 | 'dbname' => APP_DB_NAME,
25 | 'port' => APP_DB_PORT,
26 | 'host' => APP_DB_HOST,
27 | );
28 | $config = Setup::createAnnotationMetadataConfiguration($paths, $isDevMode);
29 | return EntityManager::create($dbParams, $config);
30 | }
31 | }
--------------------------------------------------------------------------------
/Public/index.php:
--------------------------------------------------------------------------------
1 | addCritical(
17 | 'Profiler info',
18 | [
19 | 'session' => session_id(),
20 | 'Dump' => var_export(\Helper\Profiler::dump(), true)
21 | ]
22 | );
23 | if (isset($request->GET[APP_JSON_QUERY_STRING_FLAG])) {
24 | \Helper\Profiler::dump();
25 | }
26 | }
--------------------------------------------------------------------------------
/core/Helper/ConfigurationManagerCLI.php:
--------------------------------------------------------------------------------
1 |
7 | * @package Helper
8 | */
9 | class ConfigurationManagerCLI
10 | {
11 | /**
12 | * Outputs current configuration
13 | * @return void
14 | */
15 | public static function config()
16 | {
17 | $configOutput = '[App Configuration]' . PHP_EOL;
18 | ConfigurationManager::init();
19 | $constants = array_merge(
20 | get_defined_constants(true)['user'],
21 | ConfigurationManager::dump()
22 | );
23 | foreach ($constants as $constantName => $constantValue) {
24 | $configOutput .= $constantName.' = '.var_export($constantValue, true);
25 | $configOutput .= PHP_EOL;
26 | }
27 | CLIShellColor::commandOutput($configOutput.PHP_EOL, 'white', 'green');
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/core/Helper/Install.php:
--------------------------------------------------------------------------------
1 |
9 | */
10 | class Install
11 | {
12 |
13 | /**
14 | * Create symlink to JQUery and Bootstrap vendor
15 | */
16 | public static function postInstall()
17 | {
18 | $rootDir = dirname(__DIR__);
19 | $bootstrapLink = $rootDir."/Public/bootstrap";
20 | if (!file_exists($bootstrapLink)) {
21 | symlink($rootDir.'/vendor/twbs/bootstrap/dist', $bootstrapLink);
22 | } else {
23 | echo "Boostrap symlink already exists.".PHP_EOL;
24 | }
25 | $jqueryLink = $rootDir."/Public/jquery";
26 | if (!file_exists($jqueryLink)) {
27 | symlink($rootDir.'/vendor/components/jquery/', $jqueryLink);
28 | } else {
29 | echo "JQuery symlink already exists.".PHP_EOL;
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/config.php:
--------------------------------------------------------------------------------
1 |
10 | * @package Model
11 | */
12 | abstract class Repository
13 | {
14 | /**
15 | * @var EntityManager
16 | */
17 | protected $entityManager;
18 |
19 | /**
20 | * Repository constructor
21 | */
22 | public function __construct()
23 | {
24 | $repositoryReflection = new \ReflectionClass($this);
25 | $this->entityManager = ServiceContainer::getService('EntityManager');
26 | // check if repository has $entity property
27 | try {
28 | $repositoryReflection->getProperty('entity');
29 | } catch (\ReflectionException $e) {
30 | throw new RepositoryException(
31 | 'Please set Entity property name in Repository.'
32 | );
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/core/config/commands.json:
--------------------------------------------------------------------------------
1 | {
2 | "debug": [
3 | {
4 | "name": "container",
5 | "method": "Helper\\ServiceContainerCLI::container",
6 | "man": "List all services declared in the Container"
7 | },
8 | {
9 | "name": "config",
10 | "method": "Helper\\ConfigurationManagerCLI::config",
11 | "man": "List App Configuration"
12 | },
13 | {
14 | "name": "router",
15 | "method": "Helper\\RouterCLI::router",
16 | "man": "List routes and details"
17 | }
18 | ],
19 | "server": [
20 | {
21 | "name": "run",
22 | "method": "Helper\\Server::run",
23 | "man": "Runs PHP dev server"
24 | }
25 | ],
26 | "cache": [
27 | {
28 | "name": "clear",
29 | "method": "Helper\\Majordomo::clearTwigCache",
30 | "man": "Clear Twig cache"
31 | }
32 | ],
33 | "generate": [
34 | {
35 | "name": "controller",
36 | "method": "Helper\\ArtefactBuilder::generateController",
37 | "man": "Generate a controller"
38 | }
39 | ]
40 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Nymfony
2 |
3 | Nymfony is not Symfony
4 |
5 | ## Introduction
6 |
7 | A simple exercise for my students to the different steps of developing a framework.
8 |
9 | ## View
10 |
11 | Views are stored in the View/ directory.
12 | Views are rendered from Controllers.
13 | The template manager used to generate views [is Twig](http://twig.sensiolabs.org/)
14 |
15 | ``` php
16 | return $this->render("somepage.html.twig", [
17 | 'key' => 'value'
18 | ]);
19 | ```
20 |
21 | ## Helper\Router
22 |
23 | Routes are declared in the `core/config/routes.json` file. See [Router info](./core/Helper/ROUTER.md)
24 |
25 | ## Helper\ServiceContainer
26 |
27 | Services are declared in the `core/config/services.json` file. See [ServiceContainer info](./core/Helper/SERVICECONTAINER.md)
28 |
29 | ## Helper\CLITableBuilder
30 |
31 | See [CLITableBuilder info](./core/Helper/CLITABLEBUILDER.md)
32 |
33 | ## Helper\CLIShellColor
34 |
35 | See [CLIShellColor info](./core/Helper/CLISHELLCOLOR.md)
36 |
37 | ## MIT License
38 |
39 | [License](./LICENSE)
40 |
--------------------------------------------------------------------------------
/core/Helper/SERVICECONTAINER.md:
--------------------------------------------------------------------------------
1 | # ServiceContainer
2 |
3 | ## Definition
4 | Services are declared in the `core/config/services.json` file with the following attribute list:
5 |
6 | * name: Class name with fully qualified Namespaces (ex: `\Helper\Request`)
7 | * param: Array of parameters
8 |
9 | ## ServiceContainer::getService(String $service, array $params = []) : object
10 |
11 |
12 | ## Declaration Example
13 | ``` json
14 | {
15 | "Logger":{
16 | "class":"Monolog\\Logger",
17 | "param":[
18 | "App"
19 | ]
20 | }
21 | }
22 | ```
23 |
24 | ## ServiceContainer::getServiceCollection() : array
25 |
26 | ## debug:container
27 | ``` bash
28 | php bin/console debug container
29 | ```
30 | This command displays the following
31 | ```
32 | [ServiceContainer]
33 | +---------+----------------+
34 | |Name |Class |
35 | +---------+----------------+
36 | |Logger |Monolog\Logger |
37 | |Request |Helper\Request |
38 | |Response |Helper\Response |
39 | +---------+----------------+
40 | ```
41 |
--------------------------------------------------------------------------------
/core/Helper/TrafficTracker.php:
--------------------------------------------------------------------------------
1 |
9 | * @package core\Helper
10 | */
11 | class TrafficTracker
12 | {
13 | public static function init()
14 | {
15 | /** @var Request $request */
16 | $request = ServiceContainer::getService('Request');
17 | $route = Router::getCurrentRoute();
18 | $trafficTracker = new TrafficTrackerRepository();
19 | return $trafficTracker->insert([
20 | 'uri' => $request->URI,
21 | 'http_method' => $request->HTTP['method'],
22 | 'route_identifier' => $route->routeIdentifier,
23 | 'session_id' => session_id(),
24 | 'http_referer' => $request->HTTP_REFERER,
25 | 'http_user_agent' => $request->USER_AGENT,
26 | 'headers' => json_encode($request->headers),
27 | 'acceptLanguage' => $request->headers['Accept-Language'],
28 | ]);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/core/Helper/ServiceContainerCLI.php:
--------------------------------------------------------------------------------
1 |
7 | * @package core\Helper
8 | */
9 | class ServiceContainerCLI
10 | {
11 | /**
12 | * Outputs container debug information
13 | * @return void
14 | */
15 | public static function container()
16 | {
17 | $containerOutput = '[ServiceContainer]' . PHP_EOL;
18 | ServiceContainer::init();
19 | $services = ServiceContainer::getServiceCollection();
20 | $serviceDebug = [];
21 | foreach ($services as $name => $service) {
22 | $serviceDebug[] = [
23 | 'name' => $name,
24 | 'class' => get_class($service),
25 | ];
26 | }
27 | $containerOutput .= CLITableBuilder::init(
28 | $serviceDebug,
29 | ['Name', 'Class'],
30 | false,
31 | 10
32 | );
33 | CLIShellColor::commandOutput($containerOutput.PHP_EOL, 'white', 'green');
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hetic/nymfony",
3 | "description": "Nymfony is not symfony ;)",
4 | "authors": [
5 | {
6 | "name": "Yann Le Scouarnec",
7 | "email": "yann.le-scouarnec@hetic.net",
8 | "role": "lead"
9 | }
10 | ],
11 | "require": {
12 | "php": ">=7.0",
13 | "psr/log": "^1.0",
14 | "monolog/monolog": "^1.19",
15 | "twbs/bootstrap": "^3.3",
16 | "components/jquery": "^2.2",
17 | "doctrine/orm": "^2.5",
18 | "twig/twig": "^1.24"
19 | },
20 | "require-dev": {
21 | "phpunit/phpunit": "^5.3",
22 | "symfony/var-dumper": "^3.1"
23 | },
24 | "autoload": {
25 | "psr-4": {
26 | "Controller\\": "Controller/",
27 | "Helper\\": "core/Helper/",
28 | "Exception\\": "core/Exception/",
29 | "Interface\\": "core/Interface/",
30 | "Model\\": "Model/",
31 | "Model\\Entity\\": "Model/Entity/"
32 | }
33 | },
34 | "scripts": {
35 | "post-install-cmd": [
36 | "Helper\\Install::postInstall"
37 | ],
38 | "post-update-cmd": [
39 | "Helper\\Install::postInstall"
40 | ]
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Yann Le Scouarnec
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/doctrineBootstrap.php:
--------------------------------------------------------------------------------
1 | ConfigurationManager::getConfig('APP_DB_DRIVER'),
11 | 'user' => ConfigurationManager::getConfig('APP_DB_USER'),
12 | 'port' => ConfigurationManager::getConfig('APP_DB_PASS'),
13 | 'password' => ConfigurationManager::getConfig('APP_DB_PASS'),
14 | 'dbname' => ConfigurationManager::getConfig('APP_DB_NAME'),
15 | );
16 |
17 | $cache = new \Doctrine\Common\Cache\ArrayCache();
18 |
19 | $reader = new AnnotationReader();
20 | $driver = new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($reader, $path);
21 |
22 | $config = Setup::createAnnotationMetadataConfiguration($path, ConfigurationManager::getConfig('APP_DEV_MODE'));
23 | $config->setMetadataCacheImpl($cache);
24 | $config->setQueryCacheImpl($cache);
25 | $config->setMetadataDriverImpl($driver);
26 | $entityManager = ServiceContainer::getService(EntityManager::create($conn, $config));
27 |
--------------------------------------------------------------------------------
/Model/TrafficTrackerRepository.php:
--------------------------------------------------------------------------------
1 |
10 | * @package Model
11 | */
12 | class TrafficTrackerRepository extends Repository
13 | {
14 |
15 | /**
16 | * Entity name
17 | * @var string
18 | */
19 | protected $entity = 'Model\\Entity\\TrafficTracker';
20 |
21 | /**
22 | * @param array $data
23 | * @return int insert id
24 | */
25 | public function insert($data)
26 | {
27 | $trafficTracker = new TrafficTracker();
28 | $trafficTracker->setCreatedAt(new \DateTime())
29 | ->setHttpMethod($data['http_method'])
30 | ->setRouteIdentifier($data['route_identifier'])
31 | ->setSessionId($data['session_id'])
32 | ->setHttpReferer($data['http_referer'])
33 | ->setHttpUserAgent($data['http_user_agent'])
34 | ->setUri($data['uri'])
35 | ->setHeaders($data['headers'])
36 | ->setAcceptLanguage($data['acceptLanguage']);
37 | $this->entityManager->persist($trafficTracker);
38 | $this->entityManager->flush();
39 | return $trafficTracker->getId();
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/bin/console:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | $CommandGroup) {
23 | $output .= CLIShellColor::moutput(' ['.$groupeName.']', 'green', 'black').PHP_EOL;
24 | foreach ($CommandGroup as $command => $commandDetails) {
25 | $command = str_pad($command, 20, ' ');
26 | $output .= CLIShellColor::moutput(" $command", 'green', 'black')
27 | .CLIShellColor::moutput($commandDetails['man'], 'white', 'black')
28 | .PHP_EOL;
29 | }
30 | $output .= PHP_EOL;
31 | }
32 | CLIShellColor::mecho($output, 'green', 'black');
33 | }
34 |
--------------------------------------------------------------------------------
/Controller/PageController.php:
--------------------------------------------------------------------------------
1 |
15 | */
16 | class PageController extends Controller
17 | {
18 | /**
19 | * PageController constructor.
20 | */
21 | public function __construct()
22 | {
23 | parent::__construct();
24 | }
25 |
26 | /**
27 | * @return Response
28 | */
29 | public function homeAction()
30 | {
31 | /** @var Request $request */
32 | $request = ServiceContainer::getService('Request');
33 | if (isset($request->GET['prenom'])) {
34 | $prenom = $request->GET['prenom'];
35 | } else {
36 | $prenom = "Yann";
37 | }
38 | $repo = new PageRepository();
39 | $pageList = $repo->get();
40 | return $this->render(
41 | "home.html.twig",
42 | [
43 | 'prenom' => $prenom,
44 | 'pageList' => $pageList
45 | ]
46 | );
47 | }
48 |
49 | /**
50 | * @return Response
51 | */
52 | public function aboutAction()
53 | {
54 | return $this->render('about.html.twig', [
55 | 'val' => 'Valuueeee'
56 | ]);
57 | }
58 |
59 | /**
60 | * @return Response
61 | */
62 | public function homePostAction()
63 | {
64 | return $this->render('ehmerde.html.twig', []);
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/core/Helper/ROUTER.md:
--------------------------------------------------------------------------------
1 | # Router
2 |
3 | ## Definition
4 | Routes are defined in the `core/config/routes.json` file with the following attribute list:
5 |
6 | * name: feature name, will be the URI part of route name
7 | * controller: controller name (without Controller suffix, Page for PageController)
8 | * action: action method name (without Action suffix, home for HomeAction)
9 | * method: Optional, HTTP method, if not specified, route applies to all HTTP verbs
10 |
11 | ## Route name
12 | Calling a route takes into account the HTTP verb. In order to be able to segregate the action calls, the HTTP verb is added, if specified, as a sub route specification.
13 | Example: `home[GET]`
14 |
15 | If no HTTP verb is specified for a route, the string `ALL` will be used in the HTTP verb.
16 | Example: `home[ALL]`
17 |
18 | ## Example
19 | ``` json
20 | {
21 | "page_home_post":{
22 | "name":"home",
23 | "controller": "Page",
24 | "action": "homePost",
25 | "method": "POST"
26 | }
27 | }
28 | ```
29 |
30 | ## Router dump
31 | ``` bash
32 | php bin/console debug router
33 | ```
34 | This command displays the folowing
35 | ```
36 | [Router]
37 | +-----------+------+-----------+---------+-------+
38 | |identifier |name |controller |action |method |
39 | +-----------+------+-----------+---------+-------+
40 | |home |home |Page |home |GET |
41 | +-----------+------+-----------+---------+-------+
42 | |home |home |Page |homePost |POST |
43 | +-----------+------+-----------+---------+-------+
44 | |about |about |Page |about |ALL |
45 | +-----------+------+-----------+---------+-------+
46 | ```
47 |
--------------------------------------------------------------------------------
/core/Helper/Request.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 | class Request
10 | {
11 | /**
12 | * @var array
13 | */
14 | public $HTTP;
15 | /**
16 | * @var string
17 | */
18 | public $URI;
19 | /**
20 | * @var array
21 | */
22 | public $GET;
23 | /**
24 | * @var array
25 | */
26 | public $POST;
27 | /**
28 | * @var array
29 | */
30 | public $SESSION;
31 | /**
32 | * @var array
33 | */
34 | public $COOKIE;
35 | /**
36 | * @var string
37 | */
38 | public $IP;
39 | /**
40 | * @var string
41 | */
42 | public $USER_AGENT;
43 | /**
44 | * @var string
45 | */
46 | public $HTTP_REFERER;
47 | /**
48 | * @var array
49 | */
50 | public $headers;
51 |
52 | /**
53 | * Request constructor.
54 | */
55 | public function __construct()
56 | {
57 | $this->COOKIE = $_COOKIE ?? [];
58 | $this->GET = $_GET ?? [];
59 | $this->SESSION = $_SESSION ?? [];
60 | $this->POST = $_POST ?? [];
61 | $this->URI = $_SERVER['REQUEST_URI'] ?? false;
62 | $this->HTTP = [];
63 | // reference OPTIONS GET HEAD POST PUT DELETE TRACE CONNECT PATCH
64 | $this->HTTP['method'] = $_SERVER['REQUEST_METHOD'] ?? false;
65 | $this->IP = $_SERVER['REMOTE_ADDR'] ?? false;
66 | $this->USER_AGENT = $_SERVER['HTTP_USER_AGENT'] ?? '';
67 | $this->HTTP_REFERER = $_SERVER['HTTP_REFERER'] ?? '';
68 | if (function_exists('getallheaders')) {
69 | $this->headers = \getallheaders();
70 | } else {
71 | $this->headers = '';
72 | }
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/View/scafolding/php-version-error.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | PHP version error
8 |
9 |
10 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
Oops!
24 |
PHP version error
25 |
26 | You need PHP 7.0.0 and above to run this application
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/core/Helper/CONFIGURATIONMANAGER.md:
--------------------------------------------------------------------------------
1 | # Helper\ConfigurationManager
2 |
3 | ## Definition
4 | Configuration is declared in the `core/config/config.json` file with the following attribute list:
5 |
6 | * key: String identifying the configuration value
7 | * value: array|string|int|float|bool the value of the configuration
8 | Note: Objects cannot be concidered as values
9 |
10 | ## Declaration Example
11 | ``` json
12 | {
13 | "APP_DEV_MODE":true,
14 | "APP_DEFAULT_ROUTE":"home",
15 | "APP_DB_HOST":"localhost",
16 | "APP_DB_PORT":"3306",
17 | "APP_DB_NAME":"nymfony",
18 | "APP_DB_USER":"root",
19 | "APP_DB_PASS":"root",
20 | "APP_DB_DRIVER":"pdo_mysql"
21 | }
22 | ```
23 |
24 | ## ConfigurationManager::getConfig(string $key, $value = null) : array|string|int|float|bool
25 |
26 | * $key identifies the configuration entry
27 | * $value is set if you want to add dynamic configuration without going through the ```core/config/config.json``` file.
28 |
29 | Returns the ```value``` associated with the ```key```
30 |
31 | ## ServiceContainer::getServiceCollection() : array
32 |
33 | Returns an array with all ```key=>value``` conbinations.
34 |
35 | ## debug config
36 | ``` bash
37 | php bin/console debug config
38 | ```
39 |
40 | This command displays the following
41 | ```
42 | [App Configuration]
43 | APP_ROOT_DIR = '/Users/yann/Sites/Nymfony/'
44 | APP_VIEW_DIR = '/Users/yann/Sites/Nymfony/View/'
45 | APP_LOG_DIR = '/Users/yann/Sites/Nymfony/logs/'
46 | APP_LOG_FILE = '/Users/yann/Sites/Nymfony/logs/app.log'
47 | APP_DEV_LOG_FILE = '/Users/yann/Sites/Nymfony/logs/dev.log'
48 | APP_JSON_QUERY_STRING_FLAG = 'json'
49 | APP_DEV_MODE = true
50 | APP_DEFAULT_ROUTE = 'home'
51 | APP_DB_HOST = 'localhost'
52 | APP_DB_PORT = '3306'
53 | APP_DB_NAME = 'nymfony'
54 | APP_DB_USER = 'root'
55 | APP_DB_PASS = 'root'
56 | APP_DB_DRIVER = 'pdo_mysql'
57 | ```
58 |
--------------------------------------------------------------------------------
/core/Helper/ConfigurationManager.php:
--------------------------------------------------------------------------------
1 |
7 | * @package Helper
8 | */
9 | class ConfigurationManager
10 | {
11 | /**
12 | * @var array
13 | */
14 | private static $configurationCollection = [];
15 | /**
16 | *
17 | */
18 | const CONFIGURATION_FILE = APP_CONFIG_DIR.'config.json';
19 |
20 | /**
21 | * @param string $key
22 | * @param bool|string|array|float|int|null $value
23 | * @return bool|string|array|float|int configuration value
24 | * @throws \Exception
25 | */
26 | public static function getConfig(string $key, $value = null)
27 | {
28 | if($value === null){
29 | if(!isset(self::$configurationCollection[$key])){
30 | $backtrace = debug_backtrace();
31 | throw new \Exception(
32 | "Configuration key '$key' not found. ".
33 | $backtrace[0]['file'] . ' line ' . $backtrace[0]['line']
34 | );
35 | }
36 | return self::$configurationCollection[$key];
37 | } else {
38 | if(isset(self::$configurationCollection[$key])){
39 | throw new \Exception("Configuration key '$key' already exists.");
40 | }
41 | self::$configurationCollection[$key] = $value;
42 | }
43 |
44 | return $value;
45 | }
46 |
47 | /**
48 | * @throws \Exception\JsonException
49 | */
50 | public static function init()
51 | {
52 | $configuration = JsonParser::getJson(self::CONFIGURATION_FILE, 'Configuration file \'%s\' not found');
53 | foreach ($configuration as $name => $configurationValue) {
54 | self::$configurationCollection[$name] = $configurationValue;
55 | }
56 | }
57 |
58 | /**
59 | * getServiceCollection allows for Container dump for debugging
60 | * @return array
61 | */
62 | public static function dump()
63 | {
64 |
65 | return self::$configurationCollection;
66 | }
67 | }
--------------------------------------------------------------------------------
/core/Helper/CLITABLEBUILDER.md:
--------------------------------------------------------------------------------
1 | # CLITableBuilder
2 |
3 | ``` php
4 | \Helper\CLITableBuilder::init(array $data, array $headers, $separatorLines = false, $repeatHeader = false) : String
5 | ```
6 |
7 | * bool $separatorLines specifies if there will be seperator lines between data lines. ```false``` by default.
8 | Note: Header will always be seperated from the data lines by a seperator line
9 | * bool|int $repeatHeader will decide if the header is repeated every int $repeatHeader lines. ```false``` by default.
10 |
11 | ## Input
12 | Method takes an array as parametre.
13 |
14 |
15 | ## Ouput
16 |
17 | ### Basic
18 |
19 | ```
20 | [Router]
21 | +-----------+------+-----------+---------+-------+
22 | |identifier |name |controller |action |method |
23 | +-----------+------+-----------+---------+-------+
24 | |home |home |Page |home |GET |
25 | +-----------+------+-----------+---------+-------+
26 | |home |home |Page |homePost |POST |
27 | +-----------+------+-----------+---------+-------+
28 | |about |about |Page |about |ALL |
29 | +-----------+------+-----------+---------+-------+
30 | ```
31 |
32 | ### No separator
33 |
34 | ```
35 | [Router]
36 | +-----------+------+-----------+---------+-------+
37 | |identifier |name |controller |action |method |
38 | +-----------+------+-----------+---------+-------+
39 | |home |home |Page |home |GET |
40 | |home |home |Page |homePost |POST |
41 | |about |about |Page |about |ALL |
42 | +-----------+------+-----------+---------+-------+
43 | ```
44 | or
45 | ```
46 | [Router]
47 | +-----------+------+-----------+---------+-------+
48 | |identifier |name |controller |action |method |
49 | +-----------+------+-----------+---------+-------+
50 | |home |home |Page |home |GET |
51 | |home |home |Page |homePost |POST |
52 | +-----------+------+-----------+---------+-------+
53 | |identifier |name |controller |action |method |
54 | +-----------+------+-----------+---------+-------+
55 | |about |about |Page |about |ALL |
56 | +-----------+------+-----------+---------+-------+
57 | ```
58 |
--------------------------------------------------------------------------------
/core/Helper/Profiler.php:
--------------------------------------------------------------------------------
1 |
7 | * @package Helper
8 | */
9 | class Profiler
10 | {
11 | /**
12 | * @var int
13 | */
14 | private static $timeStart = 0;
15 | /**
16 | * @var int
17 | */
18 | private static $timeStop = 0;
19 | /**
20 | * @var int
21 | */
22 | private static $timeTotal = 0;
23 | /**
24 | * @var int
25 | */
26 | private static $memory = 0;
27 | /**
28 | * @var string
29 | */
30 | private static $route = "n/a";
31 | /**
32 | * @var int
33 | */
34 | private static $sqlTimer = 0;
35 | /**
36 | * @var int
37 | */
38 | private static $outputSize = 0;
39 |
40 | /**
41 | * set self::$timeStart to current timestamp
42 | */
43 | public static function startTimer()
44 | {
45 | self::$timeStart = microtime(true);
46 | }
47 |
48 | /**
49 | * set self::$timeStop to current timestamp
50 | */
51 | public static function stopTimer()
52 | {
53 | self::$timeStop = microtime(true);
54 | self::$timeTotal = self::$timeStop - self::$timeStart;
55 | }
56 |
57 | /**
58 | * adds time to SQL timer
59 | * @param $time
60 | */
61 | public static function addSqlTime($time)
62 | {
63 | self::$sqlTimer += $time;
64 | }
65 |
66 | /**
67 | * dumps all profiler values as array
68 | * @return array
69 | */
70 | public static function dump()
71 | {
72 | dump([
73 | 'memory' => self::$memory,
74 | 'time' => self::$timeTotal,
75 | 'route' => self::$route,
76 | 'sqlTime' => self::$sqlTimer,
77 | 'outputSize' => self::$outputSize,
78 | ]);
79 | }
80 |
81 | /**
82 | * sets memory usage
83 | * @param $memory
84 | */
85 | public static function setMemory($memory)
86 | {
87 | self::$memory = $memory;
88 | }
89 |
90 | /**
91 | * sets route
92 | * @param $route
93 | */
94 | public static function setRoute($route)
95 | {
96 | self::$route = $route;
97 | }
98 |
99 | /**
100 | * set output size
101 | * @param $outputSize
102 | */
103 | public static function setOutputSize($outputSize)
104 | {
105 | self::$outputSize = $outputSize;
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/core/Helper/Controller.php:
--------------------------------------------------------------------------------
1 |
12 | */
13 | abstract class Controller
14 | {
15 | /**
16 | * @var \Twig_Environment
17 | */
18 | protected $twig;
19 |
20 | /**
21 | * Controller constructor.
22 | */
23 | public function __construct()
24 | {
25 | $loader = new \Twig_Loader_Filesystem(APP_VIEW_DIR);
26 | $this->twig = new \Twig_Environment($loader, array(
27 | 'cache' => APP_CACHE_DIR,
28 | ));
29 | if (ConfigurationManager::getConfig('APP_DEV_MODE') === true) {
30 | $this->twig->getCache(false);
31 | }
32 | }
33 |
34 | /**
35 | * @param $view
36 | * @param array $data
37 | * @param int $status
38 | * @param array $headers
39 | * @throws ViewNotFoundException
40 | * @return Response
41 | */
42 | protected function phpRrender($view, $data = [], $status = null, $headers = null)
43 | {
44 | if (!file_exists(APP_VIEW_DIR.$view)) {
45 | throw new ViewNotFoundException('View '.$view.' not found.');
46 | }
47 | $request = ServiceContainer::getService('Request');
48 | if (isset($request->GET[APP_JSON_QUERY_STRING_FLAG])) {
49 | $output = json_encode($data);
50 | } else {
51 | ob_start();
52 | extract($data);
53 | require APP_VIEW_DIR.$view;
54 | $output = ob_get_contents();
55 | ob_end_clean();
56 | }
57 | /** @var Response $reponse */
58 | $reponse = ServiceContainer::getService('Response');
59 |
60 | return $reponse->addBody($output)
61 | ->setStatus($status)
62 | ->addHeader($headers);
63 | }
64 |
65 | /**
66 | * @param string $name template name
67 | * @param array $params template parameters
68 | * @param array $status HTTP status
69 | * @param array $headers HTTP headers
70 | * @return Response generated response
71 | */
72 | protected function render($name, $params = [], $status = null, $headers = null){
73 | $request = ServiceContainer::getService('Request');
74 | if (isset($request->GET[APP_JSON_QUERY_STRING_FLAG])) {
75 | $output = json_encode($params);
76 | } else {
77 | $output = $this->twig->render($name, $params);
78 | }
79 | /** @var Response $reponse */
80 | $reponse = ServiceContainer::getService('Response');
81 |
82 | return $reponse->addBody($output)
83 | ->setStatus($status)
84 | ->addHeader($headers);
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/core/Helper/Majordomo.php:
--------------------------------------------------------------------------------
1 |
9 | */
10 | class Majordomo
11 | {
12 | /**
13 | * Clear TWIG cache
14 | * @return void
15 | * @throws \Exception if APP_ROOT_DIR is not defined
16 | * @throws \Exception if trying to delete a directory not in APP
17 | */
18 | public static function clearTwigCache()
19 | {
20 | if (!defined('APP_ROOT_DIR')) {
21 | throw new \Exception('Could not secure cache directory clearing.');
22 | }
23 | CLIShellColor::commandOutput("Clearing cache", 'green', 'black');
24 | $path = APP_CACHE_DIR;
25 | $rmDir = function ($file, $path) use (&$rmDir) {
26 | if (strpos($path, APP_ROOT_DIR) !== 0) {
27 | // in case of attempted deletion of a directory not inside
28 | // the application directory, throw an exception to halt the
29 | // execution of the script.
30 | throw new \Exception(
31 | 'The directory attempted to clear is not an application directory.'
32 | );
33 | }
34 | if (!in_array($file, ['.', '..'])) {
35 | if (is_dir($path.$file)) {
36 | if (($dirContent = scandir($path.$file)) !== false) {
37 | if (count($dirContent) > 2) {
38 | foreach ($dirContent as $oneDir) {
39 | $rmDir($oneDir, $path.$file.'/');
40 | }
41 | } else {
42 | rmdir($file);
43 | }
44 | }
45 | rmdir($path.$file);
46 | } elseif (is_file($path.$file)) {
47 | unlink($path.$file);
48 | }
49 | }
50 | };
51 | foreach (scandir($path) as $oneFile) {
52 | $rmDir($oneFile, $path);
53 | }
54 | CLIShellColor::commandOutput("Cache cleared", 'green', 'black');
55 | }
56 |
57 | /**
58 | * Builds the commands array for the bin/console based on
59 | * the configuration file
60 | * @param string $configurationFile
61 | * @return array
62 | * @throws \Exception\JsonException
63 | */
64 | public static function loadConfig($configurationFile = 'commands.json') : array
65 | {
66 | $commandsArray = JsonParser::getJson(
67 | $configurationFile,
68 | "Command configuratio file not found"
69 | );
70 | $commands = [];
71 | foreach ($commandsArray as $catName => $category) {
72 | foreach ($category as $commandName => $command) {
73 | $commands[$catName][$command['name']]['method'] = $command['method'];
74 | $commands[$catName][$command['name']]['man'] = $command['man'];
75 | }
76 | }
77 | return $commands;
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/core/Helper/CLIShellColor.php:
--------------------------------------------------------------------------------
1 |
10 | */
11 | class CLIShellColor
12 | {
13 | /**
14 | * @var array list foreground colors
15 | */
16 | public static $FGColors = [
17 | 'black' => '0;30',
18 | 'dark_gray' => '1;30',
19 | 'blue' => '0;34',
20 | 'light_blue' => '1;34',
21 | 'green' => '0;32',
22 | 'light_green' => '1;32',
23 | 'cyan' => '0;36',
24 | 'light_cyan' => '1;36',
25 | 'red' => '0;31',
26 | 'light_red' => '1;31',
27 | 'purple' => '0;35',
28 | 'light_purple' => '1;35',
29 | 'brown' => '0;33',
30 | 'yellow' => '1;33',
31 | 'light_gray' => '0;37',
32 | 'white' => '1;37'
33 | ];
34 | /**
35 | * @var array list background colors
36 | */
37 | private static $BGColors = [
38 | 'black' => '40',
39 | 'red' => '41',
40 | 'green' => '42',
41 | 'yellow' => '43',
42 | 'blue' => '44',
43 | 'magenta' => '45',
44 | 'cyan' => '46',
45 | 'light_gray' => '47'
46 | ];
47 |
48 | /**
49 | * @var string default foreground color
50 | */
51 | private static $defaultFGColor = 'white';
52 | /**
53 | * @var string default background color
54 | */
55 | private static $defaultBGColor = 'black';
56 |
57 | /**
58 | * @param $string
59 | * @param null $FGColor
60 | * @param null $BGColor
61 | */
62 | public static function mecho($string, $FGColor = null, $BGColor = null)
63 | {
64 | echo self::moutput($string, $FGColor, $BGColor);;
65 | }
66 |
67 | /**
68 | * @param $string
69 | * @param null $FGColor
70 | * @param null $BGColor
71 | * @return string
72 | */
73 | public static function moutput($string, $FGColor = null, $BGColor = null)
74 | {
75 | $output = '';
76 | $coloredOutput = false;
77 | if (isset(self::$FGColors[$FGColor])) {
78 | $output .= "\033[".self::$FGColors[$FGColor]."m";
79 | $coloredOutput = true;
80 | }
81 | if (isset(self::$BGColors[$BGColor])) {
82 | $output .= "\033[".self::$BGColors[$BGColor]."m";
83 | $coloredOutput = true;
84 | }
85 | $output .= $string;
86 | if ($coloredOutput != false) {
87 | $output .= "\033[0m";
88 | }
89 | return $output;
90 | }
91 |
92 | /**
93 | * @param $output
94 | * @param null $FGColor
95 | * @param null $BGColor
96 | */
97 | public static function commandOutput($output, $FGColor = null, $BGColor = null)
98 | {
99 | $outputArray = explode(PHP_EOL, $output);
100 | $formatedOutput = PHP_EOL . PHP_EOL;
101 | for ($i = 0; $i < count($outputArray); $i++) {
102 | if (mb_strlen($outputArray[$i]) > 0) {
103 | if ($i == 0) {
104 | $formatedOutput .= " ";
105 | } else {
106 | $formatedOutput .= " ";
107 | }
108 | $formatedOutput .= $outputArray[$i] . PHP_EOL;
109 | }
110 | }
111 | $formatedOutput .= PHP_EOL;
112 | self::mecho($formatedOutput, $FGColor, $BGColor);
113 | }
114 |
115 | }
116 |
--------------------------------------------------------------------------------
/core/Helper/ArtefactBuilder.php:
--------------------------------------------------------------------------------
1 |
7 | * @package Helper
8 | */
9 | class ArtefactBuilder
10 | {
11 | /**
12 | * Create controller CLI
13 | */
14 | public static function generateController()
15 | {
16 | CLIShellColor::mecho(
17 | 'welcome to the Controller generation assistant.'.PHP_EOL,
18 | 'green',
19 | 'black'
20 | );
21 | // Get controller name
22 | $controllerName = readline("Enter controller name [suffixed with Controller] : ");
23 | $controllerName = preg_replace("/\W/", "", $controllerName);
24 | if ($controllerName === '') {
25 | CLIShellColor::mecho(
26 | 'Please enter a valid Controller name (only alphabetical characters).'.PHP_EOL,
27 | 'black',
28 | 'red'
29 | );
30 | return;
31 | }
32 | $loader = new \Twig_Loader_Filesystem(APP_CORE_DIR.'builder/templates/');
33 | $twig = new \Twig_Environment($loader, array(
34 | 'cache' => APP_CACHE_DIR,
35 | ));
36 | $methodList = [];
37 | while (($oneMethod = readline("Enter action name, leave blank to stop adding methods [suffixed with Action] : ")) != '') {
38 | $methodList[] = preg_replace("/\W/", "", $oneMethod);
39 | }
40 | $controllerArtefact = self::getArtefactName($controllerName, "Controller");
41 | $controllerCode = $twig->render('controller.php.twig', [
42 | 'controllerName' => $controllerName,
43 | 'controllerArtefact' => $controllerArtefact,
44 | 'methods' => $methodList
45 | ]);
46 | // create the controller file and write the generated code in it
47 | $controllerDirectory = APP_ROOT_DIR."Controller/";
48 | $controllerFile = $controllerDirectory.strtolower($controllerName).'.php';
49 | if (!is_writable($controllerDirectory)) {
50 | throw new \Exception('Controller directory is not writable.');
51 | }
52 | if (!is_writable(APP_VIEW_DIR)) {
53 | throw new \Exception('View directory is not writable.');
54 | }
55 | touch($controllerFile);
56 | if (!file_put_contents($controllerFile, $controllerCode)) {
57 | throw new \Exception('Problem writing Controller file.');
58 | }
59 | echo $controllerFile." created.".PHP_EOL;
60 | $viewDir = APP_VIEW_DIR.strtolower($controllerArtefact);
61 | if (!mkdir($viewDir)) {
62 | throw new \Exception($controllerArtefact.' view directory creation failed.');
63 | }
64 | // generate the views referenced in the newly created controller actions
65 | foreach ($methodList as $aMethod) {
66 | // @todo fix action name in view name?
67 | // $methodFile = $viewDir."/".strtolower(self::getArtefactName($aMethod, "Action")).".html.twig";
68 | $methodFile = $viewDir."/".strtolower($aMethod).".html.twig";
69 | touch($methodFile);
70 | if (!file_put_contents($methodFile, '{% extends "base.html.twig" %}'.PHP_EOL)) {
71 | throw new \Exception('Problem writing Controller file.');
72 | }
73 | echo $methodFile." created.".PHP_EOL;
74 | }
75 | echo "Generation complete, happy coding!".PHP_EOL;
76 | }
77 |
78 | /**
79 | * get just the artefact name from controller or action full name
80 | * @param string $fullName
81 | * @param string $type
82 | * @return string
83 | */
84 | public static function getArtefactName($fullName, $type)
85 | {
86 | return substr($fullName, 0, - strlen($type));
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/core/Helper/FrontController.php:
--------------------------------------------------------------------------------
1 |
11 | */
12 | class FrontController extends Controller
13 | {
14 | /**
15 | * FrontController constructor.
16 | * @throws FrontControllerException
17 | */
18 | public function __construct()
19 | {
20 | parent::__construct();
21 | // get logger
22 | $logger = ServiceContainer::getService('Logger');
23 | $logger->pushHandler(new StreamHandler(APP_LOG_FILE, Logger::INFO));
24 | if (ConfigurationManager::getConfig('APP_DEV_MODE') === true) {
25 | $devLogger = ServiceContainer::getService('DevLogger');
26 | $devLogger->pushHandler(new StreamHandler(APP_DEV_LOG_FILE, Logger::INFO));
27 | }
28 | // init Request object
29 | $request = ServiceContainer::getService('Request');
30 | // init Response object
31 | $response = ServiceContainer::getService('Response');
32 | // init router
33 | if (isset($_GET['route'])) {
34 | $currRoute = $_GET['route'];
35 | } elseif (isset($_POST['route'])) {
36 | $currRoute = $_POST['route'];
37 | } else {
38 | $currRoute = ConfigurationManager::getConfig('APP_DEFAULT_ROUTE');
39 | }
40 | // init router
41 | Router::init();
42 | if (ConfigurationManager::getConfig('APP_DEV_MODE') === true) {
43 | Profiler::setRoute($currRoute);
44 | }
45 | // get current route's info
46 | $route = Router::getRoute($currRoute);
47 | Router::setCurrentRoute($route->routeIdentifier);
48 | TrafficTracker::init();
49 | if (!$route) {
50 | // if the route is not found, 404 error
51 | $this->render('scafolding/404.html.twig', [], 404);
52 | $response->output();
53 | } else {
54 | if (ConfigurationManager::getConfig('APP_DEV_MODE') === true) {
55 | Profiler::setRoute(var_export($route, true));
56 | }
57 | $controllerName = 'Controller\\'.$route->controller."Controller";
58 | $methodName = $route->action."Action";
59 | // check for requested route existance
60 | if (!class_exists($controllerName)) {
61 | $logger->addCritical(
62 | 'Controller class does not exist',
63 | ['Missing class' => $controllerName]
64 | );
65 | throw new FrontControllerException('Controller class does not exist');
66 | }
67 | $logger->addInfo(
68 | 'App access',
69 | ['Requested route' => $route->routeIdentifier, 'Request IP' => $request->IP]
70 | );
71 | $controller = new $controllerName();
72 | if (!method_exists($controller, $methodName)) {
73 | $logger->addCritical(
74 | 'Controller action method does not exist',
75 | ['Missing action method' => $controllerName."::".$methodName]
76 | );
77 | throw new FrontControllerException(
78 | 'Controller action method does not exist'
79 | );
80 | }
81 | try {
82 | $controller->$methodName();
83 | if (ConfigurationManager::getConfig('APP_DEV_MODE') === true) {
84 | Profiler::setMemory(memory_get_usage());
85 | }
86 | } catch (\Exception $e) {
87 | $this->render('scafolding/exception.html.twig', [
88 | 'exception' => $e
89 | ]);
90 | }
91 | $response->output();
92 | }
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/Model/Entity/Page.php:
--------------------------------------------------------------------------------
1 |
10 | * @ORM\Entity(repositoryClass="Model\PageRepository")
11 | * @ORM\Table(name="page")
12 | */
13 | class Page
14 | {
15 | /**
16 | * @var int
17 | * @ORM\Id
18 | * @ORM\GeneratedValue(strategy="AUTO")
19 | * @ORM\Column(type="integer")
20 | */
21 | private $id;
22 | /**
23 | * @var string
24 | * @ORM\Column(type="string")
25 | **/
26 | private $slug;
27 | /**
28 | * @var string
29 | * @ORM\Column(type="string")
30 | **/
31 | private $h1;
32 | /**
33 | * @var string
34 | * @ORM\Column(type="string")
35 | **/
36 | private $body;
37 | /**
38 | * @var string
39 | * @ORM\Column(type="string")
40 | **/
41 | private $title;
42 | /**
43 | * @var string
44 | * @ORM\Column(type="string")
45 | **/
46 | private $img;
47 | /**
48 | * @var string
49 | * @ORM\Column(type="string")
50 | **/
51 | private $span_text;
52 | /**
53 | * @var string
54 | * @ORM\Column(type="string")
55 | **/
56 | private $span_class;
57 |
58 | /**
59 | * @return mixed
60 | */
61 | public function getId()
62 | {
63 | return $this->id;
64 | }
65 |
66 | /**
67 | * @param mixed $id
68 | * @return $this
69 | */
70 | public function setId($id)
71 | {
72 | $this->id = $id;
73 |
74 | return $this;
75 | }
76 |
77 | /**
78 | * @return mixed
79 | */
80 | public function getSlug()
81 | {
82 | return $this->slug;
83 | }
84 |
85 | /**
86 | * @param mixed $slug
87 | * @return $this
88 | */
89 | public function setSlug($slug)
90 | {
91 | $this->slug = $slug;
92 |
93 | return $this;
94 | }
95 |
96 | /**
97 | * @return mixed
98 | */
99 | public function getH1()
100 | {
101 | return $this->h1;
102 | }
103 |
104 | /**
105 | * @param mixed $h1
106 | * @return $this
107 | */
108 | public function setH1($h1)
109 | {
110 | $this->h1 = $h1;
111 |
112 | return $this;
113 | }
114 |
115 | /**
116 | * @return mixed
117 | */
118 | public function getBody()
119 | {
120 | return $this->body;
121 | }
122 |
123 | /**
124 | * @param mixed $body
125 | * @return $this
126 | */
127 | public function setBody($body)
128 | {
129 | $this->body = $body;
130 |
131 | return $this;
132 | }
133 |
134 | /**
135 | * @return mixed
136 | */
137 | public function getTitle()
138 | {
139 | return $this->title;
140 | }
141 |
142 | /**
143 | * @param mixed $title
144 | * @return $this
145 | */
146 | public function setTitle($title)
147 | {
148 | $this->title = $title;
149 |
150 | return $this;
151 | }
152 |
153 | /**
154 | * @return mixed
155 | */
156 | public function getImg()
157 | {
158 | return $this->img;
159 | }
160 |
161 | /**
162 | * @param mixed $img
163 | * @return $this
164 | */
165 | public function setImg($img)
166 | {
167 | $this->img = $img;
168 |
169 | return $this;
170 | }
171 |
172 | /**
173 | * @return mixed
174 | */
175 | public function getSpanText()
176 | {
177 | return $this->span_text;
178 | }
179 |
180 | /**
181 | * @param mixed $span_text
182 | * @return $this
183 | */
184 | public function setSpanText($span_text)
185 | {
186 | $this->span_text = $span_text;
187 |
188 | return $this;
189 | }
190 |
191 | /**
192 | * @return mixed
193 | */
194 | public function getSpanClass()
195 | {
196 | return $this->span_class;
197 | }
198 |
199 | /**
200 | * @param mixed $span_class
201 | * @return $this
202 | */
203 | public function setSpanClass($span_class)
204 | {
205 | $this->span_class = $span_class;
206 |
207 | return $this;
208 | }
209 | }
210 |
--------------------------------------------------------------------------------
/core/Helper/Router.php:
--------------------------------------------------------------------------------
1 |
10 | */
11 | class Router
12 | {
13 | /**
14 | * Collection of application routes
15 | * @var array static
16 | */
17 | private static $routesCollection;
18 | /**
19 | * Collection of route identifier strings
20 | * referencing the $routesCollection
21 | * @var array static
22 | */
23 | private static $routesIdentifierCollection;
24 | /**
25 | * @var string current route identifier
26 | */
27 | private static $currentRoute;
28 | /**
29 | * string
30 | */
31 | const ROUTE_FILE = APP_CONFIG_DIR.'routes.json';
32 | /**
33 | * string
34 | */
35 | const ROUTE_ALL_METHODS_PLACEHOLDER = 'ALL';
36 | /**
37 | * Initialize the router
38 | * @throws RouterException
39 | * @returns void
40 | */
41 | public static function init()
42 | {
43 | $routeFile = self::ROUTE_FILE;
44 | // controle de presence du fichier de routes
45 | if (!file_exists($routeFile)) {
46 | throw new RouterException(
47 | 'Router file \''.$routeFile.'\' not found',
48 | 100
49 | );
50 | }
51 | $routes = json_decode(file_get_contents($routeFile));
52 | // is not JSON, exception
53 | if ($routes === false) {
54 | throw new RouterException('Router file badly formated', 200);
55 | }
56 | // load list of routes
57 | foreach ($routes as $routeIdentifier => $route) {
58 | // build full internal route name
59 | if (isset($route->method)) {
60 | $internalRouteMethod = $route->method;
61 | } else {
62 | $internalRouteMethod = self::ROUTE_ALL_METHODS_PLACEHOLDER;
63 | }
64 | self::$routesCollection[$route->name][$internalRouteMethod] = $route;
65 | self::$routesCollection[$route->name][$internalRouteMethod]->routeIdentifier = $routeIdentifier;
66 | self::$routesIdentifierCollection[$routeIdentifier] =
67 | &self::$routesCollection[$route->name][$internalRouteMethod];
68 | }
69 | }
70 |
71 | /**
72 | * @param $name
73 | * @return object|bool
74 | */
75 | public static function getRoute($name)
76 | {
77 | /** @var \Helper\Request $request */
78 | $request = ServiceContainer::getService('Request');
79 | if (isset(self::$routesCollection[$name][$request->HTTP['method']])) {
80 |
81 | return self::$routesCollection[$name][$request->HTTP['method']];
82 | } elseif (isset(self::$routesCollection[$name][self::ROUTE_ALL_METHODS_PLACEHOLDER])) {
83 |
84 | return self::$routesCollection[$name][self::ROUTE_ALL_METHODS_PLACEHOLDER];
85 | } else {
86 |
87 | return false;
88 | }
89 | }
90 |
91 | /**
92 | * dump all routes for debug
93 | */
94 | public static function dump()
95 | {
96 | if (count(self::$routesCollection)==0) {
97 |
98 | return "No routes specified";
99 | } else {
100 | $output = [];
101 | $i = 0;
102 | foreach (self::$routesIdentifierCollection as $identifier => $route) {
103 | $output[$i]['identifier'] = $identifier;
104 | $output[$i]['name'] = $route->name;
105 | $output[$i]['controller'] = $route->controller ?? 'N/A';
106 | $output[$i]['action'] = $route->action ?? 'N/A';
107 | $output[$i]['method'] = $route->method ?? 'ALL';
108 | $i++;
109 | }
110 |
111 | return $output;
112 | }
113 | }
114 |
115 | /**
116 | * @return string
117 | */
118 | public static function getCurrentRoute()
119 | {
120 | return self::$routesIdentifierCollection[self::$currentRoute];
121 | }
122 |
123 | /**
124 | * @param string $currentRoute
125 | */
126 | public static function setCurrentRoute($currentRoute)
127 | {
128 | self::$currentRoute = $currentRoute;
129 | }
130 |
131 |
132 | }
133 |
--------------------------------------------------------------------------------
/core/Helper/Response.php:
--------------------------------------------------------------------------------
1 |
10 | */
11 | class Response
12 | {
13 | /**
14 | * @var array
15 | */
16 | private $headers = [];
17 | /**
18 | * @var string
19 | */
20 | private $body;
21 | /**
22 | * @var int|null
23 | */
24 | private $status;
25 | private $defaultStatus = 200;
26 |
27 | /**
28 | * @const array
29 | */
30 | private $statusReference = [
31 | "100" => "100 Continue",
32 | "101" => "101 Switching Protocols",
33 | "200" => "200 OK",
34 | "201" => "201 Created",
35 | "202" => "202 Accepted",
36 | "203" => "203 Non-Authoritative Information",
37 | "204" => "204 No Content",
38 | "205" => "205 Reset Content",
39 | "300" => "300 Multiple Choices",
40 | "301" => "301 Moved Permanently",
41 | "302" => "302 Found",
42 | "303" => "303 See Other",
43 | "305" => "305 Use Proxy",
44 | "306" => "306 (Unused)",
45 | "307" => "307 Temporary Redirect",
46 | "400" => "400 Bad Request",
47 | "402" => "402 Payment Required",
48 | "403" => "403 Forbidden",
49 | "404" => "404 Not Found",
50 | "405" => "405 Method Not Allowed",
51 | "406" => "406 Not Acceptable",
52 | "408" => "408 Request Timeout",
53 | "409" => "409 Conflict",
54 | "410" => "410 Gone",
55 | "411" => "411 Length Required",
56 | "413" => "413 Payload Too Large",
57 | "414" => "414 URI Too Long",
58 | "415" => "415 Unsupported Media Type",
59 | "417" => "417 Expectation Failed",
60 | "426" => "426 Upgrade Required",
61 | "500" => "500 Internal Server Error",
62 | "501" => "501 Not Implemented",
63 | "502" => "502 Bad Gateway",
64 | "503" => "503 Service Unavailable",
65 | "504" => "504 Gateway Timeout",
66 | "505" => "505 HTTP Version Not Supported"
67 | ];
68 |
69 | /**
70 | * Response constructor.
71 | * @param string $body
72 | * @param int $status
73 | * @param string|array $headers
74 | */
75 | public function __construct($body = null, $status = null, $headers = null)
76 | {
77 | if (!is_null($body)) {
78 | $this->addBody($body);
79 | } else {
80 | $this->addBody('');
81 | }
82 | if (!is_null($headers)) {
83 | $this->addHeader($headers);
84 | }
85 | if (!is_null($status)) {
86 | $this->status = $status;
87 | } else {
88 | $this->status = $this->defaultStatus;
89 | }
90 | }
91 |
92 | /**
93 | * @param $bodyPart
94 | * @return $this
95 | */
96 | public function addBody($bodyPart)
97 | {
98 | $this->body .= $bodyPart;
99 |
100 | return $this;
101 | }
102 |
103 | /**
104 | * Function to add a header to Response
105 | * @param string|array $header
106 | * @return $this
107 | */
108 | public function addHeader($header)
109 | {
110 | if (is_array($header)) {
111 | $this->headers = array_merge($this->headers, $header);
112 | } elseif (is_string($header)) {
113 | $this->headers[] = $header;
114 | }
115 |
116 | return $this;
117 | }
118 |
119 | /**
120 | * @param $status
121 | * @return $this
122 | */
123 | public function setStatus($status)
124 | {
125 | if (isset($this->statusReference[$status])) {
126 | $this->status = $status;
127 | } else {
128 | $this->status = $this->defaultStatus;
129 | }
130 |
131 | return $this;
132 | }
133 |
134 | /**
135 | * output the HTTP response
136 | */
137 | public function output()
138 | {
139 | foreach ($this->headers as $header) {
140 | header($header);
141 | }
142 | http_response_code($this->status);
143 | if (ConfigurationManager::getConfig('APP_DEV_MODE') === true) {
144 | Profiler::setOutputSize(strlen($this->body));
145 | }
146 | echo $this->body;
147 | }
148 | }
149 |
--------------------------------------------------------------------------------
/core/Helper/CLITableBuilder.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 | class CLITableBuilder
10 | {
11 | /**
12 | * String
13 | */
14 | const TABLE_CORNER = "+";
15 | /**
16 | * String
17 | */
18 | const TABLE_HORIZONTAL_LINE = "-";
19 | /**
20 | * String
21 | */
22 | const TABLE_VERTICAL_LINE = "|";
23 |
24 | /**
25 | * @param array $data
26 | * @param array $headers
27 | * @param bool $separatorLines
28 | * if true, every line is seperated from next
29 | * if false, lines are not seperated
30 | * @param bool|int $repeatHeader
31 | * if false, never repeat header
32 | * if true, repeat header every $repeatHeader lines
33 | * @throws \Exception if $data is not an array
34 | * @return string CLI table
35 | */
36 | public static function init($data, $headers = null, $separatorLines = false, $repeatHeader = false)
37 | {
38 | // first line deleimiting the header
39 | $first = false;
40 | if (!is_array($data)) {
41 | throw new \Exception('Oops, no data to build a table with :(');
42 | }
43 | // get max length per field
44 | $maxLength = [];
45 | if (!is_null($headers) && is_array($headers)) {
46 | $first = true;
47 | $data = array_merge([$headers], $data);
48 | }
49 | // build column max length array
50 | foreach ($data as $record) {
51 | $i = 0;
52 | if (is_array($record)) {
53 | foreach ($record as $field) {
54 | if (!isset($maxLength[$i]) || $maxLength[$i] < mb_strlen($field)) {
55 | $maxLength[$i] = mb_strlen($field);
56 | }
57 | $i++;
58 | }
59 | } else {
60 | throw new \Exception('Oops, no records to build a table with :(');
61 | }
62 | }
63 | // declare $output string
64 | $output = '';
65 | $tableLine = '';
66 | // add 1 character for cosmetic reasons
67 | foreach ($maxLength as $index => $count) {
68 | $maxLength[$index] = $count + 1;
69 | $tableLine .= self::TABLE_CORNER . str_pad('', $maxLength[$index], self::TABLE_HORIZONTAL_LINE);
70 | }
71 | $tableLine .= self::TABLE_CORNER . PHP_EOL;
72 | $output .= $tableLine;
73 | /**
74 | * @var int $countLines
75 | * stores number of lines, starts at -1 to avoid counting header
76 | * not used unless a header is displayed
77 | */
78 | $countLines = -1;
79 | /**
80 | * @var string $header stores header for repeated header feature
81 | */
82 | $header = '';
83 | /**
84 | * @var string $headerForRepeat stores header for repeated header feature
85 | */
86 | $headerForRepeat = '';
87 | /**
88 | * @var bool $second used to avoid repeating header after header itself
89 | */
90 | $second = false;
91 | // generate lines
92 | foreach ($data as $record) {
93 | if (is_int($repeatHeader) && ($countLines % $repeatHeader === 0)) {
94 | if ($second !== true) {
95 | $output .= $header;
96 | } else {
97 | $output .= $headerForRepeat;
98 | }
99 | }
100 | $output .= self::TABLE_VERTICAL_LINE;
101 | $column = 0;
102 | // output fields
103 | foreach ($record as $field) {
104 | $output .= str_pad($field, $maxLength[$column], ' ').self::TABLE_VERTICAL_LINE;
105 | $column++;
106 | }
107 | $output .= PHP_EOL;
108 | // output seperators
109 | if ($second === true) {
110 | $second = false;
111 | }
112 | if ($first === true) {
113 | $first = false;
114 | $output .= $tableLine;
115 | if ($separatorLines !== false) {
116 | $explodeHeader = explode(PHP_EOL, $output);
117 | $headerForRepeat = $explodeHeader[1].PHP_EOL.$explodeHeader[2].PHP_EOL;
118 | } else {
119 | $headerForRepeat = $header;
120 | }
121 | $header = $output;
122 | $second = true;
123 | } elseif ($separatorLines !== false) {
124 | $output .= $tableLine;
125 | }
126 | $countLines++;
127 | }
128 | if ($separatorLines == false) {
129 | $output .= $tableLine;
130 | }
131 | return $output;
132 | }
133 | }
134 |
--------------------------------------------------------------------------------
/core/Helper/ServiceContainer.php:
--------------------------------------------------------------------------------
1 |
17 | * @package Helper
18 | */
19 | class ServiceContainer
20 | {
21 | /**
22 | * @var array
23 | */
24 | private static $serviceCollection = [];
25 |
26 | /**
27 | * Configuration file path
28 | */
29 | const SERVICE_FILE = APP_CONFIG_DIR.'services.json';
30 |
31 | /**
32 | * Service Container retrieval method.
33 | * Can be used to add a new service.
34 | * @param string|object $service
35 | * @param array $params optional service __construct parameters
36 | * @return mixed
37 | * @throws ContainerException
38 | */
39 | public static function getService($service, $params = [])
40 | {
41 | if (!is_object($service) && !isset(self::$serviceCollection[$service])) {
42 | if (class_exists($service)) {
43 | $classParams['class'] = $service;
44 | $classParams['param'] = $params;
45 | $refClass = new \ReflectionClass($service);
46 | // get class name
47 | $name = $refClass->getShortName();
48 | if (isset(self::$serviceCollection[$name])) {
49 | throw new ContainerException('Service name already taken ('.$service.')');
50 | }
51 | self::$serviceCollection[$name] = self::instantiate($classParams);
52 | } else {
53 | throw new ContainerException(
54 | $service.' not found (invoked from'.debug_backtrace()[0]['file'].
55 | ' line '.debug_backtrace()[0]['line'].')'
56 | );
57 | }
58 | } elseif (is_object($service)) {
59 | $servicereflection = new \ReflectionClass(get_class($service));
60 | $name = $servicereflection->getShortName();
61 | if (isset(self::$serviceCollection[$name])) {
62 | throw new ContainerException('Service name already taken ('.$name.')');
63 | }
64 | self::$serviceCollection[$name] = $service;
65 | $service = $name;
66 | }
67 | return self::$serviceCollection[$service];
68 | }
69 |
70 | /**
71 | * init initializes the ServiceContainer based on the core/config/services.json file
72 | * @throws ContainerException
73 | */
74 | public static function init()
75 | {
76 | $services = JsonParser::getJson(self::SERVICE_FILE, 'ServiceContainer configuration file \'%s\' not found');
77 | // walk services declared in SERVICE_FILE and instantiate them
78 | foreach ($services as $name => $serviceArray) {
79 | if (!isset($serviceArray['class'])) {
80 | continue;
81 | }
82 | // instantiate only "devmode" => true services when in APP_DEV_MODE true
83 | $devMode = $serviceArray['devmode'] ?? false;
84 | if ((ConfigurationManager::getConfig('APP_DEV_MODE') === false && $devMode === false) ||
85 | ConfigurationManager::getConfig('APP_DEV_MODE') === true ) {
86 | self::$serviceCollection[$name] = self::instantiate($serviceArray);
87 | }
88 | }
89 | }
90 |
91 | /**
92 | * Instanciate an object based on parameters stored in array
93 | * @param array $serviceArray
94 | * @return object
95 | */
96 | private static function instantiate(array $serviceArray)
97 | {
98 | $className = $serviceArray['class'];
99 | $constructor = new \ReflectionMethod($serviceArray['class'], '__construct');
100 | $paramCount = 0;
101 | $paramValues = [];
102 | foreach ($constructor->getParameters() as $paramSolo) {
103 | $reflectParam = new \ReflectionParameter([$serviceArray['class'], '__construct'], $paramSolo->name);
104 | if (isset($serviceArray['param'][$paramCount])) {
105 | $paramValues[$paramCount] = $serviceArray['param'][$paramCount];
106 | } elseif (!$reflectParam->isOptional() && $reflectParam->isDefaultValueAvailable()) {
107 | $paramValues[$paramCount] = $reflectParam->getDefaultValue();
108 | } else {
109 | // @todo handle the case where no param was given for a parma missing default value
110 | }
111 | $paramCount++;
112 | }
113 | $class = new \ReflectionClass($className);
114 | $instance = $class->newInstanceArgs($paramValues);
115 | return $instance;
116 | }
117 |
118 | /**
119 | * getServiceCollection allows for Container dump for debugging
120 | * @return array
121 | */
122 | public static function getServiceCollection()
123 | {
124 |
125 | return self::$serviceCollection;
126 | }
127 | }
128 |
--------------------------------------------------------------------------------
/Model/Entity/TrafficTracker.php:
--------------------------------------------------------------------------------
1 |
9 | * @package Entity
10 | * @ORM\Entity(repositoryClass="Model\TrafficTrackerRepository")
11 | * @ORM\Table(name="trafficTracker")
12 | */
13 | class TrafficTracker
14 | {
15 | /**
16 | * @ORM\Id
17 | * @ORM\GeneratedValue(strategy="AUTO")
18 | * @ORM\Column(type="integer")
19 | */
20 | private $id;
21 | /**
22 | * @ORM\Column(type="string",length=40)
23 | */
24 | private $session_id;
25 | /**
26 | * @ORM\Column(type="string",length=100)
27 | */
28 | private $route_identifier;
29 | /**
30 | * @ORM\Column(type="datetime")
31 | */
32 | private $created_at;
33 | /**
34 | * @ORM\Column(type="string",length=255)
35 | */
36 | private $uri;
37 | /**
38 | * @ORM\Column(type="string",length=30)
39 | */
40 | private $http_method;
41 | /**
42 | * @ORM\Column(type="string",length=255)
43 | */
44 | private $http_referer;
45 | /**
46 | * @var string
47 | * @ORM\Column(type="string",length=255)
48 | */
49 | private $http_user_agent;
50 | /**
51 | * @var string
52 | * @ORM\Column(type="string",length=10000)
53 | */
54 | private $headers;
55 | /**
56 | * @var string
57 | * @ORM\Column(type="string")
58 | */
59 | private $acceptLanguage;
60 |
61 | /**
62 | * @return string
63 | */
64 | public function getAcceptLanguage()
65 | {
66 | return $this->acceptLanguage;
67 | }
68 |
69 | /**
70 | * @param string $acceptLanguage
71 | * @return $this
72 | */
73 | public function setAcceptLanguage($acceptLanguage)
74 | {
75 | $this->acceptLanguage = $acceptLanguage;
76 |
77 | return $this;
78 | }
79 |
80 | /**
81 | * @return mixed
82 | */
83 | public function getHttpUserAgent()
84 | {
85 | return $this->http_user_agent;
86 | }
87 |
88 | /**
89 | * @return mixed
90 | */
91 | public function getHeaders()
92 | {
93 | return $this->headers;
94 | }
95 |
96 | /**
97 | * @param mixed $headers
98 | * @return $this
99 | */
100 | public function setHeaders($headers)
101 | {
102 | $this->headers = $headers;
103 |
104 | return $this;
105 | }
106 |
107 | /**
108 | * @param mixed $http_user_agent
109 | * @return $this
110 | */
111 | public function setHttpUserAgent($http_user_agent)
112 | {
113 | $this->http_user_agent = $http_user_agent;
114 |
115 | return $this;
116 | }
117 |
118 | /**
119 | * @return mixed
120 | */
121 | public function getHttpReferer()
122 | {
123 | return $this->http_referer;
124 | }
125 |
126 | /**
127 | * @param mixed $http_referer
128 | * @return $this
129 | */
130 | public function setHttpReferer($http_referer)
131 | {
132 | $this->http_referer = $http_referer;
133 |
134 | return $this;
135 | }
136 |
137 | /**
138 | * @return mixed
139 | */
140 | public function getId()
141 | {
142 | return $this->id;
143 | }
144 |
145 | /**
146 | * @param mixed $id
147 | * @return $this
148 | */
149 | public function setId($id)
150 | {
151 | $this->id = $id;
152 |
153 | return $this;
154 | }
155 |
156 | /**
157 | * @return mixed
158 | */
159 | public function getSessionId()
160 | {
161 | return $this->session_id;
162 | }
163 |
164 | /**
165 | * @param mixed $session_id
166 | * @return $this
167 | */
168 | public function setSessionId($session_id)
169 | {
170 | $this->session_id = $session_id;
171 |
172 | return $this;
173 | }
174 |
175 | /**
176 | * @return mixed
177 | */
178 | public function getRouteIdentifier()
179 | {
180 | return $this->route_identifier;
181 | }
182 |
183 | /**
184 | * @param mixed $route_identifier
185 | * @return $this
186 | */
187 | public function setRouteIdentifier($route_identifier)
188 | {
189 | $this->route_identifier = $route_identifier;
190 |
191 | return $this;
192 | }
193 |
194 | /**
195 | * @return mixed
196 | */
197 | public function getCreatedAt()
198 | {
199 | return $this->created_at;
200 | }
201 |
202 | /**
203 | * @param mixed $created_at
204 | * @return $this
205 | */
206 | public function setCreatedAt($created_at)
207 | {
208 | $this->created_at = $created_at;
209 |
210 | return $this;
211 | }
212 |
213 | /**
214 | * @return mixed
215 | */
216 | public function getUri()
217 | {
218 | return $this->uri;
219 | }
220 |
221 | /**
222 | * @param mixed $uri
223 | * @return $this
224 | */
225 | public function setUri($uri)
226 | {
227 | $this->uri = $uri;
228 |
229 | return $this;
230 | }
231 |
232 | /**
233 | * @return mixed
234 | */
235 | public function getHttpMethod()
236 | {
237 | return $this->http_method;
238 | }
239 |
240 | /**
241 | * @param mixed $http_method
242 | * @return $this
243 | */
244 | public function setHttpMethod($http_method)
245 | {
246 | $this->http_method = $http_method;
247 |
248 | return $this;
249 | }
250 |
251 |
252 | }
--------------------------------------------------------------------------------
/Tests/CLITableBuilderTest.php:
--------------------------------------------------------------------------------
1 |
11 | */
12 | class CLITableBuilderTest extends TestCase
13 | {
14 |
15 | /**
16 | * provides data for testInit
17 | * case #1 simple string table test
18 | * case #2 Simple table
19 | * case #3 Simple table with separator lines
20 | */
21 | public function tableBuilderProvider()
22 | {
23 | return [
24 | [
25 | [
26 | [
27 | 'a long string of weird text',
28 | 'str',
29 | '',
30 | ],
31 | ],
32 | null,
33 | false,
34 | false,
35 | '+----------------------------+----+-+'.PHP_EOL.
36 | '|a long string of weird text |str | |'.PHP_EOL.
37 | '+----------------------------+----+-+'.PHP_EOL
38 | ,
39 | ],
40 | [
41 | [
42 | [
43 | '1',
44 | '2',
45 | '3',
46 | ],
47 | [
48 | '4',
49 | '5',
50 | '6',
51 | ],
52 | ],
53 | [
54 | 'One',
55 | 'Two',
56 | 'Three',
57 | ],
58 | false,
59 | false,
60 | '+----+----+------+'.PHP_EOL.
61 | '|One |Two |Three |'.PHP_EOL.
62 | '+----+----+------+'.PHP_EOL.
63 | '|1 |2 |3 |'.PHP_EOL.
64 | '|4 |5 |6 |'.PHP_EOL.
65 | '+----+----+------+'.PHP_EOL
66 | ,
67 | ],
68 | [
69 | [
70 | [
71 | 'A',
72 | 'B',
73 | 'C',
74 | ],
75 | [
76 | 'D',
77 | 'E',
78 | 'F',
79 | ],
80 | ],
81 | [
82 | 'One',
83 | 'Two',
84 | 'Three',
85 | ],
86 | true,
87 | false,
88 | '+----+----+------+'.PHP_EOL.
89 | '|One |Two |Three |'.PHP_EOL.
90 | '+----+----+------+'.PHP_EOL.
91 | '|A |B |C |'.PHP_EOL.
92 | '+----+----+------+'.PHP_EOL.
93 | '|D |E |F |'.PHP_EOL.
94 | '+----+----+------+'.PHP_EOL
95 | ,
96 | ],
97 | [
98 | [
99 | [
100 | 'A',
101 | 'B',
102 | 'C',
103 | ],
104 | [
105 | 'D',
106 | 'E',
107 | 'F',
108 | ],
109 | [
110 | 'A',
111 | 'B',
112 | 'C',
113 | ],
114 | [
115 | 'D',
116 | 'E',
117 | 'F',
118 | ],
119 | [
120 | 'A',
121 | 'B',
122 | 'C',
123 | ],
124 | [
125 | 'D',
126 | 'E',
127 | 'F',
128 | ],
129 | [
130 | 'A',
131 | 'B',
132 | 'C',
133 | ],
134 | [
135 | 'D',
136 | 'E',
137 | 'F',
138 | ],
139 | [
140 | 'A',
141 | 'B',
142 | 'C',
143 | ],
144 | [
145 | 'D',
146 | 'E',
147 | 'F',
148 | ],
149 | [
150 | 'A',
151 | 'B',
152 | 'C',
153 | ],
154 | [
155 | 'D',
156 | 'E',
157 | 'F',
158 | ],
159 | [
160 | 'A',
161 | 'B',
162 | 'C',
163 | ],
164 | [
165 | 'D',
166 | 'E',
167 | 'F',
168 | ],
169 | [
170 | 'A',
171 | 'B',
172 | 'C',
173 | ],
174 | [
175 | 'D',
176 | 'E',
177 | 'F',
178 | ],
179 | [
180 | 'A',
181 | 'B',
182 | 'C',
183 | ],
184 | [
185 | 'D',
186 | 'E',
187 | 'F',
188 | ],
189 | [
190 | 'A',
191 | 'B',
192 | 'C',
193 | ],
194 | [
195 | 'D',
196 | 'E',
197 | 'F',
198 | ],
199 | [
200 | 'A',
201 | 'B',
202 | 'C',
203 | ],
204 | [
205 | 'D',
206 | 'E',
207 | 'F',
208 | ],
209 | ],
210 | [
211 | 'One',
212 | 'Two',
213 | 'Three',
214 | ],
215 | false,
216 | 5,
217 | '+----+----+------+'.PHP_EOL.
218 | '|One |Two |Three |'.PHP_EOL.
219 | '+----+----+------+'.PHP_EOL.
220 | '|A |B |C |'.PHP_EOL.
221 | '|D |E |F |'.PHP_EOL.
222 | '|A |B |C |'.PHP_EOL.
223 | '|D |E |F |'.PHP_EOL.
224 | '|A |B |C |'.PHP_EOL.
225 | '+----+----+------+'.PHP_EOL.
226 | '|One |Two |Three |'.PHP_EOL.
227 | '+----+----+------+'.PHP_EOL.
228 | '|D |E |F |'.PHP_EOL.
229 | '|A |B |C |'.PHP_EOL.
230 | '|D |E |F |'.PHP_EOL.
231 | '|A |B |C |'.PHP_EOL.
232 | '|D |E |F |'.PHP_EOL.
233 | '+----+----+------+'.PHP_EOL.
234 | '|One |Two |Three |'.PHP_EOL.
235 | '+----+----+------+'.PHP_EOL.
236 | '|A |B |C |'.PHP_EOL.
237 | '|D |E |F |'.PHP_EOL.
238 | '|A |B |C |'.PHP_EOL.
239 | '|D |E |F |'.PHP_EOL.
240 | '|A |B |C |'.PHP_EOL.
241 | '+----+----+------+'.PHP_EOL.
242 | '|One |Two |Three |'.PHP_EOL.
243 | '+----+----+------+'.PHP_EOL.
244 | '|D |E |F |'.PHP_EOL.
245 | '|A |B |C |'.PHP_EOL.
246 | '|D |E |F |'.PHP_EOL.
247 | '|A |B |C |'.PHP_EOL.
248 | '|D |E |F |'.PHP_EOL.
249 | '+----+----+------+'.PHP_EOL.
250 | '|One |Two |Three |'.PHP_EOL.
251 | '+----+----+------+'.PHP_EOL.
252 | '|A |B |C |'.PHP_EOL.
253 | '|D |E |F |'.PHP_EOL.
254 | '+----+----+------+'.PHP_EOL
255 | ],
256 | [
257 | [
258 | [
259 | 'A',
260 | 'B',
261 | 'C',
262 | ],
263 | [
264 | 'D',
265 | 'E',
266 | 'F',
267 | ],
268 | [
269 | 'A',
270 | 'B',
271 | 'C',
272 | ],
273 | [
274 | 'D',
275 | 'E',
276 | 'F',
277 | ],
278 | [
279 | 'A',
280 | 'B',
281 | 'C',
282 | ],
283 | [
284 | 'D',
285 | 'E',
286 | 'F',
287 | ],
288 | [
289 | 'A',
290 | 'B',
291 | 'C',
292 | ],
293 | [
294 | 'D',
295 | 'E',
296 | 'F',
297 | ],
298 | [
299 | 'A',
300 | 'B',
301 | 'C',
302 | ],
303 | [
304 | 'D',
305 | 'E',
306 | 'F',
307 | ],
308 | [
309 | 'A',
310 | 'B',
311 | 'C',
312 | ],
313 | [
314 | 'D',
315 | 'E',
316 | 'F',
317 | ],
318 | [
319 | 'A',
320 | 'B',
321 | 'C',
322 | ],
323 | [
324 | 'D',
325 | 'E',
326 | 'F',
327 | ],
328 | [
329 | 'A',
330 | 'B',
331 | 'C',
332 | ],
333 | [
334 | 'D',
335 | 'E',
336 | 'F',
337 | ],
338 | [
339 | 'A',
340 | 'B',
341 | 'C',
342 | ],
343 | [
344 | 'D',
345 | 'E',
346 | 'F',
347 | ],
348 | [
349 | 'A',
350 | 'B',
351 | 'C',
352 | ],
353 | [
354 | 'D',
355 | 'E',
356 | 'F',
357 | ],
358 | [
359 | 'A',
360 | 'B',
361 | 'C',
362 | ],
363 | [
364 | 'D',
365 | 'E',
366 | 'F',
367 | ],
368 | ],
369 | [
370 | 'One',
371 | 'Two',
372 | 'Three',
373 | ],
374 | true,
375 | false,
376 | '+----+----+------+'.PHP_EOL.
377 | '|One |Two |Three |'.PHP_EOL.
378 | '+----+----+------+'.PHP_EOL.
379 | '|A |B |C |'.PHP_EOL.
380 | '+----+----+------+'.PHP_EOL.
381 | '|D |E |F |'.PHP_EOL.
382 | '+----+----+------+'.PHP_EOL.
383 | '|A |B |C |'.PHP_EOL.
384 | '+----+----+------+'.PHP_EOL.
385 | '|D |E |F |'.PHP_EOL.
386 | '+----+----+------+'.PHP_EOL.
387 | '|A |B |C |'.PHP_EOL.
388 | '+----+----+------+'.PHP_EOL.
389 | '|D |E |F |'.PHP_EOL.
390 | '+----+----+------+'.PHP_EOL.
391 | '|A |B |C |'.PHP_EOL.
392 | '+----+----+------+'.PHP_EOL.
393 | '|D |E |F |'.PHP_EOL.
394 | '+----+----+------+'.PHP_EOL.
395 | '|A |B |C |'.PHP_EOL.
396 | '+----+----+------+'.PHP_EOL.
397 | '|D |E |F |'.PHP_EOL.
398 | '+----+----+------+'.PHP_EOL.
399 | '|A |B |C |'.PHP_EOL.
400 | '+----+----+------+'.PHP_EOL.
401 | '|D |E |F |'.PHP_EOL.
402 | '+----+----+------+'.PHP_EOL.
403 | '|A |B |C |'.PHP_EOL.
404 | '+----+----+------+'.PHP_EOL.
405 | '|D |E |F |'.PHP_EOL.
406 | '+----+----+------+'.PHP_EOL.
407 | '|A |B |C |'.PHP_EOL.
408 | '+----+----+------+'.PHP_EOL.
409 | '|D |E |F |'.PHP_EOL.
410 | '+----+----+------+'.PHP_EOL.
411 | '|A |B |C |'.PHP_EOL.
412 | '+----+----+------+'.PHP_EOL.
413 | '|D |E |F |'.PHP_EOL.
414 | '+----+----+------+'.PHP_EOL.
415 | '|A |B |C |'.PHP_EOL.
416 | '+----+----+------+'.PHP_EOL.
417 | '|D |E |F |'.PHP_EOL.
418 | '+----+----+------+'.PHP_EOL.
419 | '|A |B |C |'.PHP_EOL.
420 | '+----+----+------+'.PHP_EOL.
421 | '|D |E |F |'.PHP_EOL.
422 | '+----+----+------+'.PHP_EOL
423 | ],
424 | ];
425 | }
426 |
427 | /**
428 | * @test Helper\CLITableBuilder::init
429 | * @dataProvider tableBuilderProvider
430 | * @param array $data
431 | * @param null|array $headers
432 | * @param bool $separatorLines
433 | * @param bool|int $repeatHeader
434 | * @param string $expected
435 | */
436 | public function testInitMethod($data, $headers, $separatorLines, $repeatHeader, $expected)
437 | {
438 | // test the CLITableBuilder
439 | $output = CLITableBuilder::init($data, $headers, $separatorLines, $repeatHeader);
440 | $this->assertEquals($output, $expected);
441 | }
442 |
443 | /**
444 | * @test Helper\TableBuilder::init
445 | * @expectedException \Exception
446 | */
447 | public function testInitRecordException()
448 | {
449 | // test the TableBuilder
450 | CLITableBuilder::init(null, null);
451 | }
452 |
453 | /**
454 | * @test Helper\TableBuilder::init
455 | * @expectedException \Exception
456 | */
457 | public function testInitDataException()
458 | {
459 | // test the TableBuilder
460 | CLITableBuilder::init([null], null);
461 | }
462 | }
463 |
--------------------------------------------------------------------------------
/composer.lock:
--------------------------------------------------------------------------------
1 | {
2 | "_readme": [
3 | "This file locks the dependencies of your project to a known state",
4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5 | "This file is @generated automatically"
6 | ],
7 | "hash": "cefa28999cb18fd25616734f9b007e60",
8 | "content-hash": "921006fdd745db807a9cffba52e9bac9",
9 | "packages": [
10 | {
11 | "name": "components/jquery",
12 | "version": "2.2.4",
13 | "source": {
14 | "type": "git",
15 | "url": "https://github.com/components/jquery.git",
16 | "reference": "981036fcb56668433a7eb0d1e71190324b4574df"
17 | },
18 | "dist": {
19 | "type": "zip",
20 | "url": "https://api.github.com/repos/components/jquery/zipball/981036fcb56668433a7eb0d1e71190324b4574df",
21 | "reference": "981036fcb56668433a7eb0d1e71190324b4574df",
22 | "shasum": ""
23 | },
24 | "type": "component",
25 | "extra": {
26 | "component": {
27 | "scripts": [
28 | "jquery.js"
29 | ],
30 | "files": [
31 | "jquery.min.js",
32 | "jquery.min.map",
33 | "jquery-migrate.js",
34 | "jquery-migrate.min.js"
35 | ]
36 | }
37 | },
38 | "notification-url": "https://packagist.org/downloads/",
39 | "license": [
40 | "MIT"
41 | ],
42 | "authors": [
43 | {
44 | "name": "John Resig",
45 | "email": "jeresig@gmail.com"
46 | }
47 | ],
48 | "description": "jQuery JavaScript Library",
49 | "homepage": "http://jquery.com",
50 | "time": "2016-05-25 06:43:59"
51 | },
52 | {
53 | "name": "doctrine/annotations",
54 | "version": "v1.2.7",
55 | "source": {
56 | "type": "git",
57 | "url": "https://github.com/doctrine/annotations.git",
58 | "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535"
59 | },
60 | "dist": {
61 | "type": "zip",
62 | "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535",
63 | "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535",
64 | "shasum": ""
65 | },
66 | "require": {
67 | "doctrine/lexer": "1.*",
68 | "php": ">=5.3.2"
69 | },
70 | "require-dev": {
71 | "doctrine/cache": "1.*",
72 | "phpunit/phpunit": "4.*"
73 | },
74 | "type": "library",
75 | "extra": {
76 | "branch-alias": {
77 | "dev-master": "1.3.x-dev"
78 | }
79 | },
80 | "autoload": {
81 | "psr-0": {
82 | "Doctrine\\Common\\Annotations\\": "lib/"
83 | }
84 | },
85 | "notification-url": "https://packagist.org/downloads/",
86 | "license": [
87 | "MIT"
88 | ],
89 | "authors": [
90 | {
91 | "name": "Roman Borschel",
92 | "email": "roman@code-factory.org"
93 | },
94 | {
95 | "name": "Benjamin Eberlei",
96 | "email": "kontakt@beberlei.de"
97 | },
98 | {
99 | "name": "Guilherme Blanco",
100 | "email": "guilhermeblanco@gmail.com"
101 | },
102 | {
103 | "name": "Jonathan Wage",
104 | "email": "jonwage@gmail.com"
105 | },
106 | {
107 | "name": "Johannes Schmitt",
108 | "email": "schmittjoh@gmail.com"
109 | }
110 | ],
111 | "description": "Docblock Annotations Parser",
112 | "homepage": "http://www.doctrine-project.org",
113 | "keywords": [
114 | "annotations",
115 | "docblock",
116 | "parser"
117 | ],
118 | "time": "2015-08-31 12:32:49"
119 | },
120 | {
121 | "name": "doctrine/cache",
122 | "version": "v1.6.0",
123 | "source": {
124 | "type": "git",
125 | "url": "https://github.com/doctrine/cache.git",
126 | "reference": "f8af318d14bdb0eff0336795b428b547bd39ccb6"
127 | },
128 | "dist": {
129 | "type": "zip",
130 | "url": "https://api.github.com/repos/doctrine/cache/zipball/f8af318d14bdb0eff0336795b428b547bd39ccb6",
131 | "reference": "f8af318d14bdb0eff0336795b428b547bd39ccb6",
132 | "shasum": ""
133 | },
134 | "require": {
135 | "php": "~5.5|~7.0"
136 | },
137 | "conflict": {
138 | "doctrine/common": ">2.2,<2.4"
139 | },
140 | "require-dev": {
141 | "phpunit/phpunit": "~4.8|~5.0",
142 | "predis/predis": "~1.0",
143 | "satooshi/php-coveralls": "~0.6"
144 | },
145 | "type": "library",
146 | "extra": {
147 | "branch-alias": {
148 | "dev-master": "1.6.x-dev"
149 | }
150 | },
151 | "autoload": {
152 | "psr-4": {
153 | "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache"
154 | }
155 | },
156 | "notification-url": "https://packagist.org/downloads/",
157 | "license": [
158 | "MIT"
159 | ],
160 | "authors": [
161 | {
162 | "name": "Roman Borschel",
163 | "email": "roman@code-factory.org"
164 | },
165 | {
166 | "name": "Benjamin Eberlei",
167 | "email": "kontakt@beberlei.de"
168 | },
169 | {
170 | "name": "Guilherme Blanco",
171 | "email": "guilhermeblanco@gmail.com"
172 | },
173 | {
174 | "name": "Jonathan Wage",
175 | "email": "jonwage@gmail.com"
176 | },
177 | {
178 | "name": "Johannes Schmitt",
179 | "email": "schmittjoh@gmail.com"
180 | }
181 | ],
182 | "description": "Caching library offering an object-oriented API for many cache backends",
183 | "homepage": "http://www.doctrine-project.org",
184 | "keywords": [
185 | "cache",
186 | "caching"
187 | ],
188 | "time": "2015-12-31 16:37:02"
189 | },
190 | {
191 | "name": "doctrine/collections",
192 | "version": "v1.3.0",
193 | "source": {
194 | "type": "git",
195 | "url": "https://github.com/doctrine/collections.git",
196 | "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a"
197 | },
198 | "dist": {
199 | "type": "zip",
200 | "url": "https://api.github.com/repos/doctrine/collections/zipball/6c1e4eef75f310ea1b3e30945e9f06e652128b8a",
201 | "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a",
202 | "shasum": ""
203 | },
204 | "require": {
205 | "php": ">=5.3.2"
206 | },
207 | "require-dev": {
208 | "phpunit/phpunit": "~4.0"
209 | },
210 | "type": "library",
211 | "extra": {
212 | "branch-alias": {
213 | "dev-master": "1.2.x-dev"
214 | }
215 | },
216 | "autoload": {
217 | "psr-0": {
218 | "Doctrine\\Common\\Collections\\": "lib/"
219 | }
220 | },
221 | "notification-url": "https://packagist.org/downloads/",
222 | "license": [
223 | "MIT"
224 | ],
225 | "authors": [
226 | {
227 | "name": "Roman Borschel",
228 | "email": "roman@code-factory.org"
229 | },
230 | {
231 | "name": "Benjamin Eberlei",
232 | "email": "kontakt@beberlei.de"
233 | },
234 | {
235 | "name": "Guilherme Blanco",
236 | "email": "guilhermeblanco@gmail.com"
237 | },
238 | {
239 | "name": "Jonathan Wage",
240 | "email": "jonwage@gmail.com"
241 | },
242 | {
243 | "name": "Johannes Schmitt",
244 | "email": "schmittjoh@gmail.com"
245 | }
246 | ],
247 | "description": "Collections Abstraction library",
248 | "homepage": "http://www.doctrine-project.org",
249 | "keywords": [
250 | "array",
251 | "collections",
252 | "iterator"
253 | ],
254 | "time": "2015-04-14 22:21:58"
255 | },
256 | {
257 | "name": "doctrine/common",
258 | "version": "v2.6.1",
259 | "source": {
260 | "type": "git",
261 | "url": "https://github.com/doctrine/common.git",
262 | "reference": "a579557bc689580c19fee4e27487a67fe60defc0"
263 | },
264 | "dist": {
265 | "type": "zip",
266 | "url": "https://api.github.com/repos/doctrine/common/zipball/a579557bc689580c19fee4e27487a67fe60defc0",
267 | "reference": "a579557bc689580c19fee4e27487a67fe60defc0",
268 | "shasum": ""
269 | },
270 | "require": {
271 | "doctrine/annotations": "1.*",
272 | "doctrine/cache": "1.*",
273 | "doctrine/collections": "1.*",
274 | "doctrine/inflector": "1.*",
275 | "doctrine/lexer": "1.*",
276 | "php": "~5.5|~7.0"
277 | },
278 | "require-dev": {
279 | "phpunit/phpunit": "~4.8|~5.0"
280 | },
281 | "type": "library",
282 | "extra": {
283 | "branch-alias": {
284 | "dev-master": "2.7.x-dev"
285 | }
286 | },
287 | "autoload": {
288 | "psr-4": {
289 | "Doctrine\\Common\\": "lib/Doctrine/Common"
290 | }
291 | },
292 | "notification-url": "https://packagist.org/downloads/",
293 | "license": [
294 | "MIT"
295 | ],
296 | "authors": [
297 | {
298 | "name": "Roman Borschel",
299 | "email": "roman@code-factory.org"
300 | },
301 | {
302 | "name": "Benjamin Eberlei",
303 | "email": "kontakt@beberlei.de"
304 | },
305 | {
306 | "name": "Guilherme Blanco",
307 | "email": "guilhermeblanco@gmail.com"
308 | },
309 | {
310 | "name": "Jonathan Wage",
311 | "email": "jonwage@gmail.com"
312 | },
313 | {
314 | "name": "Johannes Schmitt",
315 | "email": "schmittjoh@gmail.com"
316 | }
317 | ],
318 | "description": "Common Library for Doctrine projects",
319 | "homepage": "http://www.doctrine-project.org",
320 | "keywords": [
321 | "annotations",
322 | "collections",
323 | "eventmanager",
324 | "persistence",
325 | "spl"
326 | ],
327 | "time": "2015-12-25 13:18:31"
328 | },
329 | {
330 | "name": "doctrine/dbal",
331 | "version": "v2.5.4",
332 | "source": {
333 | "type": "git",
334 | "url": "https://github.com/doctrine/dbal.git",
335 | "reference": "abbdfd1cff43a7b99d027af3be709bc8fc7d4769"
336 | },
337 | "dist": {
338 | "type": "zip",
339 | "url": "https://api.github.com/repos/doctrine/dbal/zipball/abbdfd1cff43a7b99d027af3be709bc8fc7d4769",
340 | "reference": "abbdfd1cff43a7b99d027af3be709bc8fc7d4769",
341 | "shasum": ""
342 | },
343 | "require": {
344 | "doctrine/common": ">=2.4,<2.7-dev",
345 | "php": ">=5.3.2"
346 | },
347 | "require-dev": {
348 | "phpunit/phpunit": "4.*",
349 | "symfony/console": "2.*"
350 | },
351 | "suggest": {
352 | "symfony/console": "For helpful console commands such as SQL execution and import of files."
353 | },
354 | "bin": [
355 | "bin/doctrine-dbal"
356 | ],
357 | "type": "library",
358 | "extra": {
359 | "branch-alias": {
360 | "dev-master": "2.5.x-dev"
361 | }
362 | },
363 | "autoload": {
364 | "psr-0": {
365 | "Doctrine\\DBAL\\": "lib/"
366 | }
367 | },
368 | "notification-url": "https://packagist.org/downloads/",
369 | "license": [
370 | "MIT"
371 | ],
372 | "authors": [
373 | {
374 | "name": "Roman Borschel",
375 | "email": "roman@code-factory.org"
376 | },
377 | {
378 | "name": "Benjamin Eberlei",
379 | "email": "kontakt@beberlei.de"
380 | },
381 | {
382 | "name": "Guilherme Blanco",
383 | "email": "guilhermeblanco@gmail.com"
384 | },
385 | {
386 | "name": "Jonathan Wage",
387 | "email": "jonwage@gmail.com"
388 | }
389 | ],
390 | "description": "Database Abstraction Layer",
391 | "homepage": "http://www.doctrine-project.org",
392 | "keywords": [
393 | "database",
394 | "dbal",
395 | "persistence",
396 | "queryobject"
397 | ],
398 | "time": "2016-01-05 22:11:12"
399 | },
400 | {
401 | "name": "doctrine/inflector",
402 | "version": "v1.1.0",
403 | "source": {
404 | "type": "git",
405 | "url": "https://github.com/doctrine/inflector.git",
406 | "reference": "90b2128806bfde671b6952ab8bea493942c1fdae"
407 | },
408 | "dist": {
409 | "type": "zip",
410 | "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae",
411 | "reference": "90b2128806bfde671b6952ab8bea493942c1fdae",
412 | "shasum": ""
413 | },
414 | "require": {
415 | "php": ">=5.3.2"
416 | },
417 | "require-dev": {
418 | "phpunit/phpunit": "4.*"
419 | },
420 | "type": "library",
421 | "extra": {
422 | "branch-alias": {
423 | "dev-master": "1.1.x-dev"
424 | }
425 | },
426 | "autoload": {
427 | "psr-0": {
428 | "Doctrine\\Common\\Inflector\\": "lib/"
429 | }
430 | },
431 | "notification-url": "https://packagist.org/downloads/",
432 | "license": [
433 | "MIT"
434 | ],
435 | "authors": [
436 | {
437 | "name": "Roman Borschel",
438 | "email": "roman@code-factory.org"
439 | },
440 | {
441 | "name": "Benjamin Eberlei",
442 | "email": "kontakt@beberlei.de"
443 | },
444 | {
445 | "name": "Guilherme Blanco",
446 | "email": "guilhermeblanco@gmail.com"
447 | },
448 | {
449 | "name": "Jonathan Wage",
450 | "email": "jonwage@gmail.com"
451 | },
452 | {
453 | "name": "Johannes Schmitt",
454 | "email": "schmittjoh@gmail.com"
455 | }
456 | ],
457 | "description": "Common String Manipulations with regard to casing and singular/plural rules.",
458 | "homepage": "http://www.doctrine-project.org",
459 | "keywords": [
460 | "inflection",
461 | "pluralize",
462 | "singularize",
463 | "string"
464 | ],
465 | "time": "2015-11-06 14:35:42"
466 | },
467 | {
468 | "name": "doctrine/instantiator",
469 | "version": "1.0.5",
470 | "source": {
471 | "type": "git",
472 | "url": "https://github.com/doctrine/instantiator.git",
473 | "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
474 | },
475 | "dist": {
476 | "type": "zip",
477 | "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
478 | "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
479 | "shasum": ""
480 | },
481 | "require": {
482 | "php": ">=5.3,<8.0-DEV"
483 | },
484 | "require-dev": {
485 | "athletic/athletic": "~0.1.8",
486 | "ext-pdo": "*",
487 | "ext-phar": "*",
488 | "phpunit/phpunit": "~4.0",
489 | "squizlabs/php_codesniffer": "~2.0"
490 | },
491 | "type": "library",
492 | "extra": {
493 | "branch-alias": {
494 | "dev-master": "1.0.x-dev"
495 | }
496 | },
497 | "autoload": {
498 | "psr-4": {
499 | "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
500 | }
501 | },
502 | "notification-url": "https://packagist.org/downloads/",
503 | "license": [
504 | "MIT"
505 | ],
506 | "authors": [
507 | {
508 | "name": "Marco Pivetta",
509 | "email": "ocramius@gmail.com",
510 | "homepage": "http://ocramius.github.com/"
511 | }
512 | ],
513 | "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
514 | "homepage": "https://github.com/doctrine/instantiator",
515 | "keywords": [
516 | "constructor",
517 | "instantiate"
518 | ],
519 | "time": "2015-06-14 21:17:01"
520 | },
521 | {
522 | "name": "doctrine/lexer",
523 | "version": "v1.0.1",
524 | "source": {
525 | "type": "git",
526 | "url": "https://github.com/doctrine/lexer.git",
527 | "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c"
528 | },
529 | "dist": {
530 | "type": "zip",
531 | "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c",
532 | "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c",
533 | "shasum": ""
534 | },
535 | "require": {
536 | "php": ">=5.3.2"
537 | },
538 | "type": "library",
539 | "extra": {
540 | "branch-alias": {
541 | "dev-master": "1.0.x-dev"
542 | }
543 | },
544 | "autoload": {
545 | "psr-0": {
546 | "Doctrine\\Common\\Lexer\\": "lib/"
547 | }
548 | },
549 | "notification-url": "https://packagist.org/downloads/",
550 | "license": [
551 | "MIT"
552 | ],
553 | "authors": [
554 | {
555 | "name": "Roman Borschel",
556 | "email": "roman@code-factory.org"
557 | },
558 | {
559 | "name": "Guilherme Blanco",
560 | "email": "guilhermeblanco@gmail.com"
561 | },
562 | {
563 | "name": "Johannes Schmitt",
564 | "email": "schmittjoh@gmail.com"
565 | }
566 | ],
567 | "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.",
568 | "homepage": "http://www.doctrine-project.org",
569 | "keywords": [
570 | "lexer",
571 | "parser"
572 | ],
573 | "time": "2014-09-09 13:34:57"
574 | },
575 | {
576 | "name": "doctrine/orm",
577 | "version": "v2.5.4",
578 | "source": {
579 | "type": "git",
580 | "url": "https://github.com/doctrine/doctrine2.git",
581 | "reference": "bc4ddbfb0114cb33438cc811c9a740d8aa304aab"
582 | },
583 | "dist": {
584 | "type": "zip",
585 | "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/bc4ddbfb0114cb33438cc811c9a740d8aa304aab",
586 | "reference": "bc4ddbfb0114cb33438cc811c9a740d8aa304aab",
587 | "shasum": ""
588 | },
589 | "require": {
590 | "doctrine/cache": "~1.4",
591 | "doctrine/collections": "~1.2",
592 | "doctrine/common": ">=2.5-dev,<2.7-dev",
593 | "doctrine/dbal": ">=2.5-dev,<2.6-dev",
594 | "doctrine/instantiator": "~1.0.1",
595 | "ext-pdo": "*",
596 | "php": ">=5.4",
597 | "symfony/console": "~2.5|~3.0"
598 | },
599 | "require-dev": {
600 | "phpunit/phpunit": "~4.0",
601 | "symfony/yaml": "~2.3|~3.0"
602 | },
603 | "suggest": {
604 | "symfony/yaml": "If you want to use YAML Metadata Mapping Driver"
605 | },
606 | "bin": [
607 | "bin/doctrine",
608 | "bin/doctrine.php"
609 | ],
610 | "type": "library",
611 | "extra": {
612 | "branch-alias": {
613 | "dev-master": "2.6.x-dev"
614 | }
615 | },
616 | "autoload": {
617 | "psr-0": {
618 | "Doctrine\\ORM\\": "lib/"
619 | }
620 | },
621 | "notification-url": "https://packagist.org/downloads/",
622 | "license": [
623 | "MIT"
624 | ],
625 | "authors": [
626 | {
627 | "name": "Roman Borschel",
628 | "email": "roman@code-factory.org"
629 | },
630 | {
631 | "name": "Benjamin Eberlei",
632 | "email": "kontakt@beberlei.de"
633 | },
634 | {
635 | "name": "Guilherme Blanco",
636 | "email": "guilhermeblanco@gmail.com"
637 | },
638 | {
639 | "name": "Jonathan Wage",
640 | "email": "jonwage@gmail.com"
641 | }
642 | ],
643 | "description": "Object-Relational-Mapper for PHP",
644 | "homepage": "http://www.doctrine-project.org",
645 | "keywords": [
646 | "database",
647 | "orm"
648 | ],
649 | "time": "2016-01-05 21:34:58"
650 | },
651 | {
652 | "name": "monolog/monolog",
653 | "version": "1.19.0",
654 | "source": {
655 | "type": "git",
656 | "url": "https://github.com/Seldaek/monolog.git",
657 | "reference": "5f56ed5212dc509c8dc8caeba2715732abb32dbf"
658 | },
659 | "dist": {
660 | "type": "zip",
661 | "url": "https://api.github.com/repos/Seldaek/monolog/zipball/5f56ed5212dc509c8dc8caeba2715732abb32dbf",
662 | "reference": "5f56ed5212dc509c8dc8caeba2715732abb32dbf",
663 | "shasum": ""
664 | },
665 | "require": {
666 | "php": ">=5.3.0",
667 | "psr/log": "~1.0"
668 | },
669 | "provide": {
670 | "psr/log-implementation": "1.0.0"
671 | },
672 | "require-dev": {
673 | "aws/aws-sdk-php": "^2.4.9",
674 | "doctrine/couchdb": "~1.0@dev",
675 | "graylog2/gelf-php": "~1.0",
676 | "jakub-onderka/php-parallel-lint": "0.9",
677 | "php-amqplib/php-amqplib": "~2.4",
678 | "php-console/php-console": "^3.1.3",
679 | "phpunit/phpunit": "~4.5",
680 | "phpunit/phpunit-mock-objects": "2.3.0",
681 | "raven/raven": "^0.13",
682 | "ruflin/elastica": ">=0.90 <3.0",
683 | "swiftmailer/swiftmailer": "~5.3"
684 | },
685 | "suggest": {
686 | "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
687 | "doctrine/couchdb": "Allow sending log messages to a CouchDB server",
688 | "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
689 | "ext-mongo": "Allow sending log messages to a MongoDB server",
690 | "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
691 | "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver",
692 | "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
693 | "php-console/php-console": "Allow sending log messages to Google Chrome",
694 | "raven/raven": "Allow sending log messages to a Sentry server",
695 | "rollbar/rollbar": "Allow sending log messages to Rollbar",
696 | "ruflin/elastica": "Allow sending log messages to an Elastic Search server"
697 | },
698 | "type": "library",
699 | "extra": {
700 | "branch-alias": {
701 | "dev-master": "2.0.x-dev"
702 | }
703 | },
704 | "autoload": {
705 | "psr-4": {
706 | "Monolog\\": "src/Monolog"
707 | }
708 | },
709 | "notification-url": "https://packagist.org/downloads/",
710 | "license": [
711 | "MIT"
712 | ],
713 | "authors": [
714 | {
715 | "name": "Jordi Boggiano",
716 | "email": "j.boggiano@seld.be",
717 | "homepage": "http://seld.be"
718 | }
719 | ],
720 | "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
721 | "homepage": "http://github.com/Seldaek/monolog",
722 | "keywords": [
723 | "log",
724 | "logging",
725 | "psr-3"
726 | ],
727 | "time": "2016-04-12 18:29:35"
728 | },
729 | {
730 | "name": "psr/log",
731 | "version": "1.0.0",
732 | "source": {
733 | "type": "git",
734 | "url": "https://github.com/php-fig/log.git",
735 | "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b"
736 | },
737 | "dist": {
738 | "type": "zip",
739 | "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b",
740 | "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b",
741 | "shasum": ""
742 | },
743 | "type": "library",
744 | "autoload": {
745 | "psr-0": {
746 | "Psr\\Log\\": ""
747 | }
748 | },
749 | "notification-url": "https://packagist.org/downloads/",
750 | "license": [
751 | "MIT"
752 | ],
753 | "authors": [
754 | {
755 | "name": "PHP-FIG",
756 | "homepage": "http://www.php-fig.org/"
757 | }
758 | ],
759 | "description": "Common interface for logging libraries",
760 | "keywords": [
761 | "log",
762 | "psr",
763 | "psr-3"
764 | ],
765 | "time": "2012-12-21 11:40:51"
766 | },
767 | {
768 | "name": "symfony/console",
769 | "version": "v3.1.0",
770 | "source": {
771 | "type": "git",
772 | "url": "https://github.com/symfony/console.git",
773 | "reference": "f62db5b8afec27073a4609b8c84b1f9936652259"
774 | },
775 | "dist": {
776 | "type": "zip",
777 | "url": "https://api.github.com/repos/symfony/console/zipball/f62db5b8afec27073a4609b8c84b1f9936652259",
778 | "reference": "f62db5b8afec27073a4609b8c84b1f9936652259",
779 | "shasum": ""
780 | },
781 | "require": {
782 | "php": ">=5.5.9",
783 | "symfony/polyfill-mbstring": "~1.0"
784 | },
785 | "require-dev": {
786 | "psr/log": "~1.0",
787 | "symfony/event-dispatcher": "~2.8|~3.0",
788 | "symfony/process": "~2.8|~3.0"
789 | },
790 | "suggest": {
791 | "psr/log": "For using the console logger",
792 | "symfony/event-dispatcher": "",
793 | "symfony/process": ""
794 | },
795 | "type": "library",
796 | "extra": {
797 | "branch-alias": {
798 | "dev-master": "3.1-dev"
799 | }
800 | },
801 | "autoload": {
802 | "psr-4": {
803 | "Symfony\\Component\\Console\\": ""
804 | },
805 | "exclude-from-classmap": [
806 | "/Tests/"
807 | ]
808 | },
809 | "notification-url": "https://packagist.org/downloads/",
810 | "license": [
811 | "MIT"
812 | ],
813 | "authors": [
814 | {
815 | "name": "Fabien Potencier",
816 | "email": "fabien@symfony.com"
817 | },
818 | {
819 | "name": "Symfony Community",
820 | "homepage": "https://symfony.com/contributors"
821 | }
822 | ],
823 | "description": "Symfony Console Component",
824 | "homepage": "https://symfony.com",
825 | "time": "2016-05-30 06:58:39"
826 | },
827 | {
828 | "name": "symfony/polyfill-mbstring",
829 | "version": "v1.2.0",
830 | "source": {
831 | "type": "git",
832 | "url": "https://github.com/symfony/polyfill-mbstring.git",
833 | "reference": "dff51f72b0706335131b00a7f49606168c582594"
834 | },
835 | "dist": {
836 | "type": "zip",
837 | "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594",
838 | "reference": "dff51f72b0706335131b00a7f49606168c582594",
839 | "shasum": ""
840 | },
841 | "require": {
842 | "php": ">=5.3.3"
843 | },
844 | "suggest": {
845 | "ext-mbstring": "For best performance"
846 | },
847 | "type": "library",
848 | "extra": {
849 | "branch-alias": {
850 | "dev-master": "1.2-dev"
851 | }
852 | },
853 | "autoload": {
854 | "psr-4": {
855 | "Symfony\\Polyfill\\Mbstring\\": ""
856 | },
857 | "files": [
858 | "bootstrap.php"
859 | ]
860 | },
861 | "notification-url": "https://packagist.org/downloads/",
862 | "license": [
863 | "MIT"
864 | ],
865 | "authors": [
866 | {
867 | "name": "Nicolas Grekas",
868 | "email": "p@tchwork.com"
869 | },
870 | {
871 | "name": "Symfony Community",
872 | "homepage": "https://symfony.com/contributors"
873 | }
874 | ],
875 | "description": "Symfony polyfill for the Mbstring extension",
876 | "homepage": "https://symfony.com",
877 | "keywords": [
878 | "compatibility",
879 | "mbstring",
880 | "polyfill",
881 | "portable",
882 | "shim"
883 | ],
884 | "time": "2016-05-18 14:26:46"
885 | },
886 | {
887 | "name": "twbs/bootstrap",
888 | "version": "v3.3.6",
889 | "source": {
890 | "type": "git",
891 | "url": "https://github.com/twbs/bootstrap.git",
892 | "reference": "81df608a40bf0629a1dc08e584849bb1e43e0b7a"
893 | },
894 | "dist": {
895 | "type": "zip",
896 | "url": "https://api.github.com/repos/twbs/bootstrap/zipball/81df608a40bf0629a1dc08e584849bb1e43e0b7a",
897 | "reference": "81df608a40bf0629a1dc08e584849bb1e43e0b7a",
898 | "shasum": ""
899 | },
900 | "replace": {
901 | "twitter/bootstrap": "self.version"
902 | },
903 | "type": "library",
904 | "extra": {
905 | "branch-alias": {
906 | "dev-master": "3.3.x-dev"
907 | }
908 | },
909 | "notification-url": "https://packagist.org/downloads/",
910 | "license": [
911 | "MIT"
912 | ],
913 | "authors": [
914 | {
915 | "name": "Jacob Thornton",
916 | "email": "jacobthornton@gmail.com"
917 | },
918 | {
919 | "name": "Mark Otto",
920 | "email": "markdotto@gmail.com"
921 | }
922 | ],
923 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
924 | "homepage": "http://getbootstrap.com",
925 | "keywords": [
926 | "JS",
927 | "css",
928 | "framework",
929 | "front-end",
930 | "less",
931 | "mobile-first",
932 | "responsive",
933 | "web"
934 | ],
935 | "time": "2015-11-24 19:37:05"
936 | },
937 | {
938 | "name": "twig/twig",
939 | "version": "v1.24.1",
940 | "source": {
941 | "type": "git",
942 | "url": "https://github.com/twigphp/Twig.git",
943 | "reference": "3566d311a92aae4deec6e48682dc5a4528c4a512"
944 | },
945 | "dist": {
946 | "type": "zip",
947 | "url": "https://api.github.com/repos/twigphp/Twig/zipball/3566d311a92aae4deec6e48682dc5a4528c4a512",
948 | "reference": "3566d311a92aae4deec6e48682dc5a4528c4a512",
949 | "shasum": ""
950 | },
951 | "require": {
952 | "php": ">=5.2.7"
953 | },
954 | "require-dev": {
955 | "symfony/debug": "~2.7",
956 | "symfony/phpunit-bridge": "~2.7"
957 | },
958 | "type": "library",
959 | "extra": {
960 | "branch-alias": {
961 | "dev-master": "1.24-dev"
962 | }
963 | },
964 | "autoload": {
965 | "psr-0": {
966 | "Twig_": "lib/"
967 | }
968 | },
969 | "notification-url": "https://packagist.org/downloads/",
970 | "license": [
971 | "BSD-3-Clause"
972 | ],
973 | "authors": [
974 | {
975 | "name": "Fabien Potencier",
976 | "email": "fabien@symfony.com",
977 | "homepage": "http://fabien.potencier.org",
978 | "role": "Lead Developer"
979 | },
980 | {
981 | "name": "Armin Ronacher",
982 | "email": "armin.ronacher@active-4.com",
983 | "role": "Project Founder"
984 | },
985 | {
986 | "name": "Twig Team",
987 | "homepage": "http://twig.sensiolabs.org/contributors",
988 | "role": "Contributors"
989 | }
990 | ],
991 | "description": "Twig, the flexible, fast, and secure template language for PHP",
992 | "homepage": "http://twig.sensiolabs.org",
993 | "keywords": [
994 | "templating"
995 | ],
996 | "time": "2016-05-30 09:11:59"
997 | }
998 | ],
999 | "packages-dev": [
1000 | {
1001 | "name": "myclabs/deep-copy",
1002 | "version": "1.5.1",
1003 | "source": {
1004 | "type": "git",
1005 | "url": "https://github.com/myclabs/DeepCopy.git",
1006 | "reference": "a8773992b362b58498eed24bf85005f363c34771"
1007 | },
1008 | "dist": {
1009 | "type": "zip",
1010 | "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/a8773992b362b58498eed24bf85005f363c34771",
1011 | "reference": "a8773992b362b58498eed24bf85005f363c34771",
1012 | "shasum": ""
1013 | },
1014 | "require": {
1015 | "php": ">=5.4.0"
1016 | },
1017 | "require-dev": {
1018 | "doctrine/collections": "1.*",
1019 | "phpunit/phpunit": "~4.1"
1020 | },
1021 | "type": "library",
1022 | "autoload": {
1023 | "psr-4": {
1024 | "DeepCopy\\": "src/DeepCopy/"
1025 | }
1026 | },
1027 | "notification-url": "https://packagist.org/downloads/",
1028 | "license": [
1029 | "MIT"
1030 | ],
1031 | "description": "Create deep copies (clones) of your objects",
1032 | "homepage": "https://github.com/myclabs/DeepCopy",
1033 | "keywords": [
1034 | "clone",
1035 | "copy",
1036 | "duplicate",
1037 | "object",
1038 | "object graph"
1039 | ],
1040 | "time": "2015-11-20 12:04:31"
1041 | },
1042 | {
1043 | "name": "phpdocumentor/reflection-docblock",
1044 | "version": "2.0.4",
1045 | "source": {
1046 | "type": "git",
1047 | "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
1048 | "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8"
1049 | },
1050 | "dist": {
1051 | "type": "zip",
1052 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8",
1053 | "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8",
1054 | "shasum": ""
1055 | },
1056 | "require": {
1057 | "php": ">=5.3.3"
1058 | },
1059 | "require-dev": {
1060 | "phpunit/phpunit": "~4.0"
1061 | },
1062 | "suggest": {
1063 | "dflydev/markdown": "~1.0",
1064 | "erusev/parsedown": "~1.0"
1065 | },
1066 | "type": "library",
1067 | "extra": {
1068 | "branch-alias": {
1069 | "dev-master": "2.0.x-dev"
1070 | }
1071 | },
1072 | "autoload": {
1073 | "psr-0": {
1074 | "phpDocumentor": [
1075 | "src/"
1076 | ]
1077 | }
1078 | },
1079 | "notification-url": "https://packagist.org/downloads/",
1080 | "license": [
1081 | "MIT"
1082 | ],
1083 | "authors": [
1084 | {
1085 | "name": "Mike van Riel",
1086 | "email": "mike.vanriel@naenius.com"
1087 | }
1088 | ],
1089 | "time": "2015-02-03 12:10:50"
1090 | },
1091 | {
1092 | "name": "phpspec/prophecy",
1093 | "version": "v1.6.0",
1094 | "source": {
1095 | "type": "git",
1096 | "url": "https://github.com/phpspec/prophecy.git",
1097 | "reference": "3c91bdf81797d725b14cb62906f9a4ce44235972"
1098 | },
1099 | "dist": {
1100 | "type": "zip",
1101 | "url": "https://api.github.com/repos/phpspec/prophecy/zipball/3c91bdf81797d725b14cb62906f9a4ce44235972",
1102 | "reference": "3c91bdf81797d725b14cb62906f9a4ce44235972",
1103 | "shasum": ""
1104 | },
1105 | "require": {
1106 | "doctrine/instantiator": "^1.0.2",
1107 | "php": "^5.3|^7.0",
1108 | "phpdocumentor/reflection-docblock": "~2.0",
1109 | "sebastian/comparator": "~1.1",
1110 | "sebastian/recursion-context": "~1.0"
1111 | },
1112 | "require-dev": {
1113 | "phpspec/phpspec": "~2.0"
1114 | },
1115 | "type": "library",
1116 | "extra": {
1117 | "branch-alias": {
1118 | "dev-master": "1.5.x-dev"
1119 | }
1120 | },
1121 | "autoload": {
1122 | "psr-0": {
1123 | "Prophecy\\": "src/"
1124 | }
1125 | },
1126 | "notification-url": "https://packagist.org/downloads/",
1127 | "license": [
1128 | "MIT"
1129 | ],
1130 | "authors": [
1131 | {
1132 | "name": "Konstantin Kudryashov",
1133 | "email": "ever.zet@gmail.com",
1134 | "homepage": "http://everzet.com"
1135 | },
1136 | {
1137 | "name": "Marcello Duarte",
1138 | "email": "marcello.duarte@gmail.com"
1139 | }
1140 | ],
1141 | "description": "Highly opinionated mocking framework for PHP 5.3+",
1142 | "homepage": "https://github.com/phpspec/prophecy",
1143 | "keywords": [
1144 | "Double",
1145 | "Dummy",
1146 | "fake",
1147 | "mock",
1148 | "spy",
1149 | "stub"
1150 | ],
1151 | "time": "2016-02-15 07:46:21"
1152 | },
1153 | {
1154 | "name": "phpunit/php-code-coverage",
1155 | "version": "4.0.0",
1156 | "source": {
1157 | "type": "git",
1158 | "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
1159 | "reference": "900370c81280cc0d942ffbc5912d80464eaee7e9"
1160 | },
1161 | "dist": {
1162 | "type": "zip",
1163 | "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/900370c81280cc0d942ffbc5912d80464eaee7e9",
1164 | "reference": "900370c81280cc0d942ffbc5912d80464eaee7e9",
1165 | "shasum": ""
1166 | },
1167 | "require": {
1168 | "php": "^5.6 || ^7.0",
1169 | "phpunit/php-file-iterator": "~1.3",
1170 | "phpunit/php-text-template": "~1.2",
1171 | "phpunit/php-token-stream": "^1.4.2",
1172 | "sebastian/code-unit-reverse-lookup": "~1.0",
1173 | "sebastian/environment": "^1.3.2",
1174 | "sebastian/version": "~1.0|~2.0"
1175 | },
1176 | "require-dev": {
1177 | "ext-xdebug": ">=2.1.4",
1178 | "phpunit/phpunit": "^5.4"
1179 | },
1180 | "suggest": {
1181 | "ext-dom": "*",
1182 | "ext-xdebug": ">=2.4.0",
1183 | "ext-xmlwriter": "*"
1184 | },
1185 | "type": "library",
1186 | "extra": {
1187 | "branch-alias": {
1188 | "dev-master": "4.0.x-dev"
1189 | }
1190 | },
1191 | "autoload": {
1192 | "classmap": [
1193 | "src/"
1194 | ]
1195 | },
1196 | "notification-url": "https://packagist.org/downloads/",
1197 | "license": [
1198 | "BSD-3-Clause"
1199 | ],
1200 | "authors": [
1201 | {
1202 | "name": "Sebastian Bergmann",
1203 | "email": "sb@sebastian-bergmann.de",
1204 | "role": "lead"
1205 | }
1206 | ],
1207 | "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
1208 | "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
1209 | "keywords": [
1210 | "coverage",
1211 | "testing",
1212 | "xunit"
1213 | ],
1214 | "time": "2016-06-03 05:03:56"
1215 | },
1216 | {
1217 | "name": "phpunit/php-file-iterator",
1218 | "version": "1.4.1",
1219 | "source": {
1220 | "type": "git",
1221 | "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
1222 | "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0"
1223 | },
1224 | "dist": {
1225 | "type": "zip",
1226 | "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
1227 | "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
1228 | "shasum": ""
1229 | },
1230 | "require": {
1231 | "php": ">=5.3.3"
1232 | },
1233 | "type": "library",
1234 | "extra": {
1235 | "branch-alias": {
1236 | "dev-master": "1.4.x-dev"
1237 | }
1238 | },
1239 | "autoload": {
1240 | "classmap": [
1241 | "src/"
1242 | ]
1243 | },
1244 | "notification-url": "https://packagist.org/downloads/",
1245 | "license": [
1246 | "BSD-3-Clause"
1247 | ],
1248 | "authors": [
1249 | {
1250 | "name": "Sebastian Bergmann",
1251 | "email": "sb@sebastian-bergmann.de",
1252 | "role": "lead"
1253 | }
1254 | ],
1255 | "description": "FilterIterator implementation that filters files based on a list of suffixes.",
1256 | "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
1257 | "keywords": [
1258 | "filesystem",
1259 | "iterator"
1260 | ],
1261 | "time": "2015-06-21 13:08:43"
1262 | },
1263 | {
1264 | "name": "phpunit/php-text-template",
1265 | "version": "1.2.1",
1266 | "source": {
1267 | "type": "git",
1268 | "url": "https://github.com/sebastianbergmann/php-text-template.git",
1269 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
1270 | },
1271 | "dist": {
1272 | "type": "zip",
1273 | "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
1274 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
1275 | "shasum": ""
1276 | },
1277 | "require": {
1278 | "php": ">=5.3.3"
1279 | },
1280 | "type": "library",
1281 | "autoload": {
1282 | "classmap": [
1283 | "src/"
1284 | ]
1285 | },
1286 | "notification-url": "https://packagist.org/downloads/",
1287 | "license": [
1288 | "BSD-3-Clause"
1289 | ],
1290 | "authors": [
1291 | {
1292 | "name": "Sebastian Bergmann",
1293 | "email": "sebastian@phpunit.de",
1294 | "role": "lead"
1295 | }
1296 | ],
1297 | "description": "Simple template engine.",
1298 | "homepage": "https://github.com/sebastianbergmann/php-text-template/",
1299 | "keywords": [
1300 | "template"
1301 | ],
1302 | "time": "2015-06-21 13:50:34"
1303 | },
1304 | {
1305 | "name": "phpunit/php-timer",
1306 | "version": "1.0.8",
1307 | "source": {
1308 | "type": "git",
1309 | "url": "https://github.com/sebastianbergmann/php-timer.git",
1310 | "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260"
1311 | },
1312 | "dist": {
1313 | "type": "zip",
1314 | "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260",
1315 | "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260",
1316 | "shasum": ""
1317 | },
1318 | "require": {
1319 | "php": ">=5.3.3"
1320 | },
1321 | "require-dev": {
1322 | "phpunit/phpunit": "~4|~5"
1323 | },
1324 | "type": "library",
1325 | "autoload": {
1326 | "classmap": [
1327 | "src/"
1328 | ]
1329 | },
1330 | "notification-url": "https://packagist.org/downloads/",
1331 | "license": [
1332 | "BSD-3-Clause"
1333 | ],
1334 | "authors": [
1335 | {
1336 | "name": "Sebastian Bergmann",
1337 | "email": "sb@sebastian-bergmann.de",
1338 | "role": "lead"
1339 | }
1340 | ],
1341 | "description": "Utility class for timing",
1342 | "homepage": "https://github.com/sebastianbergmann/php-timer/",
1343 | "keywords": [
1344 | "timer"
1345 | ],
1346 | "time": "2016-05-12 18:03:57"
1347 | },
1348 | {
1349 | "name": "phpunit/php-token-stream",
1350 | "version": "1.4.8",
1351 | "source": {
1352 | "type": "git",
1353 | "url": "https://github.com/sebastianbergmann/php-token-stream.git",
1354 | "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da"
1355 | },
1356 | "dist": {
1357 | "type": "zip",
1358 | "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
1359 | "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
1360 | "shasum": ""
1361 | },
1362 | "require": {
1363 | "ext-tokenizer": "*",
1364 | "php": ">=5.3.3"
1365 | },
1366 | "require-dev": {
1367 | "phpunit/phpunit": "~4.2"
1368 | },
1369 | "type": "library",
1370 | "extra": {
1371 | "branch-alias": {
1372 | "dev-master": "1.4-dev"
1373 | }
1374 | },
1375 | "autoload": {
1376 | "classmap": [
1377 | "src/"
1378 | ]
1379 | },
1380 | "notification-url": "https://packagist.org/downloads/",
1381 | "license": [
1382 | "BSD-3-Clause"
1383 | ],
1384 | "authors": [
1385 | {
1386 | "name": "Sebastian Bergmann",
1387 | "email": "sebastian@phpunit.de"
1388 | }
1389 | ],
1390 | "description": "Wrapper around PHP's tokenizer extension.",
1391 | "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
1392 | "keywords": [
1393 | "tokenizer"
1394 | ],
1395 | "time": "2015-09-15 10:49:45"
1396 | },
1397 | {
1398 | "name": "phpunit/phpunit",
1399 | "version": "5.4.0",
1400 | "source": {
1401 | "type": "git",
1402 | "url": "https://github.com/sebastianbergmann/phpunit.git",
1403 | "reference": "32428748cee28724d24e7d3b5fb3151170a1aed2"
1404 | },
1405 | "dist": {
1406 | "type": "zip",
1407 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/32428748cee28724d24e7d3b5fb3151170a1aed2",
1408 | "reference": "32428748cee28724d24e7d3b5fb3151170a1aed2",
1409 | "shasum": ""
1410 | },
1411 | "require": {
1412 | "ext-dom": "*",
1413 | "ext-json": "*",
1414 | "ext-pcre": "*",
1415 | "ext-reflection": "*",
1416 | "ext-spl": "*",
1417 | "myclabs/deep-copy": "~1.3",
1418 | "php": "^5.6 || ^7.0",
1419 | "phpspec/prophecy": "^1.3.1",
1420 | "phpunit/php-code-coverage": "^4.0",
1421 | "phpunit/php-file-iterator": "~1.4",
1422 | "phpunit/php-text-template": "~1.2",
1423 | "phpunit/php-timer": "^1.0.6",
1424 | "phpunit/phpunit-mock-objects": "^3.2",
1425 | "sebastian/comparator": "~1.1",
1426 | "sebastian/diff": "~1.2",
1427 | "sebastian/environment": "~1.3",
1428 | "sebastian/exporter": "~1.2",
1429 | "sebastian/global-state": "~1.0",
1430 | "sebastian/object-enumerator": "~1.0",
1431 | "sebastian/resource-operations": "~1.0",
1432 | "sebastian/version": "~1.0|~2.0",
1433 | "symfony/yaml": "~2.1|~3.0"
1434 | },
1435 | "suggest": {
1436 | "phpunit/php-invoker": "~1.1"
1437 | },
1438 | "bin": [
1439 | "phpunit"
1440 | ],
1441 | "type": "library",
1442 | "extra": {
1443 | "branch-alias": {
1444 | "dev-master": "5.4.x-dev"
1445 | }
1446 | },
1447 | "autoload": {
1448 | "classmap": [
1449 | "src/"
1450 | ]
1451 | },
1452 | "notification-url": "https://packagist.org/downloads/",
1453 | "license": [
1454 | "BSD-3-Clause"
1455 | ],
1456 | "authors": [
1457 | {
1458 | "name": "Sebastian Bergmann",
1459 | "email": "sebastian@phpunit.de",
1460 | "role": "lead"
1461 | }
1462 | ],
1463 | "description": "The PHP Unit Testing framework.",
1464 | "homepage": "https://phpunit.de/",
1465 | "keywords": [
1466 | "phpunit",
1467 | "testing",
1468 | "xunit"
1469 | ],
1470 | "time": "2016-06-03 05:05:35"
1471 | },
1472 | {
1473 | "name": "phpunit/phpunit-mock-objects",
1474 | "version": "3.2.0",
1475 | "source": {
1476 | "type": "git",
1477 | "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
1478 | "reference": "314f8c44019b4dfece2571b98938574e6342be59"
1479 | },
1480 | "dist": {
1481 | "type": "zip",
1482 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/314f8c44019b4dfece2571b98938574e6342be59",
1483 | "reference": "314f8c44019b4dfece2571b98938574e6342be59",
1484 | "shasum": ""
1485 | },
1486 | "require": {
1487 | "doctrine/instantiator": "^1.0.2",
1488 | "php": "^5.6 || ^7.0",
1489 | "phpunit/php-text-template": "^1.2",
1490 | "sebastian/exporter": "^1.2"
1491 | },
1492 | "require-dev": {
1493 | "phpunit/phpunit": "^5.4"
1494 | },
1495 | "suggest": {
1496 | "ext-soap": "*"
1497 | },
1498 | "type": "library",
1499 | "extra": {
1500 | "branch-alias": {
1501 | "dev-master": "3.2.x-dev"
1502 | }
1503 | },
1504 | "autoload": {
1505 | "classmap": [
1506 | "src/"
1507 | ]
1508 | },
1509 | "notification-url": "https://packagist.org/downloads/",
1510 | "license": [
1511 | "BSD-3-Clause"
1512 | ],
1513 | "authors": [
1514 | {
1515 | "name": "Sebastian Bergmann",
1516 | "email": "sb@sebastian-bergmann.de",
1517 | "role": "lead"
1518 | }
1519 | ],
1520 | "description": "Mock Object library for PHPUnit",
1521 | "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
1522 | "keywords": [
1523 | "mock",
1524 | "xunit"
1525 | ],
1526 | "time": "2016-06-03 05:01:30"
1527 | },
1528 | {
1529 | "name": "sebastian/code-unit-reverse-lookup",
1530 | "version": "1.0.0",
1531 | "source": {
1532 | "type": "git",
1533 | "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
1534 | "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe"
1535 | },
1536 | "dist": {
1537 | "type": "zip",
1538 | "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe",
1539 | "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe",
1540 | "shasum": ""
1541 | },
1542 | "require": {
1543 | "php": ">=5.6"
1544 | },
1545 | "require-dev": {
1546 | "phpunit/phpunit": "~5"
1547 | },
1548 | "type": "library",
1549 | "extra": {
1550 | "branch-alias": {
1551 | "dev-master": "1.0.x-dev"
1552 | }
1553 | },
1554 | "autoload": {
1555 | "classmap": [
1556 | "src/"
1557 | ]
1558 | },
1559 | "notification-url": "https://packagist.org/downloads/",
1560 | "license": [
1561 | "BSD-3-Clause"
1562 | ],
1563 | "authors": [
1564 | {
1565 | "name": "Sebastian Bergmann",
1566 | "email": "sebastian@phpunit.de"
1567 | }
1568 | ],
1569 | "description": "Looks up which function or method a line of code belongs to",
1570 | "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
1571 | "time": "2016-02-13 06:45:14"
1572 | },
1573 | {
1574 | "name": "sebastian/comparator",
1575 | "version": "1.2.0",
1576 | "source": {
1577 | "type": "git",
1578 | "url": "https://github.com/sebastianbergmann/comparator.git",
1579 | "reference": "937efb279bd37a375bcadf584dec0726f84dbf22"
1580 | },
1581 | "dist": {
1582 | "type": "zip",
1583 | "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22",
1584 | "reference": "937efb279bd37a375bcadf584dec0726f84dbf22",
1585 | "shasum": ""
1586 | },
1587 | "require": {
1588 | "php": ">=5.3.3",
1589 | "sebastian/diff": "~1.2",
1590 | "sebastian/exporter": "~1.2"
1591 | },
1592 | "require-dev": {
1593 | "phpunit/phpunit": "~4.4"
1594 | },
1595 | "type": "library",
1596 | "extra": {
1597 | "branch-alias": {
1598 | "dev-master": "1.2.x-dev"
1599 | }
1600 | },
1601 | "autoload": {
1602 | "classmap": [
1603 | "src/"
1604 | ]
1605 | },
1606 | "notification-url": "https://packagist.org/downloads/",
1607 | "license": [
1608 | "BSD-3-Clause"
1609 | ],
1610 | "authors": [
1611 | {
1612 | "name": "Jeff Welch",
1613 | "email": "whatthejeff@gmail.com"
1614 | },
1615 | {
1616 | "name": "Volker Dusch",
1617 | "email": "github@wallbash.com"
1618 | },
1619 | {
1620 | "name": "Bernhard Schussek",
1621 | "email": "bschussek@2bepublished.at"
1622 | },
1623 | {
1624 | "name": "Sebastian Bergmann",
1625 | "email": "sebastian@phpunit.de"
1626 | }
1627 | ],
1628 | "description": "Provides the functionality to compare PHP values for equality",
1629 | "homepage": "http://www.github.com/sebastianbergmann/comparator",
1630 | "keywords": [
1631 | "comparator",
1632 | "compare",
1633 | "equality"
1634 | ],
1635 | "time": "2015-07-26 15:48:44"
1636 | },
1637 | {
1638 | "name": "sebastian/diff",
1639 | "version": "1.4.1",
1640 | "source": {
1641 | "type": "git",
1642 | "url": "https://github.com/sebastianbergmann/diff.git",
1643 | "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e"
1644 | },
1645 | "dist": {
1646 | "type": "zip",
1647 | "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e",
1648 | "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e",
1649 | "shasum": ""
1650 | },
1651 | "require": {
1652 | "php": ">=5.3.3"
1653 | },
1654 | "require-dev": {
1655 | "phpunit/phpunit": "~4.8"
1656 | },
1657 | "type": "library",
1658 | "extra": {
1659 | "branch-alias": {
1660 | "dev-master": "1.4-dev"
1661 | }
1662 | },
1663 | "autoload": {
1664 | "classmap": [
1665 | "src/"
1666 | ]
1667 | },
1668 | "notification-url": "https://packagist.org/downloads/",
1669 | "license": [
1670 | "BSD-3-Clause"
1671 | ],
1672 | "authors": [
1673 | {
1674 | "name": "Kore Nordmann",
1675 | "email": "mail@kore-nordmann.de"
1676 | },
1677 | {
1678 | "name": "Sebastian Bergmann",
1679 | "email": "sebastian@phpunit.de"
1680 | }
1681 | ],
1682 | "description": "Diff implementation",
1683 | "homepage": "https://github.com/sebastianbergmann/diff",
1684 | "keywords": [
1685 | "diff"
1686 | ],
1687 | "time": "2015-12-08 07:14:41"
1688 | },
1689 | {
1690 | "name": "sebastian/environment",
1691 | "version": "1.3.7",
1692 | "source": {
1693 | "type": "git",
1694 | "url": "https://github.com/sebastianbergmann/environment.git",
1695 | "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716"
1696 | },
1697 | "dist": {
1698 | "type": "zip",
1699 | "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716",
1700 | "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716",
1701 | "shasum": ""
1702 | },
1703 | "require": {
1704 | "php": ">=5.3.3"
1705 | },
1706 | "require-dev": {
1707 | "phpunit/phpunit": "~4.4"
1708 | },
1709 | "type": "library",
1710 | "extra": {
1711 | "branch-alias": {
1712 | "dev-master": "1.3.x-dev"
1713 | }
1714 | },
1715 | "autoload": {
1716 | "classmap": [
1717 | "src/"
1718 | ]
1719 | },
1720 | "notification-url": "https://packagist.org/downloads/",
1721 | "license": [
1722 | "BSD-3-Clause"
1723 | ],
1724 | "authors": [
1725 | {
1726 | "name": "Sebastian Bergmann",
1727 | "email": "sebastian@phpunit.de"
1728 | }
1729 | ],
1730 | "description": "Provides functionality to handle HHVM/PHP environments",
1731 | "homepage": "http://www.github.com/sebastianbergmann/environment",
1732 | "keywords": [
1733 | "Xdebug",
1734 | "environment",
1735 | "hhvm"
1736 | ],
1737 | "time": "2016-05-17 03:18:57"
1738 | },
1739 | {
1740 | "name": "sebastian/exporter",
1741 | "version": "1.2.1",
1742 | "source": {
1743 | "type": "git",
1744 | "url": "https://github.com/sebastianbergmann/exporter.git",
1745 | "reference": "7ae5513327cb536431847bcc0c10edba2701064e"
1746 | },
1747 | "dist": {
1748 | "type": "zip",
1749 | "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e",
1750 | "reference": "7ae5513327cb536431847bcc0c10edba2701064e",
1751 | "shasum": ""
1752 | },
1753 | "require": {
1754 | "php": ">=5.3.3",
1755 | "sebastian/recursion-context": "~1.0"
1756 | },
1757 | "require-dev": {
1758 | "phpunit/phpunit": "~4.4"
1759 | },
1760 | "type": "library",
1761 | "extra": {
1762 | "branch-alias": {
1763 | "dev-master": "1.2.x-dev"
1764 | }
1765 | },
1766 | "autoload": {
1767 | "classmap": [
1768 | "src/"
1769 | ]
1770 | },
1771 | "notification-url": "https://packagist.org/downloads/",
1772 | "license": [
1773 | "BSD-3-Clause"
1774 | ],
1775 | "authors": [
1776 | {
1777 | "name": "Jeff Welch",
1778 | "email": "whatthejeff@gmail.com"
1779 | },
1780 | {
1781 | "name": "Volker Dusch",
1782 | "email": "github@wallbash.com"
1783 | },
1784 | {
1785 | "name": "Bernhard Schussek",
1786 | "email": "bschussek@2bepublished.at"
1787 | },
1788 | {
1789 | "name": "Sebastian Bergmann",
1790 | "email": "sebastian@phpunit.de"
1791 | },
1792 | {
1793 | "name": "Adam Harvey",
1794 | "email": "aharvey@php.net"
1795 | }
1796 | ],
1797 | "description": "Provides the functionality to export PHP variables for visualization",
1798 | "homepage": "http://www.github.com/sebastianbergmann/exporter",
1799 | "keywords": [
1800 | "export",
1801 | "exporter"
1802 | ],
1803 | "time": "2015-06-21 07:55:53"
1804 | },
1805 | {
1806 | "name": "sebastian/global-state",
1807 | "version": "1.1.1",
1808 | "source": {
1809 | "type": "git",
1810 | "url": "https://github.com/sebastianbergmann/global-state.git",
1811 | "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
1812 | },
1813 | "dist": {
1814 | "type": "zip",
1815 | "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
1816 | "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
1817 | "shasum": ""
1818 | },
1819 | "require": {
1820 | "php": ">=5.3.3"
1821 | },
1822 | "require-dev": {
1823 | "phpunit/phpunit": "~4.2"
1824 | },
1825 | "suggest": {
1826 | "ext-uopz": "*"
1827 | },
1828 | "type": "library",
1829 | "extra": {
1830 | "branch-alias": {
1831 | "dev-master": "1.0-dev"
1832 | }
1833 | },
1834 | "autoload": {
1835 | "classmap": [
1836 | "src/"
1837 | ]
1838 | },
1839 | "notification-url": "https://packagist.org/downloads/",
1840 | "license": [
1841 | "BSD-3-Clause"
1842 | ],
1843 | "authors": [
1844 | {
1845 | "name": "Sebastian Bergmann",
1846 | "email": "sebastian@phpunit.de"
1847 | }
1848 | ],
1849 | "description": "Snapshotting of global state",
1850 | "homepage": "http://www.github.com/sebastianbergmann/global-state",
1851 | "keywords": [
1852 | "global state"
1853 | ],
1854 | "time": "2015-10-12 03:26:01"
1855 | },
1856 | {
1857 | "name": "sebastian/object-enumerator",
1858 | "version": "1.0.0",
1859 | "source": {
1860 | "type": "git",
1861 | "url": "https://github.com/sebastianbergmann/object-enumerator.git",
1862 | "reference": "d4ca2fb70344987502567bc50081c03e6192fb26"
1863 | },
1864 | "dist": {
1865 | "type": "zip",
1866 | "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/d4ca2fb70344987502567bc50081c03e6192fb26",
1867 | "reference": "d4ca2fb70344987502567bc50081c03e6192fb26",
1868 | "shasum": ""
1869 | },
1870 | "require": {
1871 | "php": ">=5.6",
1872 | "sebastian/recursion-context": "~1.0"
1873 | },
1874 | "require-dev": {
1875 | "phpunit/phpunit": "~5"
1876 | },
1877 | "type": "library",
1878 | "extra": {
1879 | "branch-alias": {
1880 | "dev-master": "1.0.x-dev"
1881 | }
1882 | },
1883 | "autoload": {
1884 | "classmap": [
1885 | "src/"
1886 | ]
1887 | },
1888 | "notification-url": "https://packagist.org/downloads/",
1889 | "license": [
1890 | "BSD-3-Clause"
1891 | ],
1892 | "authors": [
1893 | {
1894 | "name": "Sebastian Bergmann",
1895 | "email": "sebastian@phpunit.de"
1896 | }
1897 | ],
1898 | "description": "Traverses array structures and object graphs to enumerate all referenced objects",
1899 | "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
1900 | "time": "2016-01-28 13:25:10"
1901 | },
1902 | {
1903 | "name": "sebastian/recursion-context",
1904 | "version": "1.0.2",
1905 | "source": {
1906 | "type": "git",
1907 | "url": "https://github.com/sebastianbergmann/recursion-context.git",
1908 | "reference": "913401df809e99e4f47b27cdd781f4a258d58791"
1909 | },
1910 | "dist": {
1911 | "type": "zip",
1912 | "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791",
1913 | "reference": "913401df809e99e4f47b27cdd781f4a258d58791",
1914 | "shasum": ""
1915 | },
1916 | "require": {
1917 | "php": ">=5.3.3"
1918 | },
1919 | "require-dev": {
1920 | "phpunit/phpunit": "~4.4"
1921 | },
1922 | "type": "library",
1923 | "extra": {
1924 | "branch-alias": {
1925 | "dev-master": "1.0.x-dev"
1926 | }
1927 | },
1928 | "autoload": {
1929 | "classmap": [
1930 | "src/"
1931 | ]
1932 | },
1933 | "notification-url": "https://packagist.org/downloads/",
1934 | "license": [
1935 | "BSD-3-Clause"
1936 | ],
1937 | "authors": [
1938 | {
1939 | "name": "Jeff Welch",
1940 | "email": "whatthejeff@gmail.com"
1941 | },
1942 | {
1943 | "name": "Sebastian Bergmann",
1944 | "email": "sebastian@phpunit.de"
1945 | },
1946 | {
1947 | "name": "Adam Harvey",
1948 | "email": "aharvey@php.net"
1949 | }
1950 | ],
1951 | "description": "Provides functionality to recursively process PHP variables",
1952 | "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
1953 | "time": "2015-11-11 19:50:13"
1954 | },
1955 | {
1956 | "name": "sebastian/resource-operations",
1957 | "version": "1.0.0",
1958 | "source": {
1959 | "type": "git",
1960 | "url": "https://github.com/sebastianbergmann/resource-operations.git",
1961 | "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52"
1962 | },
1963 | "dist": {
1964 | "type": "zip",
1965 | "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
1966 | "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
1967 | "shasum": ""
1968 | },
1969 | "require": {
1970 | "php": ">=5.6.0"
1971 | },
1972 | "type": "library",
1973 | "extra": {
1974 | "branch-alias": {
1975 | "dev-master": "1.0.x-dev"
1976 | }
1977 | },
1978 | "autoload": {
1979 | "classmap": [
1980 | "src/"
1981 | ]
1982 | },
1983 | "notification-url": "https://packagist.org/downloads/",
1984 | "license": [
1985 | "BSD-3-Clause"
1986 | ],
1987 | "authors": [
1988 | {
1989 | "name": "Sebastian Bergmann",
1990 | "email": "sebastian@phpunit.de"
1991 | }
1992 | ],
1993 | "description": "Provides a list of PHP built-in functions that operate on resources",
1994 | "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
1995 | "time": "2015-07-28 20:34:47"
1996 | },
1997 | {
1998 | "name": "sebastian/version",
1999 | "version": "2.0.0",
2000 | "source": {
2001 | "type": "git",
2002 | "url": "https://github.com/sebastianbergmann/version.git",
2003 | "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5"
2004 | },
2005 | "dist": {
2006 | "type": "zip",
2007 | "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5",
2008 | "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5",
2009 | "shasum": ""
2010 | },
2011 | "require": {
2012 | "php": ">=5.6"
2013 | },
2014 | "type": "library",
2015 | "extra": {
2016 | "branch-alias": {
2017 | "dev-master": "2.0.x-dev"
2018 | }
2019 | },
2020 | "autoload": {
2021 | "classmap": [
2022 | "src/"
2023 | ]
2024 | },
2025 | "notification-url": "https://packagist.org/downloads/",
2026 | "license": [
2027 | "BSD-3-Clause"
2028 | ],
2029 | "authors": [
2030 | {
2031 | "name": "Sebastian Bergmann",
2032 | "email": "sebastian@phpunit.de",
2033 | "role": "lead"
2034 | }
2035 | ],
2036 | "description": "Library that helps with managing the version number of Git-hosted PHP projects",
2037 | "homepage": "https://github.com/sebastianbergmann/version",
2038 | "time": "2016-02-04 12:56:52"
2039 | },
2040 | {
2041 | "name": "symfony/var-dumper",
2042 | "version": "v3.1.0",
2043 | "source": {
2044 | "type": "git",
2045 | "url": "https://github.com/symfony/var-dumper.git",
2046 | "reference": "436195b421e8c0493ca3e390c1fbecd8ee08c546"
2047 | },
2048 | "dist": {
2049 | "type": "zip",
2050 | "url": "https://api.github.com/repos/symfony/var-dumper/zipball/436195b421e8c0493ca3e390c1fbecd8ee08c546",
2051 | "reference": "436195b421e8c0493ca3e390c1fbecd8ee08c546",
2052 | "shasum": ""
2053 | },
2054 | "require": {
2055 | "php": ">=5.5.9",
2056 | "symfony/polyfill-mbstring": "~1.0"
2057 | },
2058 | "require-dev": {
2059 | "twig/twig": "~1.20|~2.0"
2060 | },
2061 | "suggest": {
2062 | "ext-symfony_debug": ""
2063 | },
2064 | "type": "library",
2065 | "extra": {
2066 | "branch-alias": {
2067 | "dev-master": "3.1-dev"
2068 | }
2069 | },
2070 | "autoload": {
2071 | "files": [
2072 | "Resources/functions/dump.php"
2073 | ],
2074 | "psr-4": {
2075 | "Symfony\\Component\\VarDumper\\": ""
2076 | },
2077 | "exclude-from-classmap": [
2078 | "/Tests/"
2079 | ]
2080 | },
2081 | "notification-url": "https://packagist.org/downloads/",
2082 | "license": [
2083 | "MIT"
2084 | ],
2085 | "authors": [
2086 | {
2087 | "name": "Nicolas Grekas",
2088 | "email": "p@tchwork.com"
2089 | },
2090 | {
2091 | "name": "Symfony Community",
2092 | "homepage": "https://symfony.com/contributors"
2093 | }
2094 | ],
2095 | "description": "Symfony mechanism for exploring and dumping PHP variables",
2096 | "homepage": "https://symfony.com",
2097 | "keywords": [
2098 | "debug",
2099 | "dump"
2100 | ],
2101 | "time": "2016-05-24 10:06:56"
2102 | },
2103 | {
2104 | "name": "symfony/yaml",
2105 | "version": "v3.1.0",
2106 | "source": {
2107 | "type": "git",
2108 | "url": "https://github.com/symfony/yaml.git",
2109 | "reference": "eca51b7b65eb9be6af88ad7cc91685f1556f5c9a"
2110 | },
2111 | "dist": {
2112 | "type": "zip",
2113 | "url": "https://api.github.com/repos/symfony/yaml/zipball/eca51b7b65eb9be6af88ad7cc91685f1556f5c9a",
2114 | "reference": "eca51b7b65eb9be6af88ad7cc91685f1556f5c9a",
2115 | "shasum": ""
2116 | },
2117 | "require": {
2118 | "php": ">=5.5.9"
2119 | },
2120 | "type": "library",
2121 | "extra": {
2122 | "branch-alias": {
2123 | "dev-master": "3.1-dev"
2124 | }
2125 | },
2126 | "autoload": {
2127 | "psr-4": {
2128 | "Symfony\\Component\\Yaml\\": ""
2129 | },
2130 | "exclude-from-classmap": [
2131 | "/Tests/"
2132 | ]
2133 | },
2134 | "notification-url": "https://packagist.org/downloads/",
2135 | "license": [
2136 | "MIT"
2137 | ],
2138 | "authors": [
2139 | {
2140 | "name": "Fabien Potencier",
2141 | "email": "fabien@symfony.com"
2142 | },
2143 | {
2144 | "name": "Symfony Community",
2145 | "homepage": "https://symfony.com/contributors"
2146 | }
2147 | ],
2148 | "description": "Symfony Yaml Component",
2149 | "homepage": "https://symfony.com",
2150 | "time": "2016-05-26 21:46:24"
2151 | }
2152 | ],
2153 | "aliases": [],
2154 | "minimum-stability": "stable",
2155 | "stability-flags": [],
2156 | "prefer-stable": false,
2157 | "prefer-lowest": false,
2158 | "platform": {
2159 | "php": ">=7.0"
2160 | },
2161 | "platform-dev": []
2162 | }
2163 |
--------------------------------------------------------------------------------