1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-18 02:41:27 +02:00

Flextype Site Plugin: fixes and refactoring #154

This commit is contained in:
Awilum
2019-06-16 22:58:55 +03:00
parent 0009e1d474
commit e3c3f2b9cf
4 changed files with 60 additions and 6 deletions

View File

@@ -1,5 +1,15 @@
<?php
/**
* @package Flextype
*
* @author Romanenko Sergey <hello@romanenko.digital>
* @link http://romanenko.digital
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Flextype;
use Flextype\Component\Arr\Arr;

View File

@@ -1,15 +1,39 @@
<?php
/**
* @package Flextype
*
* @author Romanenko Sergey <hello@romanenko.digital>
* @link http://romanenko.digital
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Flextype;
// Ensure vendor libraries exist
!is_file($autoload = __DIR__ . '/vendor/autoload.php') and exit("Please run: <i>composer install</i>");
/**
* Ensure vendor libraries exist
*/
!is_file($site_autoload = __DIR__ . '/vendor/autoload.php') and exit("Please run: <i>composer install</i>");
// Register The Auto Loader
$loader = require_once $autoload;
/**
* Register The Auto Loader
*
* Composer provides a convenient, automatically generated class loader for
* our application. We just need to utilize it! We'll simply require it
* into the script here so that we don't have to worry about manual
* loading any of our classes later on. It feels nice to relax.
* Register The Auto Loader
*/
$site_loader = require_once $site_autoload;
// Include routes
/**
* Include web routes
*/
include_once 'routes/web.php';
// Include dependencies
/**
* Include dependencies
*/
include_once 'dependencies.php';

View File

@@ -1,5 +1,15 @@
<?php
/**
* @package Flextype
*
* @author Romanenko Sergey <hello@romanenko.digital>
* @link http://romanenko.digital
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Flextype;
/**

View File

@@ -1,5 +1,15 @@
<?php
/**
* @package Flextype
*
* @author Romanenko Sergey <hello@romanenko.digital>
* @link http://romanenko.digital
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Flextype;
$app->get('{uri:.+}', 'SiteController:index')->setName('site.index');