Example #1
0
 /**
  * Initializes the decorator.
  *
  * @param \Aimeos\MW\Translation\Iface $object Translation object or decorator
  * @param string $prefix Prefix for keys to distinguish several instances
  */
 public function __construct(\Aimeos\MW\Translation\Iface $object, $prefix = '')
 {
     if (function_exists('apc_store') === false) {
         throw new \Aimeos\MW\Translation\Exception('APC not available');
     }
     parent::__construct($object);
     $this->prefix = $prefix;
 }
Example #2
0
 /**
  * Initializes the decorator.
  *
  * @param \Aimeos\MW\Translation\Iface $object Translation object or decorator
  * @param array $translations Associative list of domains and singular
  * 	strings as key and list of translation number and translations as value:
  * 	array( <domain> => array( <singular> => array( <index> => <translations> ) ) )
  */
 public function __construct(\Aimeos\MW\Translation\Iface $object, array $translations = array())
 {
     parent::__construct($object);
     $this->translations = $translations;
 }