Skip to content

Commit

Permalink
reconfigured structure to match theme
Browse files Browse the repository at this point in the history
  • Loading branch information
BenRutlandWeb committed Feb 14, 2021
1 parent 439b45a commit 7e07119
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 96 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"Plugin\\": "app/"
},
"files": [
"functions.php"
"helpers.php"
]
},
"require": {
Expand Down
99 changes: 99 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
@@ -1 +1,100 @@
<?php

/**
* Plugin name: Radiate Plugin
* Plugin URI: https://benrutlandweb.co.uk
* Description: A WordPress plugin boilerplate
* Version: 1.0.0
* Author: Ben Rutland
* Author URI: https://benrutlandweb.co.uk
* Text Domain: radiate
*/

/**
* -----------------------------------------------------------------------------
* 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 great to relax.
*
*/

require __DIR__ . '/vendor/autoload.php';


/**
* -----------------------------------------------------------------------------
* Create The Application
* -----------------------------------------------------------------------------
*
* The first thing we will do is create a new Radiate application instance
* which serves as the "glue" for all the components, and is the IoC container
* for the system binding all of the various parts.
*
*/

$app = new Radiate\Foundation\Application(__DIR__);


/**
* -----------------------------------------------------------------------------
* Register the middleware
* -----------------------------------------------------------------------------
*
* The global and route middleware can be assigned here. The request is run
* through the global middleware on every request whilst the route
* middleware may be assigned to individual routes or groups of routes.
*
*/

$app->middleware([
Radiate\Foundation\Http\Middleware\TrimStrings::class,
Radiate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
]);

$app->routeMiddleware([
'auth' => Radiate\Auth\Middleware\Authenticate::class,
'ajax' => [
//
],
'api' => [
//
],
]);


/**
* -----------------------------------------------------------------------------
* Autoloaded Service Providers
* -----------------------------------------------------------------------------
*
* The service providers listed here will be loaded on the request
* to your application. Feel free to add your own services to
* grant expanded functionality to your applications.
*
*/

$app->register(Radiate\Auth\AuthServiceProvider::class);
$app->register(Radiate\Mail\MailServiceProvider::class);
$app->register(Radiate\Routing\RoutingServiceProvider::class);
$app->register(Radiate\View\ViewServiceProvider::class);

$app->register(Theme\Providers\EventServiceProvider::class);
$app->register(Theme\Providers\RouteServiceProvider::class);


/**
* -----------------------------------------------------------------------------
* Run The Application
* -----------------------------------------------------------------------------
*
* Once we have the application, we can handle the incoming request and
* allow the client to enjoy the creative and wonderful
* application we have prepared for them.
*
*/

$app->boot();
96 changes: 1 addition & 95 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,96 +1,2 @@
<?php

/**
* Plugin name: Radiate Plugin
* Plugin URI: https://benrutlandweb.co.uk
* Description: A WordPress plugin boilerplate
* Version: 1.0.0
* Author: Ben Rutland
* Author URI: https://benrutlandweb.co.uk
* Text Domain: radiate
*/

/**
* -----------------------------------------------------------------------------
* 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 great to relax.
*
*/

require __DIR__ . '/vendor/autoload.php';


/**
* -----------------------------------------------------------------------------
* Create The Application
* -----------------------------------------------------------------------------
*
* The first thing we will do is create a new Radiate application instance
* which serves as the "glue" for all the components, and is the IoC container
* for the system binding all of the various parts.
*
*/

$app = new Radiate\Foundation\Application(__DIR__);


/**
* -----------------------------------------------------------------------------
* Register the middleware
* -----------------------------------------------------------------------------
*
* The global and route middleware can be assigned here. The request is run
* through the global middleware on every request whilst the route
* middleware may be assigned to individual routes or groups of routes.
*
*/

$app->middleware([
Radiate\Foundation\Http\Middleware\TrimStrings::class,
Radiate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
]);

$app->routeMiddleware([
'auth' => Radiate\Auth\Middleware\Authenticate::class,
'ajax' => [
//
],
'api' => [
//
],
]);


/**
* -----------------------------------------------------------------------------
* Autoloaded Service Providers
* -----------------------------------------------------------------------------
*
* The service providers listed here will be loaded on the request
* to your application. Feel free to add your own services to
* grant expanded functionality to your applications.
*
*/

$app->register(Plugin\Providers\EventServiceProvider::class);
$app->register(Plugin\Providers\RouteServiceProvider::class);
$app->register(Radiate\Mail\MailServiceProvider::class);


/**
* -----------------------------------------------------------------------------
* Run The Application
* -----------------------------------------------------------------------------
*
* Once we have the application, we can handle the incoming request and
* allow the client to enjoy the creative and wonderful
* application we have prepared for them.
*
*/

$app->boot();
// silence is golden.

0 comments on commit 7e07119

Please sign in to comment.