2013-06-01 17:08:47 +04:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* This file is part of Handlebars-php
|
|
|
|
*
|
|
|
|
* PHP version 5.3
|
|
|
|
*
|
|
|
|
* @category Xamin
|
|
|
|
* @package Handlebars
|
|
|
|
* @author fzerorubigd <fzerorubigd@gmail.com>
|
|
|
|
* @copyright 2013 Authors
|
2013-10-18 20:07:27 +04:00
|
|
|
* @license MIT <http://opensource.org/licenses/MIT>
|
2013-06-01 17:08:47 +04:00
|
|
|
* @version GIT: $Id$
|
|
|
|
* @link http://xamin.ir
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Handlebars string
|
|
|
|
*
|
|
|
|
* @category Xamin
|
|
|
|
* @package Handlebars
|
|
|
|
* @author fzerorubigd <fzerorubigd@gmail.com>
|
|
|
|
* @copyright 2013 Authors
|
2013-10-18 20:07:27 +04:00
|
|
|
* @license MIT <http://opensource.org/licenses/MIT>
|
2013-06-01 17:08:47 +04:00
|
|
|
* @version Release: @package_version@
|
|
|
|
* @link http://xamin.ir
|
|
|
|
*/
|
|
|
|
|
|
|
|
class Handlebars_String
|
|
|
|
{
|
|
|
|
private $_string;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create new string
|
|
|
|
*
|
|
|
|
* @param string $string input source
|
|
|
|
*/
|
|
|
|
public function __construct($string)
|
|
|
|
{
|
|
|
|
$this->_string = $string;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* To String
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function __toString()
|
|
|
|
{
|
|
|
|
return $this->getString();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get string
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getString()
|
|
|
|
{
|
|
|
|
return $this->_string;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create new string
|
|
|
|
*
|
|
|
|
* @param string $string input source
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function setString($string)
|
|
|
|
{
|
|
|
|
$this->_string = $string;
|
|
|
|
}
|
|
|
|
}
|