/** * Constructor * * @param array $opts * @param Configuration $config * @param EventManager $evm * @param PDO $pdo */ public function __construct(array $params, Configuration $config, EventManager $evm, PDO $pdo = null) { if ($pdo) { $params['pdo'] = $pdo; } $this->config = $config->getInstance(); $this->evm = $evm->getInstance(); parent::__construct($params); }
/** * Constructor. * * @param array $opts * @param Cache $metadataCache * @param Cache $queryCache * @param Cache $resultCache * @param SQLLogger $logger */ public function __construct(array $opts, $metadataDriver, Cache $metadataCache, Cache $queryCache, Cache $resultCache = null, SQLLogger $logger = null) { if ($metadataDriver instanceof DriverChain) { $metadataDriver = $metadataDriver->getInstance(); } $this->metadataDriver = $metadataDriver; $this->metadataCache = $metadataCache; $this->queryCache = $queryCache; $this->resultCache = $resultCache; $this->logger = $logger; parent::__construct($opts); }
/** * Constructor. * * @param array $drivers * @param Cache $cache */ public function __construct(array $drivers = array(), Cache $cache = null) { $this->cache = $cache ? $cache : new ArrayCache(); parent::__construct($drivers); }