Storages
Storages are specialized Tools. They retrievent and build object instances from files of the kit.
Just as standard Tools, you get them as members of their parent kit. As an example, let's get a template object from the templates storage of a kit :
// defining search criteria
$criteria=array('id'=>'help','lang'=>'fr');
// gettign templates instance
$tpl=$kit->templates->getItem($criteria);
// using template
echo $tpl->render($data);
How it works
A search pattern is defined in the tool's configuration file. It's a relative path (from the kit's root) which elements between double accolads will be içnterpreted as variables. A an exemple :
[storage]
search = "templates/{{lang}}/{{id}}.html"
Here if lang="en" and id="help" the template's source file will be templates/fr/help.html
.