handlebars.php/src/Handlebars/Loader/StringLoader.php
2015-08-06 10:45:25 +00:00

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);
}
}