1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-08 14:16:46 +02:00

Code cleanup and refactoring #5

This commit is contained in:
Awilum
2018-03-14 19:57:53 +03:00
parent 29cd5e03c5
commit 3ef859856c
15 changed files with 77 additions and 55 deletions

View File

@@ -1,7 +1,8 @@
##
# This file is part of the Rawilum.
# @package Rawilum
#
# (c) Romanenko Sergey / Awilum <awilum@yandex.ru>
# @author Sergey Romanenko <awilum@yandex.ru>
# @link http://rawilum.org
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.

View File

@@ -1,2 +1,2 @@
# Rawilum 1.0.0, 2018-XX-XX
# Rawilum 0.1.0, 2018-XX-XX
* Initial Release

View File

@@ -1,15 +1,15 @@
<?php
<?php namespace Rawilum;
/**
* This file is part of the Rawilum.
* @package Rawilum
*
* (c) Romanenko Sergey / Awilum <awilum@yandex.ru>
* @author Sergey Romanenko <awilum@yandex.ru>
* @link http://rawilum.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Rawilum;
// Define the application minimum supported PHP version.
define('RAWILUM_MINIMUM_PHP', '7.1.3');

View File

@@ -1,10 +1,10 @@
<?php
namespace Rawilum;
<?php namespace Rawilum;
/**
* This file is part of the Rawilum.
* @package Rawilum
*
* (c) Romanenko Sergey / Awilum <awilum@yandex.ru>
* @author Sergey Romanenko <awilum@yandex.ru>
* @link http://rawilum.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.

View File

@@ -1,13 +1,13 @@
<?php
namespace Rawilum;
<?php namespace Rawilum;
use Arr;
use Symfony\Component\Yaml\Yaml;
/**
* This file is part of the Rawilum.
* @package Rawilum
*
* (c) Romanenko Sergey / Awilum <awilum@yandex.ru>
* @author Sergey Romanenko <awilum@yandex.ru>
* @link http://rawilum.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.

View File

@@ -1,16 +1,17 @@
<?php
namespace Rawilum;
<?php namespace Rawilum;
use Arr;
/**
* This file is part of the Rawilum.
* @package Rawilum
*
* (c) Romanenko Sergey / Awilum <awilum@yandex.ru>
* @author Sergey Romanenko <awilum@yandex.ru>
* @link http://rawilum.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Events
{
/**

View File

@@ -1,16 +1,15 @@
<?php
namespace Rawilum;
<?php namespace Rawilum;
/**
* This file is part of the Rawilum.
* @package Rawilum
*
* (c) Romanenko Sergey / Awilum <awilum@yandex.ru>
* @author Sergey Romanenko <awilum@yandex.ru>
* @link http://rawilum.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Filters
{

View File

@@ -1,12 +1,12 @@
<?php
namespace Rawilum;
<?php namespace Rawilum;
use Symfony\Component\Yaml\Yaml;
/**
* This file is part of the Rawilum.
* @package Rawilum
*
* (c) Romanenko Sergey / Awilum <awilum@yandex.ru>
* @author Sergey Romanenko <awilum@yandex.ru>
* @link http://rawilum.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.

View File

@@ -1,5 +1,4 @@
<?php
namespace Rawilum;
<?php namespace Rawilum;
use Arr;
use Url;
@@ -8,9 +7,10 @@ use Shortcode;
use Symfony\Component\Yaml\Yaml;
/**
* This file is part of the Rawilum.
* @package Rawilum
*
* (c) Romanenko Sergey / Awilum <awilum@yandex.ru>
* @author Sergey Romanenko <awilum@yandex.ru>
* @link http://rawilum.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.

View File

@@ -1,16 +1,17 @@
<?php
namespace Rawilum;
<?php namespace Rawilum;
use Symfony\Component\Yaml\Yaml;
/**
* This file is part of the Rawilum.
* @package Rawilum
*
* (c) Romanenko Sergey / Awilum <awilum@yandex.ru>
* @author Sergey Romanenko <awilum@yandex.ru>
* @link http://rawilum.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Plugins
{
/**

View File

@@ -1,5 +1,4 @@
<?php
namespace Rawilum;
<?php namespace Rawilum;
use Pimple\Container as Container;
use Symfony\Component\Filesystem\Filesystem;
@@ -7,10 +6,9 @@ use Symfony\Component\Finder\Finder;
use ParsedownExtra;
use Url;
/**
* Rawilum
*
/**
* @package Rawilum
*
* @author Romanenko Sergey / Awilum <awilum@yandex.ru>
* @link http://rawilum.org
*
@@ -33,7 +31,7 @@ class Rawilum extends Container
*
* @var string
*/
const VERSION = 'X.X.X';
const VERSION = '0.0.0';
/**
* Init Rawilum Application
@@ -45,50 +43,62 @@ class Rawilum extends Container
// Create container
$container = new static();
// Define markdown service
$container['markdown'] = function ($c) {
return new ParsedownExtra();
};
// Define filesystem service
$container['filesystem'] = function ($c) {
return new Filesystem();
};
// Define finder service
$container['finder'] = function ($c) {
return new Finder();
};
// Define cache service
$container['cache'] = function ($c) {
return new Cache($c);
};
// Define config service
$container['config'] = function ($c) {
return new Config($c);
};
// Define shortcodes service
$container['shortcodes'] = function ($c) {
return new Shortcodes($c);
};
// Define events service
$container['events'] = function ($c) {
return new Events($c);
};
// Define filters service
$container['filters'] = function ($c) {
return new Filters($c);
};
// Define i18n service
$container['i18n'] = function ($c) {
return new I18n($c);
};
// Define plugins service
$container['plugins'] = function ($c) {
return new Plugins($c);
};
// Define pages service
$container['pages'] = function ($c) {
return new Pages($c);
};
// Define themes service
$container['themes'] = function ($c) {
return new Themes($c);
};

View File

@@ -1,5 +1,14 @@
<?php
namespace Rawilum;
<?php namespace Rawilum;
/**
* @package Rawilum
*
* @author Sergey Romanenko <awilum@yandex.ru>
* @link http://rawilum.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
trait RawilumTrait
{

View File

@@ -1,10 +1,10 @@
<?php
namespace Rawilum;
<?php namespace Rawilum;
/**
* This file is part of the Rawilum.
* @package Rawilum
*
* (c) Romanenko Sergey / Awilum <awilum@yandex.ru>
* @author Sergey Romanenko <awilum@yandex.ru>
* @link http://rawilum.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.

View File

@@ -1,10 +1,10 @@
<?php
namespace Rawilum;
<?php namespace Rawilum;
/**
* This file is part of the Rawilum.
* @package Rawilum
*
* (c) Romanenko Sergey / Awilum <awilum@yandex.ru>
* @author Sergey Romanenko <awilum@yandex.ru>
* @link http://rawilum.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.

View File

@@ -1,9 +1,10 @@
<?php
/**
* This file is part of the Rawilum.
* @package Rawilum
*
* (c) Romanenko Sergey / Awilum <awilum@yandex.ru>
* @author Sergey Romanenko <awilum@yandex.ru>
* @link http://rawilum.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.