承接 ldrahnik/theme-keeper 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ldrahnik/theme-keeper

最新稳定版本:v1.1.1

Composer 安装命令:

composer require ldrahnik/theme-keeper

包简介

Keeper of themes.

README 文档

README

Strongly recommend use Kappa/ThemesManager.

If you use Modules structure Kappa/ThemesManager is more effective if not that is still better. Forgot on this package it was just attempt. Is deprecated and will not be more developed.

ldrahnik/theme-keeper

Build Status Latest stable Downloads total

Keeper of app themes.

Requirements

ldrahnik/theme-keeper requires PHP 5.4 or higher.

Installation

Install theme keeper to your project using Composer:

$ composer require ldrahnik/theme-keeper

Usage

Register extension in config file

extensions:
	themes: ThemeKeeper\DI\ThemeKeeperExtension

Example

themes:
	default:
		themeDir: %themesDir%/<themeName>
		assetsDir: <themeDir>/assets
		views:
			controls: <themeDir>/controls/<name>/<view>
			presenters: <themeDir>/presenters/<name>/<view>
			layouts: <themeDir>/@<view>
	/**
	* @var \ThemeKeeper\ThemeKeeper 
	* @inject 
	*/
	private $themes;
	
	public function __construct(ThemeKeeper\ThemeKeeper $themes)
    {
		$this->themes = $themes;
    }
    
    public function render()
    {
    	$this->template->setFile($this->themes->getView($this->name, 'controls'));
		$this->template->render();
		// you can cast getView without getTheme('default') because default name is automatically default
		// theme for short use as that, if is not set up name 'default', is choosen first theme in order
    }

Is able to set up path via these patterns (don't count patterns through view-keeper - substitution is done successively)

	<themeName>
	<assetsDir>
	<themeDir>

Summary

  • Template-keeper uses View-keeper but view-keeper as extension have still good use, for example Mail templates are the same for entire app.
  • Crossing from small app with view-keeper to something bigger is not hard because is possible to let code as it's, just use another service.

统计信息

  • 总下载量: 15
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-03-29