/**
  * Transforms the data in direction from formatted output file and returns the transformed data.
  *
  * @param array $data
  * @return array
  */
 public function transformBackward($data)
 {
     if (!$this->pluginConfig->get('useCommaDecimal')) {
         return $data;
     }
     $data = $this->transform([$data], false);
     return $data[0];
 }
Пример #2
0
 /**
  * Returns the instance of the enlight configuration. If no configuration is set,
  * the logDb, logTemplate and the logController flags will be set to true.
  *
  * @return  Enlight_Config
  */
 public function Config()
 {
     $config = parent::Config();
     if (count($config) === 0) {
         $config->merge(new Enlight_Config(array('logDb' => true, 'logTemplate' => true, 'logController' => true)));
     }
     return $this->config;
 }
Пример #3
0
 /**
  * Subscribes a plugin event.
  *
  * {@inheritDoc}
  *
  * @param string|Enlight_Event_Handler $event
  * @param string $listener
  * @param integer  $position
  * @return Enlight_Plugin_Bootstrap_Config
  */
 public function subscribeEvent($event, $listener = null, $position = null)
 {
     if ($listener === null) {
         $this->Collection()->Subscriber()->registerListener($event);
     } else {
         parent::subscribeEvent($event, $listener, $position);
     }
     return $this;
 }