Browse Source

Refactoring names

master
Patrick Ward 9 years ago
parent
commit
61620bdcf1
  1. 4
      Plugin.php
  2. 4
      classes/Facade.php
  3. 19
      classes/ServiceProvider.php
  4. 35
      classes/ShortcodeServiceProvider.php

4
Plugin.php

@ -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))

4
classes/ShortcodeFacade.php → classes/Facade.php

@ -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

@ -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();
});
}
}

35
classes/ShortcodeServiceProvider.php

@ -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');
}
}
Loading…
Cancel
Save