*/
private $menuInstance = null;
+ /**
+ * Instance of the image
+ */
+ private $imageInstance = null;
+
+ /**
+ * Instance of the stacker
+ */
+ private $stackerInstance = null;
+
+ /**
+ * A Compressor instance
+ */
+ private $compressorInstance = null;
+
/**
* The real class name
*/
// Some arguments are there
foreach ($args as $arg) {
// Add the type
- $argsString .= $arg . ' (' . gettype($arg);
+ $argsString .= $this->replaceControlCharacters($arg) . ' (' . gettype($arg);
// Add length if type is string
if (gettype($arg) == 'string') $argsString .= ', '.strlen($arg);
}
// Initialize the template engine
- $templateInstance = ObjectFactory::createObjectByConfiguredName('template_class', array($appInstance));
+ $templateInstance = ObjectFactory::createObjectByConfiguredName('web_template_class', array($appInstance));
// Return the prepared instance
return $templateInstance;
));
}
+ /**
+ * Replaces control characters with printable output
+ *
+ * @param $str String with control characters
+ * @return $str Replaced string
+ */
+ protected function replaceControlCharacters ($str) {
+ // Replace them
+ $str = str_replace(
+ "\r", '[r]', str_replace(
+ "\n", '[n]', str_replace(
+ "\t", '[t]',
+ $str
+ )));
+
+ // Return it
+ return $str;
+ }
+
/**
* Output a partial stub message for the caller method
*
* @return $localized Localized value
*/
public function doFilterFormatNumber ($value) {
- // Generate it from config and localize depencies
+ // Generate it from config and localize dependencies
switch ($this->getLanguageInstance()->getLanguageCode()) {
case 'de': // German format is a bit different to default
$localized = number_format($value, $this->getConfigInstance()->getConfigEntry('decimals'), ',', '.');
protected final function getMenuInstance () {
return $this->menuInstance;
}
+
+ /**
+ * Setter for image instanxe
+ *
+ * @param $imageInstance An instance of an image
+ * @return void
+ */
+ public final function setImageInstance (BaseImage $imageInstance) {
+ $this->imageInstance = $imageInstance;
+ }
+
+ /**
+ * Getter for image instanxe
+ *
+ * @return $imageInstance An instance of an image
+ */
+ public final function getImageInstance () {
+ return $this->imageInstance;
+ }
+
+ /**
+ * Setter for stacker instanxe
+ *
+ * @param $stackerInstance An instance of an stacker
+ * @return void
+ */
+ public final function setStackerInstance (Stackable $stackerInstance) {
+ $this->stackerInstance = $stackerInstance;
+ }
+
+ /**
+ * Getter for stacker instanxe
+ *
+ * @return $stackerInstance An instance of an stacker
+ */
+ public final function getStackerInstance () {
+ return $this->stackerInstance;
+ }
+
+ /**
+ * Setter for compressor instanxe
+ *
+ * @param $compressorInstance An instance of an compressor
+ * @return void
+ */
+ public final function setCompressorInstance (Compressor $compressorInstance) {
+ $this->compressorInstance = $compressorInstance;
+ }
+
+ /**
+ * Getter for compressor instanxe
+ *
+ * @return $compressorInstance An instance of an compressor
+ */
+ public final function getCompressorInstance () {
+ return $this->compressorInstance;
+ }
}
// [EOF]