Skip to content

HtTemplateResolverModule is a Zend Framework 2 module which allows us to easily create custom template path resolvers . DEPRECATED

License

Notifications You must be signed in to change notification settings

hrevert/HtTemplateResolverModule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HtTemplateResolverModule

Master Branch Build Status Latest Stable Version Latest Unstable Version Total Downloads Scrutinizer Code Quality

HtTemplateResolverModule is a Zend Framework 2 module which allows us to easily create custom template path resolvers

DEPRECATED

This module is deprecated. Please use Delegator service factories to create custom template path resolvers.

##Requirements

Installation

  • Add "hrevert/ht-template-resolver-module": "0.0.*", to your composer.json and run php composer.phar update
  • Enable the module in config/application.config.php

Basic Usage

<?php  
namespace Application\View\Resolver;

use Zend\View\Resolver\ResolverInterface;

use Zend\View\Renderer\RendererInterface as Renderer;

class MyResolver implements ResolverInterface
{
    public function resolve($name, Renderer $renderer = null)
    {
      // write your code here 
    }
}
<?php
return [
    'ht_template_resolver' => [
        'resolvers_plugin_manager' => [
            'invokables' => [
                'my_resolver' => 'Application\View\Resolver\MyResolver',
            ]
        ]
    ]
];
<?php
return [
    'ht_template_resolver' => [
        'resolvers' => [
            'my_resolver' => 200, // 200 means priority, the resolvers with highest priority are consulted first
        ]
    ]
];

About

HtTemplateResolverModule is a Zend Framework 2 module which allows us to easily create custom template path resolvers . DEPRECATED

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages