_outputs = $outputs; $this->_driver = $driver; } protected function getOutputName(): ?string { foreach ($this->_outputs as $output) { if ($this->_driver->isConnected($output)) return $output; } return null; } public function isConnected(): bool { return !empty($this->getOutputName()); } public function isPrimary(): bool { return $this->_driver->isPrimary($this->getOutputName()); } public function getDimensions(): array { return $this->_driver->getDimensions($this->getOutputName()); } public function getOffset(): array { return $this->_driver->getOffset($this->getOutputName()); } public function setOffset(int $x, int $y): void { $this->_driver->setOffset($this->getOutputName(), $x, $y); } public function setDimensions(int $w, int $h): void { $this->_driver->setDimensions($this->getOutputName(), $w, $h); } }