Components_Helper_Templates_Single::__construct PHP Method

__construct() public method

Constructor.
public __construct ( string $sdir, string $tdir, string $sfile, string $tfile )
$sdir string The templates source directory.
$tdir string The templates target directory.
$sfile string The exact template source file.
$tfile string The exact template target file.
    public function __construct($sdir, $tdir, $sfile, $tfile)
    {
        $source = $sdir . DIRECTORY_SEPARATOR . $sfile . '.template';
        if (file_exists($source)) {
            $this->_source = $source;
        } else {
            throw new Components_Exception("No template at {$source}!");
        }
        $this->_target = $tdir . DIRECTORY_SEPARATOR . $tfile;
    }
Components_Helper_Templates_Single