Download the PHP package artoodetoo/dirk without Composer
On this page you can find all versions of the php package artoodetoo/dirk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download artoodetoo/dirk
More information about artoodetoo/dirk
Files in artoodetoo/dirk
Download artoodetoo/dirk
More information about artoodetoo/dirk
Files in artoodetoo/dirk
Please rate this library. Is it a good library?
Informations about the package dirk
Dirk PHP Templates
Tiny and powerfull template engine with syntax almost the same as in laravel/blade.
Installation
The package can be installed via Composer by requiring the "artoodetoo/dirk" package in your project's composer.json.
Usage
/views/hello.dirk.html
/views/layout/main.dirk.html
/web/index.php
Feature list
Echoes and comments
- {{ $var }} - Echo. NOTE: it's escaped by default, like in Laravel 5!
- {!! $var !!} - Raw echo without escaping
- {{ $var or 'default' }} - Echo content with a default value
- {{{ $var }}} - Echo escaped content
- {{-- Comment --}} - A comment (in code, not in output)
Conditionals
- @if(condition) - Starts an if block
- @else
- @elseif(condition)
- @endif
- @unless(condition) - Starts an unless block
- @endunless
Loops
- @foreach($list as $key => $val) - Starts a foreach block
- @endforeach
- @forelse($list as $key => $val) - Starts a foreach with empty block
- @empty
- @endforelse
- @for($i = 0; $i < 10; $i++) - Starts a for block
- @endfor
- @while(condition) - Starts a while block
- @endwhile
Inheritance and sections
- @include(file) - Includes another template
- @extends('layout') - Extends a template with a layout
- @section('name') - Starts a section
- @endsection - Ends section
- @yield('section') - Yields content of a section.
- @show - Ends section and yields its content
- @stop - Ends section
- @append - Ends section and appends it to existing of section of same name
- @overwrite - Ends section, overwriting previous section of same name
License
The Dirk is open-source software, licensed under the MIT license
All versions of dirk with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.4.0
The package artoodetoo/dirk contains the following files
Loading the files please wait ....