Ejemplo n.º 1
0
 public function __construct(array $config)
 {
     parent::__construct(new Adapter\Mapping());
     $this->baseUrl = $config["host"] . "/c/" . $config["company"];
     $this->sslVersion = isset($config["ssl_version"]) ? (int) $config["ssl_version"] : null;
     $this->user = isset($config["user"]) ? $config["user"] : null;
     if ($this->user !== null) {
         if (isset($config["password"])) {
             $this->password = $config["password"];
         } else {
             throw new \Exception("Password is required if user set!");
         }
     }
 }
Ejemplo n.º 2
0
 public function __construct(array $config)
 {
     parent::__construct(new Adapter\Mapping());
     $this->connection = new \DibiConnection($config);
 }