<?php namespace Orchestra\Memory;

use Illuminate\Support\ServiceProvider;

class MemoryServiceProvider extends ServiceProvider {

	/**
	 * Register the service provider.
	 *
	 * @return void
	 */
	public function register()
	{
		$this->app['orchestra.memory'] = $this->app->share(function($app)
		{
			return new MemoryManager($app);
		});
	}

	/**
	 * Bootstrap the application events.
	 *
	 * @return void
	 */
	public function boot()
	{
		$this->package('orchestra/memory', 'orchestra/memory');

		$this->registerMemoryEvents();
	}

	/**
	 * Register the events needed for memory.
	 *
	 * @return void
	 */
	protected function registerMemoryEvents()
	{
		$app = $this->app;

		$app->after(function($request, $response) use ($app)
		{
			$app->make('orchestra.memory')->shutdown();
		});
	}
}
<?php namespace Orchestra\Memory;

use Illuminate\Support\ServiceProvider;

class MemoryServiceProvider extends ServiceProvider {

	/**
	 * Register the service provider.
	 *
	 * @return void
	 */
	public function register()
	{
		$this->app['orchestra.memory'] = $this->app->share(function($app)
		{
			return new MemoryManager($app);
		});
	}

	/**
	 * Bootstrap the application events.
	 *
	 * @return void
	 */
	public function boot()
	{
		$this->package('orchestra/memory', 'orchestra/memory');

		$this->registerMemoryEvents();
	}

	/**
	 * Register the events needed for memory.
	 *
	 * @return void
	 */
	protected function registerMemoryEvents()
	{
		$app = $this->app;

		$app->after(function($request, $response) use ($app)
		{
			$app->make('orchestra.memory')->shutdown();
		});
	}

	/**
	 * Get the services provided by the provider.
	 *
	 * @return array
	 */
	public function provides()
	{
		return array('orchestra.memory');
	}
}
Include provides even if it not deferred.
Include provides even if it not deferred.

Signed-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>
