创建版本
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php namespace App\Illuminate\View\Compilers;
|
||||
|
||||
use Illuminate\View\Compilers\BladeCompiler as BaseBladeCompiler;
|
||||
|
||||
class BladeCompiler extends BaseBladeCompiler
|
||||
{
|
||||
/**
|
||||
* Array of opening and closing tags for raw echos.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $rawTags = ['{{', '}}'];
|
||||
|
||||
/**
|
||||
* Array of opening and closing tags for regular echos.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $contentTags = ['{{', '}}'];
|
||||
|
||||
/**
|
||||
* Array of opening and closing tags for escaped echos.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $escapedTags = ['{{', '}}'];
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php namespace App\Illuminate\View;
|
||||
|
||||
use Illuminate\View\Engines\CompilerEngine;
|
||||
use App\Illuminate\View\Compilers\BladeCompiler;
|
||||
|
||||
use Illuminate\View\ViewServiceProvider as BaseViewServiceProvider;
|
||||
|
||||
class ViewServiceProvider extends BaseViewServiceProvider
|
||||
{
|
||||
public function registerBladeCompiler()
|
||||
{
|
||||
$this->app->singleton('blade.compiler', function ($app) {
|
||||
return tap(new BladeCompiler($app['files'], $app['config']['view.compiled']), function ($blade) {
|
||||
$blade->component('dynamic-component', DynamicComponent::class);
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
$this->app->singleton('blade.compiler', function () {
|
||||
return new BladeCompiler(
|
||||
$this->app['files'],
|
||||
$this->app['config']['view.compiled']
|
||||
);
|
||||
});
|
||||
|
||||
$resolver->register('blade', function () {
|
||||
return new CompilerEngine($this->app['blade.compiler']);
|
||||
});
|
||||
*/
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user