in /var/www/u0928104/data/www/imperial-k.ru/imperial-k/vendor/imagine/imagine/lib/Imagine/Imagick/Imagine.php at line 132
in /var/www/u0928104/data/www/imperial-k.ru/imperial-k/vendor/imagine/imagine/lib/Imagine/Imagick/Imagine.php at line 130
throw new InvalidArgumentException(sprintf( 'File %s doesn\'t existss', $path )); } try { $image = $this->read($handle); } catch (\Exception $e) { fclose($handle); throw new RuntimeException(sprintf('Unable to open image %s', $path), $e->getCode(), $e); } return $image; } /** * {@inheritdoc} */ public function create(BoxInterface $size, Color $color = null)
* @param string $mode * @return ImageInterface */ public static function thumbnail($filename, $width, $height, $mode = ManipulatorInterface::THUMBNAIL_OUTBOUND) { $box = new Box($width, $height); $img = static::getImagine()->open(Yii::getAlias($filename)); if (($img->getSize()->getWidth() <= $box->getWidth() && $img->getSize()->getHeight() <= $box->getHeight()) || (!$box->getWidth() && !$box->getHeight())) { return $img->copy(); } $img = $img->thumbnail($box, $mode);
FileHelper::createDirectory($newDirectory, 0777); } $savePath = Yii::getAlias('@webroot/cache') . DIRECTORY_SEPARATOR . $this->directory . DIRECTORY_SEPARATOR . $model->id . DIRECTORY_SEPARATOR . $property . $model->backimage; $savePathShow = Yii::getAlias('@web/cache') . DIRECTORY_SEPARATOR . $this->directory . DIRECTORY_SEPARATOR . $model->id . DIRECTORY_SEPARATOR . $property . $model->backimage; if (!is_file($savePath)) { Image::thumbnail($thumbnailPath, $width, $height,"inset") ->save($savePath, ['quality' => 100]); } return $savePathShow; } else { return Yii::getAlias('@web/img') . DIRECTORY_SEPARATOR . 'notphoto.jpg'; }
*/ public function __call($name, $params) { $this->ensureBehaviors(); foreach ($this->_behaviors as $object) { if ($object->hasMethod($name)) { return call_user_func_array([$object, $name], $params); } } throw new UnknownMethodException('Calling unknown method: ' . get_class($this) . "::$name()"); } /**
[ 'label'=>'Изображение', 'format'=>'raw', 'contentOptions' => ['style' => 'width:150px'], 'value'=>function($data){ $images = Html::img($data->show(60,60),['width'=>60,'height'=>60]); $images .= Html::img($data->showBackImage(60,60),['width'=>60,'height'=>60]); return Html::a($images,['lots/view','id'=>$data->id]); } ], 'year', 'letter', 'metal',
[ 'label'=>'Изображение', 'format'=>'raw', 'contentOptions' => ['style' => 'width:150px'], 'value'=>function($data){ $images = Html::img($data->show(60,60),['width'=>60,'height'=>60]); $images .= Html::img($data->showBackImage(60,60),['width'=>60,'height'=>60]); return Html::a($images,['lots/view','id'=>$data->id]); } ], 'year', 'letter', 'metal',
public function getDataCellValue($model, $key, $index) { if ($this->value !== null) { if (is_string($this->value)) { return ArrayHelper::getValue($model, $this->value); } else { return call_user_func($this->value, $model, $key, $index, $this); } } elseif ($this->attribute !== null) { return ArrayHelper::getValue($model, $this->attribute); } return null; }
/** * @inheritdoc */ protected function renderDataCellContent($model, $key, $index) { if ($this->content === null) { return $this->grid->formatter->format($this->getDataCellValue($model, $key, $index), $this->format); } else { return parent::renderDataCellContent($model, $key, $index); } } }
{ if ($this->contentOptions instanceof Closure) { $options = call_user_func($this->contentOptions, $model, $key, $index, $this); } else { $options = $this->contentOptions; } return Html::tag('td', $this->renderDataCellContent($model, $key, $index), $options); } /** * Renders the filter cell. */ public function renderFilterCell()
*/ public function renderTableRow($model, $key, $index) { $cells = []; /* @var $column Column */ foreach ($this->columns as $column) { $cells[] = $column->renderDataCell($model, $key, $index); } if ($this->rowOptions instanceof Closure) { $options = call_user_func($this->rowOptions, $model, $key, $index, $this); } else { $options = $this->rowOptions; }
$row = call_user_func($this->beforeRow, $model, $key, $index, $this); if (!empty($row)) { $rows[] = $row; } } $rows[] = $this->renderTableRow($model, $key, $index); if ($this->afterRow !== null) { $row = call_user_func($this->afterRow, $model, $key, $index, $this); if (!empty($row)) { $rows[] = $row; }
*/ public function renderItems() { $caption = $this->renderCaption(); $columnGroup = $this->renderColumnGroup(); $tableHeader = $this->showHeader ? $this->renderTableHeader() : false; $tableBody = $this->renderTableBody(); $tableFooter = $this->showFooter ? $this->renderTableFooter() : false; $content = array_filter([ $caption, $columnGroup, $tableHeader, $tableFooter,
public function renderSection($name) { switch ($name) { case '{summary}': return $this->renderSummary(); case '{items}': return $this->renderItems(); case '{pager}': return $this->renderPager(); case '{sorter}': return $this->renderSorter(); default: return false;
public function renderSection($name) { switch ($name) { case "{errors}": return $this->renderErrors(); default: return parent::renderSection($name); } } /** * Returns the options for the grid view JS widget. * @return array the options
* Runs the widget. */ public function run() { if ($this->dataProvider->getCount() > 0 || $this->showOnEmpty) { $content = preg_replace_callback("/{\\w+}/", function ($matches) { $content = $this->renderSection($matches[0]); return $content === false ? $matches[0] : $content; }, $this->layout); } else { $content = $this->renderEmpty(); }
{ if ($this->dataProvider->getCount() > 0 || $this->showOnEmpty) { $content = preg_replace_callback("/{\\w+}/", function ($matches) { $content = $this->renderSection($matches[0]); return $content === false ? $matches[0] : $content; }, $this->layout); } else { $content = $this->renderEmpty(); } $tag = ArrayHelper::remove($this->options, 'tag', 'div'); echo Html::tag($tag, $content, $this->options); }
{ $id = $this->options['id']; $options = Json::encode($this->getClientOptions()); $view = $this->getView(); GridViewAsset::register($view); $view->registerJs("jQuery('#$id').yiiGridView($options);"); parent::run(); } /** * Renders validator errors of filter model. * @return string the rendering result. */
{ ob_start(); ob_implicit_flush(false); /* @var $widget Widget */ $config['class'] = get_called_class(); $widget = Yii::createObject($config); $out = $widget->run(); return ob_get_clean() . $out; } private $_id;
// 'publisher_draft', // 'auction_id', // 'category_id', ], ]); ?> </div> <?php $script = <<< JS
*/ public function renderPhpFile($_file_, $_params_ = []) { ob_start(); ob_implicit_flush(false); extract($_params_, EXTR_OVERWRITE); require($_file_); return ob_get_clean(); } /** * Renders dynamic content returned by the given PHP statements.
$this->renderers[$ext] = Yii::createObject($this->renderers[$ext]); } /* @var $renderer ViewRenderer */ $renderer = $this->renderers[$ext]; $output = $renderer->render($this, $viewFile, $params); } else { $output = $this->renderPhpFile($viewFile, $params); } $this->afterRender($viewFile, $params, $output); } array_pop($this->_viewFiles); $this->context = $oldContext;
* @throws InvalidParamException if the view cannot be resolved or the view file does not exist. * @see renderFile() */ public function render($view, $params = [], $context = null) { $viewFile = $this->findViewFile($view, $context); return $this->renderFile($viewFile, $params, $context); } /** * Finds the view file based on the given view name. * @param string $view the view name or the path alias of the view file. Please refer to [[render()]] * on how to specify this parameter.
* These parameters will not be available in the layout. * @return string the rendering result. * @throws InvalidParamException if the view file or the layout file does not exist. */ public function render($view, $params = []) { $content = $this->getView()->render($view, $params, $this); return $this->renderContent($content); } /** * Renders a static string by applying a layout. * @param string $content the static string being rendered
return $this->render('view', [ 'model' => $model, 'categories'=>$categories, 'lotsProvider'=>$provider, 'searchModel' => $searchModel, 'auctionClose'=>$auctionClose, ]); } /** * Finds the Auctions model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown.
$args = $this->controller->bindActionParams($this, $params); Yii::trace('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__); if (Yii::$app->requestedParams === null) { Yii::$app->requestedParams = $args; } return call_user_func_array([$this->controller, $this->actionMethod], $args); } }
} $result = null; if ($runAction && $this->beforeAction($action)) { // run the action $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); // call afterAction on modules foreach ($modules as $module) { /* @var $module Module */
$parts = $this->createController($route); if (is_array($parts)) { /* @var $controller Controller */ list($controller, $actionID) = $parts; $oldController = Yii::$app->controller; Yii::$app->controller = $controller; $result = $controller->runAction($actionID, $params); Yii::$app->controller = $oldController; return $result; } else { $id = $this->getUniqueId(); throw new InvalidRouteException('Unable to resolve the request "' . ($id === '' ? $route : $id . '/' . $route) . '".');
$route = $this->catchAll[0]; $params = array_splice($this->catchAll, 1); } try { Yii::trace("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } else { $response = $this->getResponse(); if ($result !== null) { $response->data = $result;
try { $this->state = self::STATE_BEFORE_REQUEST; $this->trigger(self::EVENT_BEFORE_REQUEST); $this->state = self::STATE_HANDLING_REQUEST; $response = $this->handleRequest($this->getRequest()); $this->state = self::STATE_AFTER_REQUEST; $this->trigger(self::EVENT_AFTER_REQUEST); $this->state = self::STATE_SENDING_RESPONSE; $response->send();
require(__DIR__ . '/imperial-k/vendor/autoload.php'); require(__DIR__ . '/imperial-k/vendor/yiisoft/yii2/Yii.php'); $config = require(__DIR__ . '/imperial-k/config/web.php'); (new yii\web\Application($config))->run();
$_GET = [ 'sort' => 'letter', 'id' => '125', ]; $_SERVER = [ 'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'SCRIPT_NAME' => '/index.php', 'REQUEST_URI' => '/auctions/auctions/125?sort=letter', 'QUERY_STRING' => 'sort=letter', 'REQUEST_METHOD' => 'GET', 'SERVER_PROTOCOL' => 'HTTP/1.0', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'REDIRECT_URL' => '/auctions/auctions/125', 'REDIRECT_QUERY_STRING' => 'sort=letter', 'REMOTE_PORT' => '38288', 'SCRIPT_FILENAME' => '/var/www/u0928104/data/www/imperial-k.ru/index.php', 'SERVER_ADMIN' => 'webmaster@imperial-k.ru', 'CONTEXT_DOCUMENT_ROOT' => '/var/www/u0928104/data/www/imperial-k.ru', 'CONTEXT_PREFIX' => '', 'DOCUMENT_ROOT' => '/var/www/u0928104/data/www/imperial-k.ru', 'REMOTE_ADDR' => '18.222.111.211', 'SERVER_PORT' => '80', 'SERVER_ADDR' => '127.0.0.1', 'SERVER_NAME' => 'imperial-k.ru', 'SERVER_SOFTWARE' => 'Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 Phusion_Passenger/5.3.7', 'SERVER_SIGNATURE' => '', 'HTTP_USER_AGENT' => 'claudebot', 'HTTP_ACCEPT' => '*/*', 'HTTP_CONNECTION' => 'close', 'HTTP_X_FORWARDED_PORT' => '80', 'HTTP_X_FORWARDED_PROTO' => 'http', 'HTTP_HOST' => 'imperial-k.ru', 'PERL5LIB' => '/usr/share/awstats/lib:/usr/share/awstats/plugins', 'REQUEST_SCHEME' => 'http', 'HTTPS' => 'off', 'UNIQUE_ID' => 'ZiFGlKlNuLJ9REkvBZYNKgAAAAw', 'REDIRECT_STATUS' => '200', 'REDIRECT_PERL5LIB' => '/usr/share/awstats/lib:/usr/share/awstats/plugins', 'REDIRECT_REQUEST_SCHEME' => 'http', 'REDIRECT_HTTPS' => 'off', 'REDIRECT_UNIQUE_ID' => 'ZiFGlKlNuLJ9REkvBZYNKgAAAAw', 'FCGI_ROLE' => 'RESPONDER', 'PHP_SELF' => '/index.php', 'REQUEST_TIME_FLOAT' => 1713456788.7482979, 'REQUEST_TIME' => 1713456788, 'argv' => [ 'sort=letter', ], 'argc' => 1, ]; $_ENV = [ 'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'SCRIPT_NAME' => '/index.php', 'REQUEST_URI' => '/auctions/auctions/125?sort=letter', 'QUERY_STRING' => 'sort=letter', 'REQUEST_METHOD' => 'GET', 'SERVER_PROTOCOL' => 'HTTP/1.0', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'REDIRECT_URL' => '/auctions/auctions/125', 'REDIRECT_QUERY_STRING' => 'sort=letter', 'REMOTE_PORT' => '38288', 'SCRIPT_FILENAME' => '/var/www/u0928104/data/www/imperial-k.ru/index.php', 'SERVER_ADMIN' => 'webmaster@imperial-k.ru', 'CONTEXT_DOCUMENT_ROOT' => '/var/www/u0928104/data/www/imperial-k.ru', 'CONTEXT_PREFIX' => '', 'DOCUMENT_ROOT' => '/var/www/u0928104/data/www/imperial-k.ru', 'REMOTE_ADDR' => '18.222.111.211', 'SERVER_PORT' => '80', 'SERVER_ADDR' => '127.0.0.1', 'SERVER_NAME' => 'imperial-k.ru', 'SERVER_SOFTWARE' => 'Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 Phusion_Passenger/5.3.7', 'SERVER_SIGNATURE' => '', 'HTTP_USER_AGENT' => 'claudebot', 'HTTP_ACCEPT' => '*/*', 'HTTP_CONNECTION' => 'close', 'HTTP_X_FORWARDED_PORT' => '80', 'HTTP_X_FORWARDED_PROTO' => 'http', 'HTTP_HOST' => 'imperial-k.ru', 'PERL5LIB' => '/usr/share/awstats/lib:/usr/share/awstats/plugins', 'REQUEST_SCHEME' => 'http', 'HTTPS' => 'off', 'UNIQUE_ID' => 'ZiFGlKlNuLJ9REkvBZYNKgAAAAw', 'REDIRECT_STATUS' => '200', 'REDIRECT_PERL5LIB' => '/usr/share/awstats/lib:/usr/share/awstats/plugins', 'REDIRECT_REQUEST_SCHEME' => 'http', 'REDIRECT_HTTPS' => 'off', 'REDIRECT_UNIQUE_ID' => 'ZiFGlKlNuLJ9REkvBZYNKgAAAAw', 'FCGI_ROLE' => 'RESPONDER', 'PHP_SELF' => '/index.php', 'REQUEST_TIME_FLOAT' => 1713456788.7482979, 'REQUEST_TIME' => 1713456788, 'argv' => [ 'sort=letter', ], 'argc' => 1, ];