*/
public final function __call ($methodName, $args) {
// Implode all given arguments
- $argsString = implode("|", $args);
- if (empty($argsString)) $argsString = "NULL";
+ $argsString = "";
+ if (empty($args)) {
+ // No arguments
+ $argsString = "NULL";
+ } elseif (is_array($args)) {
+ // Some arguments are there
+ foreach ($args as $arg) {
+ // Check the type
+ if (is_bool($arg)) {
+ // Boolean!
+ if ($arg) $argsString .= "true(bool)"; else $argsString .= "false(bool)";
+ } elseif (is_int($arg)) {
+ // Integer
+ $argsString .= $arg."(int)";
+ } elseif (is_float($arg)) {
+ // Floating point
+ $argsString .= $arg."(float)";
+ } elseif ($arg instanceof BaseFramework) {
+ // Own object instance
+ $argsString .= $arg->__toString()."(Object)";
+ } elseif (is_object($arg)) {
+ // External object
+ $argsString .= "unknown object(!)";
+ } elseif (is_array($arg)) {
+ // Array
+ $argsString .= "Array(array)";
+ } elseif (is_string($arg)) {
+ // String
+ $argsString .= "\"".$arg."\"(string)";
+ } else {
+ // Unknown type (please report!)
+ $argsString .= $arg."(unknown!)";
+ }
+
+ // Add comma
+ $argsString .= ", ";
+ }
+
+ // Remove last comma
+ if (substr($argsString, -2, 1) === ",") $argsString = substr($argsString, 0, -2);
+ } else {
+ // Invalid arguments!
+ $argsString = sprintf("!INVALID:%s!", $args);
+ }
$this->getDebugInstance()->output(sprintf("[%s::%s] Stub! Args: %s",
$this->__toString(),
*
* @return $fileIOInstance An instance to the file I/O sub-system
*/
- protected final function getFileIOInstance () {
+ protected final function getFileIoInstance () {
return $this->fileIOInstance;
}
* @param $fileIOInstance An instance to the file I/O sub-system
* @return void
*/
- public final function setFileIOInstance (FileIOHandler $fileIOInstance) {
+ public final function setFileIoInstance (FileIoHandler $fileIOInstance) {
$this->fileIOInstance = $fileIOInstance;
}
if ($appInstance->getLanguageInstance() === null) {
// Invalid language instance
throw new MissingLanguageHandlerException($appInstance, self::EXCEPTION_MISSING_LANGUAGE_HANDLER);
- } elseif ($appInstance->getFileIOInstance() === null) {
+ } elseif ($appInstance->getFileIoInstance() === null) {
// Invalid language instance
throw new MissingFileIoHandlerException($appInstance, self::EXCEPTION_MISSING_FILE_IO_HANDLER);
}
$eval = sprintf("\$tplEngine = %s::create%s(
\"%s\",
\$appInstance->getLanguageInstance(),
- \$appInstance->getFileIOInstance()
+ \$appInstance->getFileIoInstance()
);",
$this->getConfigInstance()->readConfig("tpl_engine"),
$this->getConfigInstance()->readConfig("tpl_engine"),