mirror of
https://github.com/Mibew/handlebars.php.git
synced 2025-05-06 03:43:08 +03:00
53 lines
1.2 KiB
PHP
53 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* This file is part of Handlebars-php
|
|
* Base on mustache-php https://github.com/bobthecow/mustache.php
|
|
*
|
|
* PHP version 5.3
|
|
*
|
|
* @category Xamin
|
|
* @package Handlebars
|
|
* @author fzerorubigd <fzerorubigd@gmail.com>
|
|
* @author Behrooz Shabani <everplays@gmail.com>
|
|
* @copyright 2010-2012 (c) Justin Hileman
|
|
* @copyright 2012 (c) ParsPooyesh Co
|
|
* @copyright 2013 (c) Behrooz Shabani
|
|
* @license MIT <http://opensource.org/licenses/MIT>
|
|
* @version GIT: $Id$
|
|
* @link http://xamin.ir
|
|
*/
|
|
|
|
namespace Handlebars\Loader;
|
|
use Handlebars\Loader;
|
|
use Handlebars\StringWrapper;
|
|
|
|
/**
|
|
* Handlebars Template string Loader implementation.
|
|
*
|
|
* @category Xamin
|
|
* @package Handlebars
|
|
* @author fzerorubigd <fzerorubigd@gmail.com>
|
|
* @copyright 2010-2012 (c) Justin Hileman
|
|
* @copyright 2012 (c) ParsPooyesh Co
|
|
* @license MIT <http://opensource.org/licenses/MIT>
|
|
* @version Release: @package_version@
|
|
* @link http://xamin.ir *
|
|
*/
|
|
|
|
class StringLoader implements Loader
|
|
{
|
|
|
|
/**
|
|
* Load a Template by source.
|
|
*
|
|
* @param string $name Handlebars Template source
|
|
*
|
|
* @return StringWrapper Handlebars Template source
|
|
*/
|
|
public function load($name)
|
|
{
|
|
return new StringWrapper($name);
|
|
}
|
|
|
|
}
|