Refactoring names
This commit is contained in:
@ -36,11 +36,11 @@ class Plugin extends PluginBase
|
||||
public function boot()
|
||||
{
|
||||
// Service provider
|
||||
App::register('\Sensory5\Shortcode\Classes\ShortcodeServiceProvider');
|
||||
App::register('\Sensory5\Shortcode\Classes\ServiceProvider');
|
||||
|
||||
// Register alias
|
||||
$alias = AliasLoader::getInstance();
|
||||
$alias->alias('Shortcode', '\Sensory5\Shortcode\Classes\ShortcodeFacade');
|
||||
$alias->alias('Shortcode', '\Sensory5\Shortcode\Classes\Facade');
|
||||
|
||||
// Enable shortcodes on all pages if requested
|
||||
if (Settings::get('enable_on_render', false))
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php namespace Sensory5\Shortcode\Classes;
|
||||
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
use October\Rain\Support\Facade as FacadeParent;
|
||||
|
||||
class ShortcodeFacade extends Facade
|
||||
class Facade extends FacadeParent
|
||||
{
|
||||
/**
|
||||
* Get the registered name of the component.
|
19
classes/ServiceProvider.php
Normal file
19
classes/ServiceProvider.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php namespace Sensory5\Shortcode\Classes;
|
||||
|
||||
use October\Rain\Support\ServiceProvider as ServiceProviderParent;
|
||||
|
||||
class ServiceProvider extends ServiceProviderParent
|
||||
{
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->app->bind('shortcode', function() {
|
||||
return new Shortcode();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,35 +0,0 @@
|
||||
<?php namespace Sensory5\Shortcode\Classes;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class ShortcodeServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Indicates if loading of the provider is deferred.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $defer = false;
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->app['shortcode'] = $this->app->share(function ($app) {
|
||||
return new Shortcode();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the services provided by the provider.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provides()
|
||||
{
|
||||
return array('shortcode');
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user