2017 © Pedro Peláez
 

library util

Utility methods for Taco

image

tacowordpress/util

Utility methods for Taco

  • Wednesday, December 14, 2016
  • by jasandpereza
  • Repository
  • 6 Watchers
  • 0 Stars
  • 716 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 5 % Grown

The README.md

Taco Util

Utility methods for Tacos, (*1)

This is required when using Taco. Add it to composer.json:, (*2)

{
  "require": {
    "tacowordpress/tacowordpress": "dev-master",
    "tacowordpress/util": "dev-master"
  }
}

Usage of the View class

In config.php, specify any number of directories containing view files. You may have theme-specific views, as well as views included in the boilerplate for common elements. Specify the directories in the order in which they should be checked for view files., (*3)

\Taco\Util\View::setDirectories([
  __DIR__.'/../views/', // Theme-specific views directory
  __DIR__.'/views/',    // Fallback views directory
]);

To render the view, call the make() method, specifying the path to the view file, along with any required parameters., (*4)

echo \Taco\Util\View::make('article/article-list', [
  'articles' => Article::getRecent(),
  'header' => 'Recent articles',
]);

The View class will look in the directories you specified in config.php, starting with the first. If no view file is found, it will check the next one, and so on., (*5)

The Versions

14/12 2016

dev-master

9999999-dev

Utility methods for Taco

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

15/07 2016

0.1.1

0.1.1.0

Utility methods for Taco

  Sources   Download

MIT

The Requires

  • php >=5.3.0