src/Command/GenerateModuleCommand.php
protected function _copyAndParseFile($sFrom, $sTo)
    {
        $this->_createMissingFolders($sTo);

        $sTo = preg_replace('/\.tpl$/', '', $sTo);
        if (preg_match('/\.tpl$/', $sFrom)) {
            $oSmarty = $this->_getSmarty();
            $sContent = $oSmarty->fetch($sFrom);
        } else {
            $sContent = file_get_contents($sFrom);
        }

        file_put_contents($sTo, $sContent);
    }
protected function _copyAndParseFile($sFrom, $sTo)
    {
        $this->_createMissingFolders($sTo);

        $sTo = preg_replace('/\.tpl$/', '', $sTo);
        if (preg_match('/\.tpl$/', $sFrom)) {
            $oSmarty = $this->_getSmarty();
            $sContent = $oSmarty->fetch($sFrom);
        } else {
            $sContent = file_get_contents($sFrom);
        }

        file_put_contents($sTo, $sContent);
    }
protected function _copyAndParseFile ( $ sFrom , $ sTo ) { $ this -> _createMissingFolders ( $ sTo ) ; $ sTo = preg_replace ( '/\.tpl$/' , '' , $ sTo ) ; if ( preg_match ( '/\.tpl$/' , $ sFrom ) ) { $ oSmarty = $ this -> _getSmarty ( ) ; $ sContent = $ oSmarty -> fetch ( $ sFrom ) ; } else { $ sContent = file_get_contents ( $ sFrom ) ; } file_put_contents ( $ sTo , $ sContent ) ; }
Copies file from one directory to another, parses file if original
file extension is .tpl

@param $sFrom
@param $sTo
Copies file from one directory to another parses file if original file extension is . tpl