requtize/atline

This package is abandoned and no longer maintained. No replacement package was suggested.

Templating System for PHP

1.0.3 2017-04-19 17:34 UTC

This package is auto-updated.

Last update: 2024-02-18 06:22:19 UTC


README

Atline - PHP Template System. Created for using Templating syntax for (writing) speed, and PHP syntax for facilities.

Installation via composer.json

"requtize/atline": "^1.0.0"

Advantages

  • Usage PHP code
  • Multidimentional Views extending
  • Autoescape echoed data
  • Filters
  • Easy to implement

Examples

Echo with Auto-escape

{{ $var }}

Conditions

@if $arg == 1
    ...
@elseif $arg == 2
    ...
@else
    ...
@endif

Filters

{{ $var | upper }}

Loops

@loop $array
    {{ $key }} => {{ $item }}
@endloop

// Or

@foreach $array
    {{ $key }} => {{ $item }}
@endforeach

PHP internal function call

{{ number_format($invoice->getCost(), 2) }}

External method call (Environment extended class method)

{{ t('translateIndex') }}

License

This code is licensed under MIT License.