text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_prefix|><?php /** * This view is used by console/controllers/MigrateController.php. * * The following variables are available in this view: * * @var \yii\web\View $this * @var string $className the new migration class name without namespace * @var string $namespace the new migration class namespace * @va...
fim
yiisoft/yii2
php
<|fim_suffix|>r; ?> <pre><?php // fill empty lines with a whitespace to avoid rendering problems in opera for ($i = $begin; $i <= $end; ++$i) { echo (trim($lines[$i]) === '') ? " \n" : $handler->htmlEncode($lines[$i]); }...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @var \yii\web\View $this * @var \Throwable $exception * @var \yii\web\ErrorHandler $handler */ if ($exception instanceof \yii\web\HttpException) { $code = $exception->statusCode; } else { $code = $exception->getCode(); } $name = $handler->getExceptionName($exception); if ($name ===...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @var \yii\web\View $this * @var \Throwable $exception * @var \yii\web\ErrorHandler $handler */ ?> <?php if (method_exists($this, 'beginPage')): ?><|fim_suffix|>to5KRNZTJqJ7gBTatWtp/DkMJWeNcQpa2hO4eIV6NeBRQUh9Wh6EiMH6XgG992Ef9tgFND8ZQ4/kUIqfw+J22qG75whBj3chlrCAijvOqUMwHcWHM3bgxEGDCyWIIKwCN6...
fim
yiisoft/yii2
php
<|fim_suffix|>mlEncode($exception->getMessage())) ?></h3> <p>in <span class="file"><?= $exception->getFile() ?></span> at line <span class="line"><?= $exception->getLine() ?></span></p> <?php if ($exception instanceof \yii\db\Exception && !empty($exception->errorInfo)): ?> <pre>Error Info: <?= $handler-...
fim
yiisoft/yii2
php
<|fim_suffix|>for saving messages to database. 'format' => 'db', // Connection component to use. Optional. 'db' => 'db', // Custom source message table. Optional. // 'sourceMessageTable' => '{{%source_message}}', // Custom name for translation message table. Optional. // 'messageTable' => '{...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * This view is used by console/controllers/MigrateController.php. * * The following variables are available in this view: * * @var string $className the new migration class name without namespace * @var string $namespace the new migration class namespace */ echo "<?php\n"; if (!empty($n...
fim
yiisoft/yii2
php
<|fim_suffix|>* @param Request $request the request to be handled * @return Response the resulting response * @throws NotFoundHttpException if the requested route is invalid */ public function handleRequest($request) { if (empty($this->catchAll)) { try { list($...
fim
yiisoft/yii2
php
<|fim_suffix|>ram View $view the view to be registered with * @return static the registered asset bundle instance */ public static function register($view) { /** @var static $result */ $result = $view->registerAssetBundle(get_called_class()); return $result; } /** ...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; use Yii; use yii\base\Component; use yii\base\Exception; /** * AssetConverter supports conversion of several popular formats into...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; /** * The AssetConverterInterface must be implemented by asset converter classes. * * @author Qiang Xue <qiang.xue@gmail.com> *...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; use Yii; use yii\base\Component; use yii\base\InvalidArgumentException; use yii\base\InvalidConfigException; use yii\helpers\FileHe...
fim
yiisoft/yii2
php
<|fim_suffix|> BadRequestHttpException extends HttpException { /** * Constructor. * @param string|null $message error message * @param int $code error code * @param \Throwable|null $previous The previous exception used for the exception chaining. */ public function __construct($message ...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; use yii\caching\CacheInterface; use yii\di\Instance; /** * CacheSession implements a session component using cache as storage med...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; use Yii; use yii\base\BaseObject; /** * CompositeUrlRule is the base class for URL rule classes that consist of multiple simpler ...
fim
yiisoft/yii2
php
<?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; /** * ConflictHttpException represents a "Conflict" HTTP exception with status code 409. * * @see https://tools.ietf.org/html/rfc7231#section-...
fim
yiisoft/yii2
php
<|fim_suffix|>current response object * @see User::getReturnUrl() */ public function goBack($defaultUrl = null) { return $this->response->redirect(Yii::$app->getUser()->getReturnUrl($defaultUrl)); } /** * Refreshes the current page. * This method is a shortcut to [[Response:...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; /** * Cookie represents information related with a cookie, such as [[name]], [[value]], [[domain]], etc. * * For more details an...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; use ArrayIterator; use Yii; use yii\base\BaseObject; use yii\base\InvalidCallException; /** * CookieCollection maintains the cook...
fim
yiisoft/yii2
php
<|fim_suffix|> 'id' => $id, 'expire' => time() + $this->getTimeout(), ]); $this->fields = $this->typecastFields($this->fields); $this->db->createCommand()->upsert($this->sessionTable, $this->fields)->execute(); $this->fields = []; } catch (\Exc...
fim
yiisoft/yii2
php
<|fim_suffix|>ption = $this->findException(); if ($this->defaultMessage === null) { $this->defaultMessage = Yii::t('yii', 'An internal server error occurred.'); } if ($this->defaultName === null) { $this->defaultName = Yii::t('yii', 'Error'); } } /** ...
fim
yiisoft/yii2
php
<|fim_suffix|> } elseif (is_bool($value)) { $args[$key] = '<span class="keyword">' . ($value ? 'true' : 'false') . '</span>'; } elseif (is_string($value)) { $fullValue = $this->htmlEncode($value); if (mb_strlen($value, 'UTF-8') > 32) { ...
fim
yiisoft/yii2
php
<|fim_suffix|>er Arambula <terabytesoftw@gmail.com> * @since 2.0.56 */ class ErrorHandlerRenderEvent extends Event { /** * @var \Throwable|null Exception being rendered. */ public ?Throwable $exception = null; /** * @var string Rendered HTML output. */ public string $output = ''; }...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; /** * ForbiddenHttpException represents a "Forbidden" HTTP exception with status code 403. * * Use this exception when a user is...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @<|fim_suffix|>ssage * @param int $code error code * @param \Throwable|null $previous The previous exception used for the exception chaining. */ public function __construct($message = null, $code = 0, $previous = null) { p...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; use Yii; use yii\base\InvalidConfigException; /** *<|fim_suffix|>f (isset($rule['pattern'], $rule['route'])) { $r...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; use yii\base\BaseObject; /** * HeaderCollection is used by [[Response]] to maintain the currently registered HTTP headers. * * ...
fim
yiisoft/yii2
php
<|fim_suffix|>I_DEBUG ? "Headers already sent in {$file} on line {$line}." : 'Headers already sent.'; parent::__construct($message); } } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ na...
fim
yiisoft/yii2
php
<|fim_suffix|> if ($response->data !== null) { $response->content = $response->data; } } } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; use yii\ba...
fim
yiisoft/yii2
php
<?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; use yii\base\UserException; /** * HttpException represents an exception caused by an improper request of the end-user. * * HttpException can ...
fim
yiisoft/yii2
php
<|fim_suffix|>e 2.0 */ interface IdentityInterface { /** * Finds an identity by the given ID. * @param string|int $id the ID to be looked for * @return IdentityInterface|null the identity object that matches the given ID. * Null should be returned if such an identity cannot be found * or t...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link http<|fim_suffix|>/jquery/dist'; public $js = [ 'jquery.js', ]; } <|fim_middle|>s://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; /** * This asset bundle provides the [...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; use yii\base\BaseObject; /** *<|fim_suffix|>PHP magic function converting an object into a string. * @return string the Java...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; use yii\base\InvalidArgumentException; use yii\he<|fim_suffix|>/ converts JSONP to JSON if (strpos($contentType, 'applicati...
fim
yiisoft/yii2
php
<|fim_suffix|>nse->data['callback'], Json::htmlEncode($response->data['data']) ); } elseif ($response->data !== null) { $response->content = ''; Yii::warning( "The 'jsonp' response requires that the data be an array consisting of both 'data' an...
fim
yiisoft/yii2
php
<|fim_suffix|> ($links as $rel => $link) { if (is_array($link)) { $links[$rel] = self::serialize($link); } elseif ($link instanceof self) { $links[$rel] = array_filter((array)$link); } else { $links[$rel] = ['href' => $link]; ...
fim
yiisoft/yii2
php
<|fim_suffix|>y the links */ public function getLinks(); } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; /** * Linkable is the interface that should be implemented by ...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; /** * MethodNotAllowedHttpException represents a "Method Not Allowed" HTTP exception with status<|fim_suffix|>sage error message ...
fim
yiisoft/yii2
php
<|fim_suffix|>ull) { $fields['id'] = $id; } if ($data !== null) { $fields['data'] = $data; } return $fields; } /** * Extracts session data from storage field set. * @param array $fields storage fields. * @return string session data. */...
fim
yiisoft/yii2
php
<|fim_suffix|> false) { continue; } list($headerName, $headerValue) = explode(':', $headerPart, 2); $headerName = strtolower(trim($headerName)); $headerValue = trim($headerValue); if (strpos($headerValue, ';') === false) { $he...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.<|fim_suffix|>@since 2.0 */ class NotAcceptableHttpException extends HttpException { /** * Constructor. * @param string|null $message error message * @param int $...
fim
yiisoft/yii2
php
<|fim_suffix|>r Qiang Xue <qiang.xue@gmail.com> * @since 2.0 */ class NotFoundHttpException extends HttpException { /** * Constructor. * @param string|null $message error message * @param int $code error code * @param \Throwable|null $previous The previous exception used for the exception chai...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; /** * RangeNotSatisfiableHttpException represents an exception caused by an improper request of the end-user. * This exception th...
fim
yiisoft/yii2
php
<?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; use Yii; use yii\base\InvalidConfigException; use yii\validators\IpValidator; /** * The web Request class represents an HTTP request. * * It ...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; /** <|fim_suffix|> array. * * @author Dan Schmidt <danschmidt5189@gmail.com> * @since 2.0 */ interface RequestParserInterface ...
fim
yiisoft/yii2
php
<|fim_suffix|> echo $this->content; return; } // Try to reset time limit for big files $setTimeLimitFailed = !function_exists('set_time_limit') || !@set_time_limit(0); if (is_callable($this->stream)) { $data = call_user_func($this->stream); f...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; /** * Respon<|fim_suffix|>/ interface ResponseFormatterInterface { /** * Formats the specified response. * @param Re...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ *<|fim_suffix|>m string|null $message error message * @param int $code error code * @param \Throwable|null $previous The previous exception used ...
fim
yiisoft/yii2
php
<|fim_suffix|>s as $key => $count) { if ($count > 0) { unset($counters[$key], $_SESSION[$key]); } elseif ($count == 0) { $counters[$key]++; } } $_SESSION[$this->flashParam] = $counters; } else { ...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; use SessionHandlerInterface; /** * SessionHandler implements an [[\SessionHandlerInterface]] for handling [[Session]] with custom...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; /** * SessionIterator implements an [[\Iterator|iterator]] for traversing session variables managed by [[Session]]. * * @author ...
fim
yiisoft/yii2
php
<|fim_prefix|><|fim_suffix|>framework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; /** * TooManyRequestsHttpException represents a "Too Many Requests" HTTP exception with status code 429. * * Use this exception to indicate that a cl...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; /** * UnauthorizedHttpException represents an "Unauthorized" HTTP exception with status code 401. * * Use this exception to indi...
fim
yiisoft/yii2
php
<|fim_suffix|>, $message, $code, $previous); } } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; /** * UnprocessableEntityHttpException represents an "Unprocessable Entity" H...
fim
yiisoft/yii2
php
<|fim_suffix|> * application does not understand. For example, you would throw this exception * if the client POSTs XML data to an action or controller that only accepts * JSON. * * @see https://tools.ietf.org/html/rfc7231#section-6.5.13 * @author Dan Schmidt <danschmidt5189@gmail.com> * @since 2.0 */ class Uns...
fim
yiisoft/yii2
php
<|fim_suffix|> false on failure * @since 2.0.32 */ protected function copyTempFile($targetFile) { $target = fopen($targetFile, 'wb'); if ($target === false) { return false; } $result = stream_copy_to_stream($this->_tempResource, $target); @fclose($t...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; use Yii; use yii\base\Component; use yii\base\InvalidConfigException; use yii\caching\CacheInterface; use yii\di\Instance; use yii\...
fim
yiisoft/yii2
php
<|fim_suffix|>ching route does not exist. */ public function normalizeRoute($route) { if ($this->action === null) { return $route; } elseif ($this->action === static::ACTION_REDIRECT_PERMANENT || $this->action === static::ACTION_REDIRECT_TEMPORARY) { throw new UrlNor...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; /** * UrlNormalizerRedirectException represents an information for redirection which should be * performed during the URL normali...
fim
yiisoft/yii2
php
<|fim_suffix|>his->host . '/' . $this->pattern, '/'); } elseif ($this->pattern === '') { $this->_template = ''; $this->pattern = '#^$#u'; return; } elseif (($pos = strpos($this->pattern, '://')) !== false) { if (($pos2 = strpos($this->pattern, '/', $pos +...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; /** * UrlRuleInterface is the interface that should be implemented by URL rule classes. * * @author Qiang Xue <qiang.xue@gmail.c...
fim
yiisoft/yii2
php
<|fim_suffix|> the event is triggered. * @param T $identity the user identity information * @param bool $cookieBased whether the login is cookie-based * @param int $duration number of seconds that the user can remain in logged-in status. * If 0, it means login till the user closes the browser or the...
fim
yiisoft/yii2
php
<|fim_suffix|>f seconds that the user can remain in logged-in status. * If 0, it means login till the user closes the browser or the session is manually destroyed. */ public $duration; /** * @var bool whether the login or logout should proceed. * Event handlers may modify this property to de...
fim
yiisoft/yii2
php
<|fim_suffix|>ble. The name of variable will be * used as key, preventing duplicated variable names. * * @param string $name Name of the variable * @param array|string $value Value of the variable * @param int $position the position in a page at which the JavaScript variable should be inserted....
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; use Yii; use yii\base\Action; use yii\base\ViewNotFoundException; /** * ViewAction represents an action that displays a view acco...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\web; use DOMDocument; use DOMElement; use DOMException; use <|fim_suffix|>e = false; /** * @var DOMDocument the XML document, ...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://ww<|fim_suffix|>YiiAsset extends AssetBundle { public $sourcePath = '@yii/assets'; public $js = [ 'yii.js', ]; public $depends = [ 'yii\web\JqueryAsset', ]; } <|fim_middle|>w.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC...
fim
yiisoft/yii2
php
<|fim_suffix|>; } } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ use yii\db\Migration; /** * Initializes Session tables. * * @author Misbahul D Munir <misbahuldmunir@gmail.com> * @since 2...
fim
yiisoft/yii2
php
<?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\widgets; use Yii; use yii\base\Component; use yii\base\ErrorHandler; use yii\base\Model; use yii\helpers\ArrayHelper; use yii\helpers\Html; use yii\we...
fim
yiisoft/yii2
php
<|fim_suffix|>rmat = Response::FORMAT_JSON; * return ActiveForm::validateMultiple($models); * } * // ... respond to non-AJAX request ... * ``` * * @param array $models an array of models to be validated. * @param mixed $attributes list of attributes that should be validated. ...
fim
yiisoft/yii2
php
<|fim_prefix|><?ph<|fim_suffix|>ail.com> * @since 2.0 */ class ActiveFormAsset extends AssetBundle { public $sourcePath = '@yii/assets'; public $js = [ 'yii.activeForm.js', ]; public $depends = [ 'yii\web\YiiAsset', ]; } <|fim_middle|>p /** * @link https://www.yiiframework.com/ ...
fim
yiisoft/yii2
php
<|fim_suffix|> LinkSorter $class */ $class = ArrayHelper::remove($sorter, 'class', LinkSorter::className()); $sorter['sort'] = $sort; $sorter['view'] = $this->getView(); return $class::widget($sorter); } } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright...
fim
yiisoft/yii2
php
<|fim_suffix|> $this->view->blocks[$this->getId()] = $block; } } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\widgets; use yii\base\Widget; /** * Block records all output...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\widgets; use Yii; use yii\base\InvalidConfigException; use yii\base\Widget; use yii\helpers\ArrayHelper; use yii\helpers\Html; /** * B...
fim
yiisoft/yii2
php
<|fim_suffix|>ntent'] = ob_get_clean(); // render under the existing context echo $this->view->renderFile($this->viewFile, $params); } } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.y<|fim_middle|>iiframewor...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\widgets; use Yii; use yii\base\Arrayable; use yii\base\InvalidConfigException; use yii\base\Model; use yii\base\Widget; use yii\helpers\...
fim
yiisoft/yii2
php
<|fim_suffix|> * * ``` * [ * 'class' => 'yii\caching\DbDependency', * 'sql' => 'SELECT MAX(updated_at) FROM post', * ] * ``` * * would make the output cache depends on the last modified time of all posts. * If any post has its modification time changed, the cache...
fim
yiisoft/yii2
php
<|fim_suffix|>er 'name', or 'model' and 'attribute' properties must be specified."); } if (!isset($this->options['id'])) { $this->options['id'] = $this->hasModel() ? Html::getInputId($this->model, $this->attribute) : $this->getId(); } parent::init(); } /** * @re...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\widgets; use yii\base\InvalidConfigException; use yii\base\Widget; use yii\data\Pagination; use yii\helpers\ArrayHelper; use yii\helpers...
fim
yiisoft/yii2
php
<|fim_suffix|>y|null list of the attributes that support sorting. If not set, it will be determined * using [[Sort::attributes]]. */ public $attributes; /** * @var array HTML attributes for the sorter container tag. * @see \yii\helpers\Html::ul() for special attributes. * @see \yii\help...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\widgets; use Closure; use yii\helpers\ArrayHelper; use yii\helpers\Html; /** * The ListView widget is used to display data from data ...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\widgets; use yii\base\InvalidConfigException; use yii\helpers\Json; use yii\web\JsExpression; use yii\web\View; /** * MaskedInput gene...
fim
yiisoft/yii2
php
<?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\widgets; use yii\web\AssetBundle; /** * The asset bundle for the [[MaskedInput]] widget. * * Includes client assets of [jQuery input mask plugin](...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\widgets; use Closure; use Yii; use yii\base\Widget; use yii\helpers\ArrayHelper; use yii\helpers\Html; use yii\helpers\Url; /** * Menu...
fim
yiisoft/yii2
php
<|fim_suffix|> triggered. */ public $timeout = 1000; /** * @var bool|int how to scroll the page when pjax response is received. If false, no page scroll will be made. * Use a number if you want to scroll to a particular place. */ public $scrollTo = false; /** * @var array additi...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\widgets; use yii\web\AssetBundle; /** * This asset bundle provides the javascript files required by [[Pjax]] widget. * * @author Qia...
fim
yiisoft/yii2
php
<|fim_suffix|>eg_replace('/>\s+</', '><', ob_get_clean())); } } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www<|fim_middle|>.yiiframework.com/license/ */ namespace yii\widgets; use yii\base\Widget; /** * Spaceless widget...
fim
yiisoft/yii2
php
<?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ declare(strict_types=1); namespace yiiunit; use PHPUnit\Framework\Constraint\Constraint; use yii\helpers\VarDumper; /** * IsOneOfAssert asserts that the value is...
fim
yiisoft/yii2
php
<|fim_suffix|>T, $debug = false, $numberOfColumns = 80, $reverse = false ) { if ($out === null) { $out = STDOUT; } parent::__construct($out, $verbose, $colors, $debug, $numberOfColumns, $reverse); } public function flush(): void { if ...
fim
yiisoft/yii2
php
<|fim_suffix|>5#deprecate_reflectionsetaccessible // @link https://wiki.php.net/rfc/make-reflection-setaccessible-no-op if ($revoke && PHP_VERSION_ID < 80100) { $property->setAccessible(false); } return $result; } /** * Asserts that value is one of expected va...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ // ensure we get report on all possible php errors error_reporting(<|fim_suffix|>IR__ . '/../framework/Yii.php'; Yii::setAlias('@yiiunit', __DIR__); ...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license<|fim_suffix|>cord extends \yii\db\ActiveRecord { public static $db; public static function getDb() { return self::$db; } } <|fim_mid...
fim
yiisoft/yii2
php
<?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yiiunit\data\ar; /** * @property int $id * @property string $string_identifier */ class Alpha extends ActiveRecord { public static function tableNa...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ declare(strict_types=1); namespace yiiunit\data\ar; /** * Class Animal. * * @author Jose Lorente <jose.lorente.martin@gmail.com> * @property int ...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namesp<|fim_suffix|> { return $this->hasOne(Alpha::class, ['string_identifier' => 'alpha_string_identifier']); } } <|fim_middle|>ace yiiun...
fim
yiisoft/yii2
php
<?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yiiunit\data\ar; /** * @see https://github.com/yiisoft/yii2/issues/9006 * * @property int $id * @property int $val */ class BitValues extends ActiveR...
fim
yiisoft/yii2
php
<|fim_suffix|> */ public function getThrowable() { return 5 / 0; } } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @li<|fim_middle|>cense https://www.yiiframework.com/license/ */ declare(strict_types=1); namespace yiiunit\da...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yiiunit\data\ar; /** * Class Category. * * @property int $id * @property string $name * * @property-read Item[] $items * @property-re...
fim
yiisoft/yii2
php
<?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yiiunit\data\ar; /** * Model representing 2 columns from "type" table. * * @property int $int_col * @property int $int_col2 DEFAULT 1 */ class Croppe...
fim
yiisoft/yii2
php
<|fim_suffix|>on getOrderItems() { $rel = $this->hasMany(Item::class, ['id' => 'item_id']); return $rel->viaTable('order_item', ['order_id' => 'id'], function (ActiveQuery $q) { $q->viaTable('order', ['customer_id' => 'id']); })->orderBy('id'); } public function getOrde...
fim
yiisoft/yii2
php