class Blade (View source)

Properties

static string $directory

Direktori cache view.

static protected array $compilers

List nama-nama compiler milik blade.

static protected array $extensions

Berisi nama-nama compiler kustom yang dibuat user.

Methods

static 
sharpen()

Daftarkan blade engine ke sistem.

static 
extend(Closure $compiler)

Daftarkan compiler kustom baru.

static bool
expired(string $path)

Periksa apakah view sudah "kadaluwarsa" dan perlu dikompilasi ulang.

static string
compile($view)

Kompilasi file blade ke bentuk ekspresi PHP yang valid.

static string
translate(string $value, View $view = null)

Terjemahkan sintaks blade ke sintaks PHP yang valid.

static string
compile_php_block(string $value)

Kompilasi sintaks @php dan @endphp.

static string
compile_layout(string $value)

Kompilasi sintaks "@layout" ke bentuk PHP.

static string
compile_comment(string $value)

Ubah comment blade ke bentuk PHP.

static string
compile_echo(string $value)

Ubah echo blade ke bentuk PHP.

static string
compile_csrf(string $value)

Ubah sintaks @csrf ke bentuk form HTML.

static string
compile_set(string $value)

Ubah sintaks @set() ke bentuk PHP.

static string
compile_unset(string $value)

Ubah sintaks @unset() ke bentuk PHP.

static string
compile_forelse(string $value)

Ubah sintaks @forelse ke bentuk PHP.

static string
compile_empty(string $value)

Ubah sintaks @empty ke bentuk PHP.

static string
compile_endforelse(string $value)

Ubah sintaks @forelse ke bentuk PHP.

static string
compile_structure_start(string $value)

Ubah control-structure pembuka blade ke bentuk PHP.

static string
compile_structure_end(string $value)

Ubah control-structure penutup blade ke bentuk PHP.

static string
compile_else(string $value)

Ubah sintaks @else ke bentuk PHP.

static string
compile_unless(string $value)

Ubah sintaks @unless ke bentuk PHP.

static string
compile_endunless(string $value)

Ubah sintaks @endunless ke bentuk PHP.

static string
compile_error(string $value)

Ubah sintaks @error ke bentuk PHP.

static string
compile_enderror(string $value)

Ubah sintaks @enderror ke bentuk PHP.

static string
compile_guest(string $value)

Ubah sintaks @guest ke bentuk PHP.

static string
compile_endguest(string $value)

Ubah sintaks @endguest ke bentuk PHP.

static string
compile_auth(string $value)

Ubah sintaks @auth ke bentuk PHP.

static string
compile_endauth(string $value)

Ubah sintaks @endauth ke bentuk PHP.

static string
compile_include(string $value)

Ubah sintaks @include ke bentuk PHP.

static string
compile_render(string $value)

Ubah sintaks @render ke bentuk PHP.

static string
compile_render_each(string $value)

Ubah sintaks @render_each ke bentuk PHP.

static string
compile_yield(string $value)

Ubah sintaks @yield ke bentuk PHP.

static string
compile_show($value)

Ubah sintaks @show ke bentuk PHP.

static string
compile_section_start(string $value)

Ubah sintaks @section ke bentuk PHP Sintaks ini merupakan shortcut dari method Section::start().

static string
compile_section_end(string $value)

Ubah sintaks @endsection ke bentuk PHP.

static string
compile_inject(string $value)

Ubah sintaks @inject ke bentuk PHP.

static string
compile_extensions(string $value)

Jalankan kustom compiler buatan user.

static string
matcher(string $function)

Ambil regex untuk sintaks-sintaks umum blade.

static string
compiled($path)

Ambil full path ke file hasil kompilasi.

Details

static sharpen()

Daftarkan blade engine ke sistem.

static extend(Closure $compiler)

Daftarkan compiler kustom baru.


     Blade::extend(function ($view) {
         return str_replace('foo', 'bar', $view);
     });

Parameters

Closure $compiler

static bool expired(string $path)

Periksa apakah view sudah "kadaluwarsa" dan perlu dikompilasi ulang.

Parameters

string $path

Return Value

bool

static string compile($view)

Kompilasi file blade ke bentuk ekspresi PHP yang valid.

Parameters

$view

Return Value

string

static string translate(string $value, View $view = null)

Terjemahkan sintaks blade ke sintaks PHP yang valid.

Parameters

string $value
View $view

Return Value

string

static string compile_php_block(string $value)

Kompilasi sintaks @php dan @endphp.

Parameters

string $value

Return Value

string

static protected string compile_layout(string $value)

Kompilasi sintaks "@layout" ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_comment(string $value)

Ubah comment blade ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_echo(string $value)

Ubah echo blade ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_csrf(string $value)

Ubah sintaks @csrf ke bentuk form HTML.

Parameters

string $value

Return Value

string

static protected string compile_set(string $value)

Ubah sintaks @set() ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_unset(string $value)

Ubah sintaks @unset() ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_forelse(string $value)

Ubah sintaks @forelse ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_empty(string $value)

Ubah sintaks @empty ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_endforelse(string $value)

Ubah sintaks @forelse ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_structure_start(string $value)

Ubah control-structure pembuka blade ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_structure_end(string $value)

Ubah control-structure penutup blade ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_else(string $value)

Ubah sintaks @else ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_unless(string $value)

Ubah sintaks @unless ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_endunless(string $value)

Ubah sintaks @endunless ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_error(string $value)

Ubah sintaks @error ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_enderror(string $value)

Ubah sintaks @enderror ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_guest(string $value)

Ubah sintaks @guest ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_endguest(string $value)

Ubah sintaks @endguest ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_auth(string $value)

Ubah sintaks @auth ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_endauth(string $value)

Ubah sintaks @endauth ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_include(string $value)

Ubah sintaks @include ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_render(string $value)

Ubah sintaks @render ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_render_each(string $value)

Ubah sintaks @render_each ke bentuk PHP.

Parameters

string $value

Return Value

string

static protected string compile_yield(string $value)

Ubah sintaks @yield ke bentuk PHP.

Sintaks ini merupakan shortcut untuk method Section::yield_content().

Parameters

string $value

Return Value

string

static protected string compile_show($value)

Ubah sintaks @show ke bentuk PHP.

Parameters

$value

Return Value

string

static protected string compile_section_start(string $value)

Ubah sintaks @section ke bentuk PHP Sintaks ini merupakan shortcut dari method Section::start().

Parameters

string $value

Return Value

string

static protected string compile_section_end(string $value)

Ubah sintaks @endsection ke bentuk PHP.

Sintaks ini merupakan shortcut untuk method Section::stop().

Parameters

string $value

Return Value

string

static protected string compile_inject(string $value)

Ubah sintaks @inject ke bentuk PHP.

Sintaks ini merupakan shortcut untuk method Section::inject().

Parameters

string $value

Return Value

string

static protected string compile_extensions(string $value)

Jalankan kustom compiler buatan user.

Parameters

string $value

Return Value

string

static string matcher(string $function)

Ambil regex untuk sintaks-sintaks umum blade.

Parameters

string $function

Return Value

string

static string compiled($path)

Ambil full path ke file hasil kompilasi.

Parameters

$path

Return Value

string