text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_suffix|>asePath" property must be set.'); } $pathMap = [Yii::$app->getBasePath() => [$basePath]]; } $path = FileHelper::normalizePath($path); foreach ($pathMap as $from => $tos) { $from = FileHelper::normalizePath(Yii::getAlias($from)) . DIRECTORY_SEPARA...
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\base; /** * UnknownClassException represe<|fim_suffix|>@return string the user-friendly name of this exception */ public funct...
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\base; /** * UnknownMethodException represents an exception caused by accessing an unknown object method. * * @author Qiang Xue <qiang...
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\base; /** * Unkn<|fim_suffix|>operties. * * @author Qiang Xue <qiang.xue@gmail.com> * @since 2.0 */ class UnknownPropertyException ...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link<|fim_suffix|>ht (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; /** * UserException is the base class for exceptions that are meant to be shown to end users. * Such exceptions are often caused by mistakes of end users. * * @auth...
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\base; use Yii; use yii\helpers\FileHelper; use yii\widgets\Block; use yii\widgets\ContentDecorator; use yii\widgets\FragmentCache; /** ...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.co<|fim_suffix|>textInterface { /** * @return string the view path that may be prefixed to a relative view name. */ public function getViewPath(); } <|...
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\base; /** * ViewEvent represents events triggered by the [[View]] component. * * @author Qiang Xue <qiang.xue@gmail.com> * @since 2....
fim
yiisoft/yii2
php
<|fim_suffix|>tException { /** * @return string the user-friendly name of this exception */ public function getName() { return 'View not Found'; } } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2<|fim_middle|>008 Yii Software LLC * @licen...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Softw<|fim_suffix|> Qiang Xue <qiang.xue@gmail.com> * @since 2.0 */ abstract class ViewRenderer extends Component { /** * Renders a view file. * * This method is invoked by [[View]] whenever it trie...
fim
yiisoft/yii2
php
<|fim_suffix|> } catch (\Throwable $e) { // close the output buffer opened above if it has not been closed already if (ob_get_level() > 0) { ob_end_clean(); } throw $e; } return ob_get_clean() . $out; } private $_id; /**...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework<|fim_suffix|>etra.barus@gmail.com> * @since 2.0.11 */ class WidgetEvent extends Event { /** * @var mixed the widget result. Event handlers may modify this property to change the widget result. */ public $result; /** * @var bool whet...
fim
yiisoft/yii2
php
<|fim_suffix|>her to skip this behavior when the `$owner` has not been * modified * @since 2.0.8 */ public $skipUpdateOnClean = true; /** * @var bool whether to preserve non-empty attribute values. * @since 2.0.13 */ public $preserveNonEmptyValues = false; /** * {@in...
fim
yiisoft/yii2
php
<|fim_suffix|> */ public function beforeSave($event) { $this->typecastAttributes(); } /** * Handles owner 'afterInsert' and 'afterUpdate' events, ensuring attribute typecasting. * @param \yii\base\Event $event event instance. * @since 2.0.14 */ public function afterSa...
fim
yiisoft/yii2
php
<|fim_suffix|>$owner` has not been modified */ public $skipUpdateOnClean = true; /** * @var bool whether to preserve non-empty attribute values. */ public $preserveNonEmptyValues = false; /** * {@inheritdoc} */ public function events() { return array_fill_keys(...
fim
yiisoft/yii2
php
<|fim_suffix|> */ public $value; /** * @var mixed Default value for cases when the user is guest * @since 2.0.14 */ public $defaultValue; /** * {@inheritdoc} */ public function init() { parent::init(); if (empty($this->attributes)) { $...
fim
yiisoft/yii2
php
<|fim_suffix|> `Widget::EVENT_BEFORE_RUN` event. */ public function beforeRun($event) { $cacheKey = $this->getCacheKey(); $fragmentCacheConfiguration = $this->getFragmentCacheConfiguration(); if (!$this->owner->view->beginCache($cacheKey, $fragmentCacheConfiguration)) { ...
fim
yiisoft/yii2
php
<|fim_suffix|> $input = $formValue ?: $request->getBodyParam($lock); $isValid = $input && (new NumberValidator())->validate($input); return $isValid ? $input : 0; } return parent::getValue($event); } /** * Upgrades the version value by one and stores it t...
fim
yiisoft/yii2
php
<|fim_suffix|>enerator)) { return call_user_func($this->uniqueSlugGenerator, $baseSlug, $iteration, $this->owner); } return $baseSlug . '-' . ($iteration + 1); } /** * Checks if $slugPart is empty string or null. * * @param string $slugPart One of attributes that is ...
fim
yiisoft/yii2
php
<|fim_suffix|>.0.6). */ public function touch($attribute) { /** @var BaseActiveRecord $owner */ $owner = $this->owner; if ($owner->getIsNewRecord()) { throw new InvalidCallException('Updating the timestamp is not possible on a new record.'); } $owner->upd...
fim
yiisoft/yii2
php
<|fim_suffix|>[serializer]], * it could be something else. * @param int $duration the number of seconds in which the cached value will expire. 0 means never expire. * @return bool true if the value is successfully stored into cache, false otherwise */ protected function addValue($key, $value, $d...
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\caching; /** * ArrayCache provides caching for the current request only by storing the values in an array. * * See [[Cache]] for comm...
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\caching; use Yii; use yii\base\Component; use yii\helpers\StringHelper; /** * Cache is the base class for cache classes supporting dif...
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\caching; /** * CacheInterface is the base interface for cache. * * A data item can be stored in the cache by calling [[set()]] and be...
fim
yiisoft/yii2
php
<|fim_suffix|> callback that will be called to determine if the dependency has been changed. */ public $callback; /** * Generates the data needed to determine if dependency has been changed. * This method returns the result of the callback function. * @param CacheInterface $cache the cache...
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\caching; <|fim_suffix|>iew). * * @author Qiang Xue <qiang.xue@gmail.com> * @since 2.0 */ class ChainedDependency extends Dependency {...
fim
yiisoft/yii2
php
<|fim_suffix|>ion */ protected function deleteValue($key) { $this->db->noCache(function (Connection $db) use ($key) { $db->createCommand() ->delete($this->cacheTable, ['id' => $key]) ->execute(); }); return true; } /** * Rem...
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\caching; use yii\base\InvalidConfigException; use yii\db\Connection; use yii\di\Instance; /** * DbDependency represents a dependency b...
fim
yiisoft/yii2
php
<|fim_suffix|> - [[QueryInterface::one()]] will be used. */ public $method; /** * Generates the data needed to determine if dependency is changed. * * This method returns the query result. * @param CacheInterface $cache the cache component that is currently evaluating this dependency ...
fim
yiisoft/yii2
php
<|fim_suffix|>ableData[$hash]; } else { $this->data = $this->generateDependencyData($cache); } } /** * Returns a value indicating whether the dependency has changed. * @deprecated since version 2.0.11. Will be removed in version 2.1. Use [[isChanged()]] instead. * @pa...
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\caching; /** * DummyCache is a placeholder cache component. * * DummyCache does not cache anything. It is provided so that one can al...
fim
yiisoft/yii2
php
<|fim_suffix|>e data needed to determine if dependency has been changed. */ protected function generateDependencyData($cache) { return eval("return {$this->expression};"); } } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @l...
fim
yiisoft/yii2
php
<|fim_suffix|>* Stores a value identified by a key in cache. * This is the implementation of the method declared in the parent class. * * @param string $key the key identifying the value to be cached * @param string $value the value to be cached. Other types (If you have disabled [[serializer]]) una...
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\caching; use Yii; use yii\base\InvalidConfigException; /** * FileDependency represents a dependency based on a file's last modificatio...
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\caching; use Yii; use yii\base\InvalidConfigException; /** * MemCache implements a cache application component based on [memcache](htt...
fim
yiisoft/yii2
php
<|fim_suffix|> @var int memcache server port */ public $port = 11211; /** * @var int probability of using this server among all servers. */ public $weight = 1; /** * @var bool whether to use a persistent connection. This is used by memcache only. */ public $persistent = true...
fim
yiisoft/yii2
php
<|fim_suffix|> $keys[] = $cache->buildKey([__CLASS__, $tag]); } return $cache->multiGet($keys); } } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\cach...
fim
yiisoft/yii2
php
<|fim_suffix|>ed keys */ protected function addValues($data, $duration) { return wincache_ucache_add($data, null, $duration); } /** * Deletes a value with the specified key from cache * This is the implementation of the method declared in the parent class. * @param string $k...
fim
yiisoft/yii2
php
<|fim_suffix|>ENGINE=InnoDB'; } $this->createTable($cache->cacheTable, [ 'id' => $this->string(128)->notNull(), 'expire' => $this->integer(), 'data' => $this->binary(), 'PRIMARY KEY ([[id]])', ], $tableOptions); } /** * {@inherit...
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\captcha; use yii\base\InvalidConfigException; use yii\helpers\Html; use yii\helpers\Json; use yii\helpers\Url; use yii\widgets\InputWidg...
fim
yiisoft/yii2
php
<|fim_suffix|>cyRice.ttf'; /** * @var string|null the fixed verification code. When this property is set, * [[getVerifyCode()]] will always return the value of this property. * This is mainly used in automated tests where we want to be able to reproduce * the same verification code each time we ...
fim
yiisoft/yii2
php
<|fim_suffix|>provides the javascript files needed for the [[Captcha]] widget. * * @author Qiang Xue <qiang.xue@gmail.com> * @since 2.0 */ class CaptchaAsset extends AssetBundle { public $sourcePath = '@yii/assets'; public $js = [ 'yii.captcha.js', ]; public $depends = [ 'yii\web\Yii...
fim
yiisoft/yii2
php
<|fim_suffix|> route specified by [[captchaAction]]. * @return CaptchaAction the action object * @throws InvalidConfigException */ public function createCaptchaAction() { $ca = Yii::$app->createController($this->captchaAction); if ($ca !== false) { /** @var Controller ...
fim
yiisoft/yii2
php
<|fim_suffix|>pgsql/ArrayExpressionBuilder.php', 'yii\db\pgsql\ArrayParser' => YII2_PATH . '/db/pgsql/ArrayParser.php', 'yii\db\pgsql\ColumnSchema' => YII2_PATH . '/db/pgsql/ColumnSchema.php', 'yii\db\pgsql\JsonExpressionBuilder' => YII2_PATH . '/db/pgsql/JsonExpressionBuilder.php', 'yii\db\pgsql\QueryBuilder' ...
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\console; use Yii; use yii\base\InvalidRouteException; use yii\base\Module; // define STDIN, STDOUT and STDERR if the PHP SAPI did not d...
fim
yiisoft/yii2
php
<|fim_suffix|>ction->id]; } /** * Parses the comment block into tags. * @param \ReflectionClass<object>|\ReflectionProperty|\ReflectionFunctionAbstract $reflection the comment block * @return array the parsed tags */ protected function parseDocCommentTags($reflection) { $com...
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\console; use Yii; use yii\base\ErrorException; use yii\base\UserException; use yii\helpers\Console; /** * ErrorHandler handles uncaught PHP errors a...
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\console; use yii\base\UserException; /** * Exception represents an exception caused by incorrect usage of a console command. * * @author Qiang Xue...
fim
yiisoft/yii2
php
<|fim_suffix|>blems, which should use NOINPUT or * CANTCREAT, but rather for higher level permissions. */ public const NOPERM = 77; /** * Something was found in an unconfigured or misconfigured state. */ public const CONFIG = 78; /** * @var array a map of reason descriptions for...
fim
yiisoft/yii2
php
<|fim_suffix|>otected function renderInlineCode($element) { return Console::ansiFormat($element[1], [Console::UNDERLINE]); } /** * Renders empathized elements. * @param array $element * @return string */ protected function renderEmph($element) { return Console::a...
fim
yiisoft/yii2
php
<|fim_suffix|>[2]) ? $matches[2] : true; $prevOption = &$params['_aliases'][$name]; } } elseif ($prevOption === true) { // `--option value` syntax $prevOption = $param; } else { $params[] = $param; } ...
fim
yiisoft/yii2
php
<|fim_suffix|>uthor Qiang Xue <qiang.xue@gmail.com> * @since 2.0 */ class Response extends \yii\base\Response { } <|fim_prefix|><?php /** * @link htt<|fim_middle|>ps://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\console...
fim
yiisoft/yii2
php
<|fim_suffix|> } // calculate the Levenshtein distance between the unknown command and all available commands. $distances = array_map(function ($action) use ($command) { $action = strlen($action) > 255 ? substr($action, 0, 255) : $action; $command = strlen($command) > 255 ? su...
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\console\controllers; use Yii; use yii\console\Application; use yii\console\Controller; use yii\console\Exception; use yii\console\ExitCode; use yii\he...
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\console\controllers; use Yii; use yii\base\Action; use yii\base\BaseObject; use yii\base\InvalidConfigException; use yii\base\NotSupportedException; u...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copy<|fim_suffix|>nterface; use yii\console\Application; use yii\console\Controller; use yii\console\Exception; use yii\console\ExitCode; use yii\helpers\Console; /** * Allows you to flush cache. * * see list of available components to flush: * *...
fim
yiisoft/yii2
php
<|fim_suffix|>is->namespace . '". Please, check your FixtureController::namespace parameter'); } } } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\console\controllers; us...
fim
yiisoft/yii2
php
<|fim_suffix|>dout("\nTo see the help of each command, enter:\n", Console::BOLD); $this->stdout("\n $scriptName " . $this->ansiFormat('help', Console::FG_YELLOW) . ' ' . $this->ansiFormat('<command-name>', Console::FG_CYAN) . "\n\n"); } /** * Displays the overall information of the co...
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\console\controllers; use Yii; use yii\console\Application; use yii\console\Controller; use yii\console\Exception; use yii\console\ExitCo...
fim
yiisoft/yii2
php
<|fim_suffix|>ment for the table being created. * @since 2.0.14 */ public $comment = ''; /** * {@inheritdoc} */ public function options($actionID) { return array_merge( parent::options($actionID), ['migrationTable', 'db'], // global for all actions ...
fim
yiisoft/yii2
php
<|fim_suffix|>is->docroot); $router = $this->router !== null ? Yii::getAlias($this->router) : null; if (strpos($address, ':') === false) { $address = $address . ':' . $this->port; } if (!is_dir($documentRoot)) { $this->stdout("Document root \"$documentRoot\" doe...
fim
yiisoft/yii2
php
<|fim_suffix|>chars[self::CHAR_LEFT], $this->chars[self::CHAR_MIDDLE], $this->chars[self::CHAR_RIGHT] ); } // Content foreach ($this->rows as $i => $row) { if ($i > 0 || $headerCount > 0) { $buffer .= $this->renderSeparator...
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\data; /** * ActiveDataFilter allows composing a filtering condition in a format suitable for [[\yii\db\QueryInterface::where()]]. * *...
fim
yiisoft/yii2
php
<|fim_suffix|>his->query; return (int) $query->limit(-1)->offset(-1)->orderBy([])->count('*', $this->db); } /** * {@inheritdoc} */ public function setSort($value) { parent::setSort($value); if ($this->query instanceof ActiveQueryInterface && ($sort = $this->getSort()) ...
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\data; use yii\helpers\ArrayHelper; /** * ArrayDataProvider implements a data provider based on a data array. * * The [[allModels]] 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\data; use Yii; use yii\base\Component; use yii\base\InvalidArgumentException; /** * BaseDataProvider provides a base class that implem...
fim
yiisoft/yii2
php
<|fim_suffix|>Name, $this->parseErrorMessage('operatorRequireAttribute', ['operator' => $operator])); return; } $internalOperator = $this->filterControls[$operator]; // check operator type : $operatorTypes = $this->operatorTypes[$internalOperator]; if ($operatorType...
fim
yiisoft/yii2
php
<|fim_suffix|>tified by the corresponding key value in this array. */ public function getKeys(); /** * @return Sort|false the sorting object. If this is false, it means the sorting is disabled. */ public function getSort(); /** * @return Pagination|false the pagination object. If t...
fim
yiisoft/yii2
php
<|fim_suffix|>age index. * @see params */ public $pageParam = 'page'; /** * @var string name of the parameter storing the page size. * @see params */ public $pageSizeParam = 'per-page'; /** * @var bool whether to always have the page parameter in the URL created by [[create...
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\data; use Yii; use yii\base\BaseObject; use yii\base\InvalidConfigException; use yii\helpers\Html; use yii\helpers\Inflector; use yii\we...
fim
yiisoft/yii2
php
<|fim_suffix|>otalCount() { return (new Query([ 'from' => ['sub' => "({$this->sql})"], 'params' => $this->params, ]))->count('*', $this->db); } } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license ...
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\db; use yii\base\InvalidConfigException; /** * ActiveQuery represents a DB query associated with an Active Record class. * * An Acti...
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\db; /** * ActiveQueryInterface defines the common interface to be implemented by active record query classes. * * That are methods for either norma...
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\db; /** * ActiveQueryTrait implements the common methods and properties for active record query classes. * * @author Qiang Xue <qiang...
fim
yiisoft/yii2
php
<|fim_suffix|>e()]] when `$runValidation` is `true`. If [[beforeValidate()]] * returns `false`, the rest of the steps will be skipped; * 2. call [[afterValidate()]] when `$runValidation` is `true`. If validation * failed, the rest of the steps will be skipped; * 3. call [[beforeSave()]]. If [[...
fim
yiisoft/yii2
php
<|fim_suffix|>o [[getIsNewRecord()|new]] records are considered to be not equal. * @param static $record record to compare to * @return bool whether the two active records refer to the same row in the same database table. */ public function equals($record); /** * Returns the relation object...
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\db; use yii\base\InvalidArgumentException; use yii\base\InvalidConfigException; /** * ActiveRelationTrait implements the common method...
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\db; use yii\base\Event; /** * AfterSaveEvent represents the information available in [[ActiveRecord::EVENT_AFTER_INSERT]] and [[Active...
fim
yiisoft/yii2
php
<|fim_suffix|>t as an integer. * </p> * <p> * The return value is cast to an integer. * @since 2.0.14 */ #[\ReturnTypeWillChange] public function count() { return count($this->value); } /** * Retrieve an external iterator * * @link https://www.php.net...
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\db; use Yii; use yii\base\InvalidArgumentException; use yii\base\InvalidCallException; use yii\base\InvalidConfigException; use yii\base...
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\db; use yii\base\Component; /** * BatchQueryResult represents a batch query from which you can retrieve data in batches. * * You usu...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /<|fim_suffix|>able `CHECK` constraint. * * @author Sergey Makinen <sergey@makinen.ru> * @since 2.0.13 */ class CheckConstraint extends Constraint { /** * @var string the SQL of the `CHECK` constraint. */ public $expression; } <|fim_middle|>** * @link https://www.yiiframework...
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\db; use yii\base\BaseObject; use yii\helpers\StringHelper; /** * ColumnSchema class describes the metadata of a column in a database t...
fim
yiisoft/yii2
php
<|fim_suffix|>column. * @return string returns 'NOT NULL' if [[isNotNull]] is true, * 'NULL' if [[isNotNull]] is false or an empty string otherwise. */ protected function buildNotNullString() { if ($this->isNotNull === true) { return ' NOT NULL'; } elseif ($this->isNot...
fim
yiisoft/yii2
php
<|fim_suffix|>e 2.0.14 */ public function dropView($viewName) { $sql = $this->db->getQueryBuilder()->dropView($viewName); return $this->setSql($sql)->requireTableSchemaRefresh($viewName); } /** * Executes the SQL statement. * This method should only be used for executing...
fim
yiisoft/yii2
php
<|fim_suffix|>" . '_slave']); unset($fields["\000" . __CLASS__ . "\000" . '_transaction']); unset($fields["\000" . __CLASS__ . "\000" . '_schema']); return array_keys($fields); } /** * Reset the connection after cloning. */ public function __clone() { parent::...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ <|fim_suffix|>s the metadata of a table constraint. * * @author Sergey Makinen <sergey@makinen.ru> * @since 2.0.13 */ class Constraint extends BaseObject { /** * @var string[]|null list of column names the constraint belongs to. */ 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\db; /** * ConstraintFinderInterface defines methods for getting a table constraint information. * * @author Sergey Makinen <sergey@ma...
fim
yiisoft/yii2
php
<|fim_suffix|>tains the unique constraints information for the named table. * @param string $name table name. The table name may contain schema name if any. Do not quote the table name. * @param bool $refresh whether to reload the information even if it is found in the cache. * @return Constraint[] table...
fim
yiisoft/yii2
php
<|fim_suffix|>etchObject($className, $fields); } /** * Reads the whole result set into an array. * @return array the result set (each array element represents a row of data). * An empty array will be returned if the result contains no row. */ public function readAll() { retu...
fim
yiisoft/yii2
php
<|fim_suffix|>lass DefaultValueConstraint extends Constraint { /** * @var mixed default value as returned by the DBMS. */ public $value; } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license http<|fim_middle|>s://www.yiiframewor...
fim
yiisoft/yii2
php
<|fim_suffix|>xception { /** * @var array the error info provided by a PDO exception. This is the same as returned * by [PDO::errorInfo](https://www.php.net/manual/en/pdo.errorinfo.php). */ public $errorInfo = []; /** * Constructor. * @param string $message PDO error message ...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyrig<|fim_suffix|>ession. */ public function __toString() { return $this->expression; } } <|fim_middle|>ht Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\db; /** * ...
fim
yiisoft/yii2
php
<|fim_suffix|> */ class ExpressionBuilder implements ExpressionBuilderInterface { use ExpressionBuilderTrait; /** * {@inheritdoc} * @param Expression|ExpressionInterface $expression the expression to be built */ public function build(ExpressionInterface $expression, array &$params = []) ...
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\db; /** * Interface ExpressionBuilderInterface is designed to build raw SQL from specific expression * objects that implement [[ExpressionInterface]...
fim
yiisoft/yii2
php
<|fim_suffix|>s->queryBuilder = $queryBuilder; } } <|fim_prefix|><?php <|fim_middle|>/** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\db; /** * Trait ExpressionBuilderTrait provides common constructor...
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 y<|fim_suffix|>nterface { } <|fim_middle|>ii\db; /** * Interface ExpressionInterface should be used to mark classes, that should be built ...
fim
yiisoft/yii2
php
<|fim_suffix|>nSchemaName; /** * @var string referenced table name. */ public $foreignTableName; /** * @var string[] list of referenced table column names. */ public $foreignColumnNames; /** * @var string|null referential action if rows in a referenced table are to be update...
fim
yiisoft/yii2
php
<|fim_suffix|>or Sergey Makinen <sergey@makinen.ru> * @since 2.0.13 */ class IndexConstraint extends Constraint { /** * @var bool whether the index is unique. */ public $isUnique; /** * @var bool whether the index was created for a primary key. */ public $isPrimary; } <|fim_prefix|...
fim
yiisoft/yii2
php
<|fim_suffix|> * @return string the user-friendly name of this exception */ public function getName() { return 'Integrity constraint violation'; } } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yii...
fim
yiisoft/yii2
php