Download the PHP package habanero/tailor without Composer

On this page you can find all versions of the php package habanero/tailor. 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 tailor

What's Tailor?

Provides a common templating interface for partial rendering.

It comes with support for Twig, CoffeeScript, Jade, HAML, SCSS, LESS and Markdown out of the box. Written using Composer standards, PSR-friendly.

Using the composer

Just declare it on your composer.json file.

{
  "require": {
    "habanero/tailor": "dev-master"
  }
}

Then execute the composer to download and setup the latest version.

$ php composer.phar install

You can use Tailor along with your other composer scripts.

<?php

require 'vendor/autoload.php';

# configure before
\Tailor\Config::set('cache_dir', '/tmp');
\Tailor\Config::set('views_dir', __DIR__);

# go ahead!
\Tailor\Base::initialize();

# raw rendering
$tpl = '%a{ :href => "#" } Link';
$out = \Tailor\Base::parse('haml', $tpl);

echo $out; // <a href="#">Link</a>

# using as helper
function partial($path, array $vars = array()) {
  $tpl = \Tailor\Base::partial($path);
  $out = \Tailor\Base::render($tpl, $vars);

  return $out;
}

# full-view rendering
$out = partial('index.php', array('name' => 'Joe'));

echo $out; // Hello Joe!

If you want to use HAML with the code above you must have a file named index.php.haml on your specified ./views directory.

= "Hello $name!"

The template evaluation order its from right to left, it will stop if the filename contains one extension or the extension is not within any registered engine.

index.php.haml => haml-engine … continue
index.php => php-engine … stop!

Tailor's partial() method will only compile in order to preserve the original nature from its first extension, this is the main reason for using the render() method to finally get rendered our template.

Just fork-me!

Of course you're welcome to fork and send pull-request to add more engines, fixes or enhancement features. ;-)


All versions of tailor with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3
coffeescript/coffeescript Version v1.3.1
leafo/lessphp Version v0.3.9
leafo/scssphp Version v0.0.5
twig/twig Version v1.12.3
mthaml/mthaml Version v1.2.2
michelf/php-markdown Version ^1.5
kylekatarnls/jade-php Version ^1.3
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 habanero/tailor contains the following files

Loading the files please wait ....