Exemplo n.º 1
0
 /**
  * Constructor
  *
  * @param array|Zend_Config  $config  database configuration
  */
 public function __construct($config)
 {
     // Enable LOAD DATA INFILE
     if (defined('PDO::MYSQL_ATTR_LOCAL_INFILE')) {
         $config['driver_options'][PDO::MYSQL_ATTR_LOCAL_INFILE] = true;
     }
     parent::__construct($config);
 }
Exemplo n.º 2
0
 /**
  * @param Filesystem $filesystem
  * @param String $string
  * @param DateTime $dateTime
  * @param array $config
  */
 public function __construct(Filesystem $filesystem, string $string, DateTime $dateTime, array $config = array())
 {
     $this->_filesystem = $filesystem;
     $this->string = $string;
     $this->dateTime = $dateTime;
     parent::__construct($config);
 }
Exemplo n.º 3
0
 /**
  * @param \Magento\Framework\Stdlib\String|String $string
  * @param DateTime $dateTime
  * @param LoggerInterface $logger
  * @param array $config
  * @throws \Zend_Db_Adapter_Exception
  */
 public function __construct(string $string, DateTime $dateTime, LoggerInterface $logger, array $config = [])
 {
     $this->string = $string;
     $this->dateTime = $dateTime;
     $this->logger = $logger;
     parent::__construct($config);
 }
Exemplo n.º 4
0
 /**
  * @param \Magento\Framework\Stdlib\StringUtils|String $string
  * @param DateTime $dateTime
  * @param LoggerInterface $logger
  * @param array $config
  * @throws \InvalidArgumentException
  */
 public function __construct(StringUtils $string, DateTime $dateTime, LoggerInterface $logger, array $config = [])
 {
     $this->string = $string;
     $this->dateTime = $dateTime;
     $this->logger = $logger;
     try {
         parent::__construct($config);
     } catch (\Zend_Db_Adapter_Exception $e) {
         throw new \InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
     }
 }