Exemplo n.º 1
0
 /**
  * Generates the adapter
  *
  * @param  array|Zend_Config $options Translation content
  */
 public function __construct($options = array())
 {
     $this->_options['delimiter'] = ";";
     $this->_options['length'] = 0;
     $this->_options['enclosure'] = '"';
     if ($options instanceof \Zend\Config\Config) {
         $options = $options->toArray();
     } else {
         if (func_num_args() > 1) {
             $args = func_get_args();
             $options = array();
             $options['content'] = array_shift($args);
             if (!empty($args)) {
                 $options['locale'] = array_shift($args);
             }
             if (!empty($args)) {
                 $opt = array_shift($args);
                 $options = array_merge($opt, $options);
             }
         } else {
             if (!is_array($options)) {
                 $options = array('content' => $options);
             }
         }
     }
     parent::__construct($options);
 }