<?php 
namespace Concrete\Core\Http;
use \Concrete\Core\Foundation\Service\Provider as ServiceProvider;

class HttpServiceProvider extends ServiceProvider {

	public function register() {
		$singletons = array(
			'helper/ajax' => '\Concrete\Core\Http\Service\Ajax',
			'helper/json' => '\Concrete\Core\Http\Service\Json'
		);

		foreach($singletons as $key => $value) {
			$this->app->singleton($key, $value);
		}

	}


}
<?php
namespace Concrete\Core\Http;
use \Concrete\Core\Foundation\Service\Provider as ServiceProvider;

class HttpServiceProvider extends ServiceProvider {

	public function register() {
		$singletons = array(
			'helper/ajax' => '\Concrete\Core\Http\Service\Ajax',
			'helper/json' => '\Concrete\Core\Http\Service\Json'
		);

		foreach($singletons as $key => $value) {
			$this->app->singleton($key, $value);
		}

		$this->app->bind('Concrete\Core\Http\Request', function($app) {
			return Request::getInstance();
		});
	}


}

Add default request instance to IoC/DI container
Add default request instance to IoC/DI container


Former-commit-id: 024c89811dbe07f39944e667d24ec09a9a4d2673
Former-commit-id: 934a70c6061598ca47f4d3fb638121e943b7b793