Download the PHP package zaitsev/mthamlphp without Composer

On this page you can find all versions of the php package zaitsev/mthamlphp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mthamlphp

Multi target HAML - IDE compiler (runtime reduced)

Build Status

MtHaml is a PHP implementation of the HAML language which can target multiple languages. This is fork based on MtHaml and MtHaml-more (both runtimes supported if needed) Main target of this fork - implement compiling haml files to php in IDE (to not use any runtime).

differences

This implementation based on and supports all features of MtHaml and adds many new own. But its focused mostly to compile haml files to plain PHP, not to be used as template engine.

You can use grunt task and IDEA plugin to compile haml to php when editing haml-file in IDE.

for basic usage read MtHaml and MtHaml-more documentation.

support IDE highlight

to allow IDE recognize php code in :php section you can use it as

simplified array definitions

`['c','d']` is equeal to `array('c','d')`

all statements are equial:

attributes mixing

rendered

id attributes with prefixes with '_'

rendered

advanced data attribute

rendered

runtime if statement

rendered

see 05_selected_attribute.test in test/fixtures/environment directory

allowed to mix classes

rendered

includes

You can include or require haml partials

this is same as

use @@inlude /path/file to inlude or @@require /path/file to require files. if file not found, require will throw error and stop processing, include will not.

new tag :haml

This section used to manage Run-time settings of compiler. You can change mostly any behavior or haml-parser and render options.

for :haml section YAML syntax used. Symfony YAML Component used to parse configs.

imports

You an use imports: directive to include config files;

file config-1.yaml :

file config-2.yaml:

for more info about shortcut: directive see below.

render

use includes_dir option to set relative path to include configs.

compiler settings

You can set or change MtHaml Environment options:

rendered

Shortcuts

this inspired by Slim Shortcuts

define shortcut to render tag with attribute:

rendered

You can use shortcuts to render attributes of any tags:

rednder

You can not use PHP code in shortcuts

Custom helper functions

you can use own functions to render attributes And yes, you can define them in :haml section

common syntax is

The order of lookup - tag.attribute, tag.*, *.attribute, *.*

custom helper (renderer) implemented similar to:

for example:

rendered to

and executed to

custom helpers used only for interpolated (parsed) attributes

%tag.a.b will not use helpers to render class attribute

%tag.a{:class=>[$c,$d]} will use custom helper

runtme engine selection

use_runtime - if true, compiler will use standart runtime

see MtHaml documentation for more info of runtime usage;

render

_see 06_Customhelper.test in test/fixtures/environment directory for more custom helpers examples

added input type

you can use any type as :type_value for type="type_value" after input tag:

rendered

no runtime for data attributes

see 06_Custom_helper.test in test/fixtures/environment directory

all credits to Arnaud Le Blanc and scil


All versions of mthamlphp with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
symfony/yaml Version ~2.6
mthaml/mthaml Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zaitsev/mthamlphp contains the following files

Loading the files please wait ....