Blade
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
Daftarkan blade engine ke sistem.
Periksa apakah view sudah "kadaluwarsa" dan perlu dikompilasi ulang.
Kompilasi file blade ke bentuk ekspresi PHP yang valid.
Kompilasi sintaks @php dan @endphp.
Kompilasi sintaks "@layout" ke bentuk PHP.
Ubah comment blade ke bentuk PHP.
Ubah echo blade ke bentuk PHP.
Ubah sintaks @csrf ke bentuk form HTML.
Ubah sintaks @set() ke bentuk PHP.
Ubah sintaks @unset() ke bentuk PHP.
Ubah sintaks @forelse ke bentuk PHP.
Ubah sintaks @empty ke bentuk PHP.
Ubah sintaks @forelse ke bentuk PHP.
Ubah control-structure pembuka blade ke bentuk PHP.
Ubah control-structure penutup blade ke bentuk PHP.
Ubah sintaks @else ke bentuk PHP.
Ubah sintaks @unless ke bentuk PHP.
Ubah sintaks @endunless ke bentuk PHP.
Ubah sintaks @error ke bentuk PHP.
Ubah sintaks @enderror ke bentuk PHP.
Ubah sintaks @guest ke bentuk PHP.
Ubah sintaks @endguest ke bentuk PHP.
Ubah sintaks @auth ke bentuk PHP.
Ubah sintaks @endauth ke bentuk PHP.
Ubah sintaks @include ke bentuk PHP.
Ubah sintaks @render ke bentuk PHP.
Ubah sintaks @render_each ke bentuk PHP.
Ubah sintaks @yield ke bentuk PHP.
Ubah sintaks @show ke bentuk PHP.
Ubah sintaks @section ke bentuk PHP Sintaks ini merupakan shortcut dari method Section::start().
Ubah sintaks @endsection ke bentuk PHP.
Ubah sintaks @inject ke bentuk PHP.
Jalankan kustom compiler buatan user.
Ambil regex untuk sintaks-sintaks umum blade.
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);
});
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 protected string
compile_layout(string $value)
Kompilasi sintaks "@layout" ke bentuk PHP.
static protected string
compile_comment(string $value)
Ubah comment blade ke bentuk PHP.
static protected string
compile_echo(string $value)
Ubah echo blade ke bentuk PHP.
static protected string
compile_csrf(string $value)
Ubah sintaks @csrf ke bentuk form HTML.
static protected string
compile_set(string $value)
Ubah sintaks @set() ke bentuk PHP.
static protected string
compile_unset(string $value)
Ubah sintaks @unset() ke bentuk PHP.
static protected string
compile_forelse(string $value)
Ubah sintaks @forelse ke bentuk PHP.
static protected string
compile_empty(string $value)
Ubah sintaks @empty ke bentuk PHP.
static protected string
compile_endforelse(string $value)
Ubah sintaks @forelse ke bentuk PHP.
static protected string
compile_structure_start(string $value)
Ubah control-structure pembuka blade ke bentuk PHP.
static protected string
compile_structure_end(string $value)
Ubah control-structure penutup blade ke bentuk PHP.
static protected string
compile_else(string $value)
Ubah sintaks @else ke bentuk PHP.
static protected string
compile_unless(string $value)
Ubah sintaks @unless ke bentuk PHP.
static protected string
compile_endunless(string $value)
Ubah sintaks @endunless ke bentuk PHP.
static protected string
compile_error(string $value)
Ubah sintaks @error ke bentuk PHP.
static protected string
compile_enderror(string $value)
Ubah sintaks @enderror ke bentuk PHP.
static protected string
compile_guest(string $value)
Ubah sintaks @guest ke bentuk PHP.
static protected string
compile_endguest(string $value)
Ubah sintaks @endguest ke bentuk PHP.
static protected string
compile_auth(string $value)
Ubah sintaks @auth ke bentuk PHP.
static protected string
compile_endauth(string $value)
Ubah sintaks @endauth ke bentuk PHP.
static protected string
compile_include(string $value)
Ubah sintaks @include ke bentuk PHP.
static protected string
compile_render(string $value)
Ubah sintaks @render ke bentuk PHP.
static protected string
compile_render_each(string $value)
Ubah sintaks @render_each ke bentuk PHP.
static protected string
compile_yield(string $value)
Ubah sintaks @yield ke bentuk PHP.
Sintaks ini merupakan shortcut untuk method Section::yield_content().
static protected string
compile_show($value)
Ubah sintaks @show ke bentuk PHP.
static protected string
compile_section_start(string $value)
Ubah sintaks @section ke bentuk PHP Sintaks ini merupakan shortcut dari method Section::start().
static protected string
compile_section_end(string $value)
Ubah sintaks @endsection ke bentuk PHP.
Sintaks ini merupakan shortcut untuk method Section::stop().
static protected string
compile_inject(string $value)
Ubah sintaks @inject ke bentuk PHP.
Sintaks ini merupakan shortcut untuk method Section::inject().
static protected 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.