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:
@@ -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;
|
||||
|
@@ -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';
|
||||
|
@@ -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;
|
||||
|
||||
/**
|
||||
|
@@ -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');
|
||||
|
Reference in New Issue
Block a user