public function __construct($imagePath) { $this->_imagePath = $imagePath; $imageInfo = getimagesize($imagePath); if ($imageInfo[2] == IMAGETYPE_GIF) { $this->_source = imagecreatefromgif($imagePath); } elseif ($imageInfo[2] == IMAGETYPE_JPEG) { $this->_source = imagecreatefromjpeg($imagePath); } elseif ($imageInfo[2] == IMAGETYPE_PNG) { $this->_source = imagecreatefrompng($imagePath); } if (is_null($this->_source) === true) { throw new \yii\web\ServerErrorHttpException('Неподдерживаемый формат изображения - ' . $imagePath); } if ($this->_source === false) {
$_GET = [ 'page' => '16', ];