<?php
// Own namespace
-namespace CoreFramework\Template\Engine;
+namespace Org\Mxchange\CoreFramework\Template\Engine;
// Import framework stuff
-use CoreFramework\Bootstrap\FrameworkBootstrap;
-use CoreFramework\EntryPoint\ApplicationEntryPoint;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Filesystem\FileNotFoundException;
-use CoreFramework\Generic\EmptyVariableException;
-use CoreFramework\Manager\ManageableApplication;
-use CoreFramework\Object\BaseFrameworkSystem;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Filesystem\FileNotFoundException;
+use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
+use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
+use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Response\Responseable;
// Import SPL stuff
+use \InvalidArgumentException;
use \SplFileInfo;
/**
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class BaseTemplateEngine extends BaseFrameworkSystem {
+abstract class BaseTemplateEngine extends BaseFrameworkSystem {
/**
* The local path name where all templates and sub folders for special
* templates are stored. We will internally determine the language plus
* @param $variableName The variable we are looking for
* @param $value The value we want to store in the variable
* @return void
- * @throws EmptyVariableException If the variable name is left empty
+ * @throws InvalidArgumentException If the variable name is left empty
*/
public final function assignVariable ($variableName, $value) {
// Replace all dashes to underscores to match variables with configuration entries
// Empty variable found?
if (empty($variableName)) {
// Throw an exception
- throw new EmptyVariableException(array($this, 'variableName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
+ throw new InvalidArgumentException('Parameter "variableName" is empty');
} // END - if
// First search for the variable if it was already added
/**
* Assigns all the application data with template variables
*
- * @param $applicationInstance A manageable application instance
* @return void
*/
- public function assignApplicationData (ManageableApplication $applicationInstance) {
+ public function assignApplicationData () {
+ // Get application instance
+ $applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
+
// Get long name and assign it
$this->assignVariable('app_full_name' , $applicationInstance->getAppName());