更新标签
@access protected
@param  string $name 缓存标识
@return void
498363
protected function setTagItem(string $name): void
    {
        if (!empty($this->tag)) {
            foreach ($this->tag as $tag) {
                $tagName = $this->getTagKey($tag);
                $this->handler->sAdd($tagName, $name);
            }

            $this->tag = null;
        }
    }
603153
public function addPermission($name){
        if($name && in_array($name, self::$permissions)){
            $this->data['permissions'][] = array(
                'name' => $name
            ); 
        }
    }
1055273
public function flush($name)
    {
        if ((new SupportsCacheTags())->isSatisfiedBy($this->cache)) {
            $this->cache->tags(CacheKey::get($name))->flush();
        }
    }
138861
public function load($name)
    {
        $stall = $this->redis->get("bstall_{$name}");

        if(is_null($stall)) {
            $this->clean();
            $this->save($name);
        } else {
            $canvas = unserialize($stall);
            $this->canvas = $canvas;
        }
    }
390487
public final function renameColumn($column, $name)
    {
        $oldName = $column->getName();

        $this->requireColumn($oldName);
        $this->forbidColumn($name);

        $this->_renameColumn($column, $name);
        // Update column cache
        $this->_columns[$name] = $column;
        unset($this->_columns[$oldName]);
        $this->_updateConstraints($oldName, $name);
    }
1254965
public function update($name, $value)
    {

        $cookie_name = $this->getName($name);

        if (isset($_COOKIE[$cookie_name])) {

            $old_cookie_value = $this->authcode($_COOKIE[$cookie_name], 'DECODE', $this->_securekey);
            $old_cookie_value = $this->unpack($old_cookie_value);

            if (isset($old_cookie_value[1]) && $old_cookie_vlaue[1] > 0) { // 获取之前的过期时间

                $cookie_expire = $old_cookie_value[1];

                // 更新数据
                $cookie_value = $this->pack($value, $cookie_expire);
                $cookie_value = $this->authcode($cookie_value, 'ENCODE', $this->_securekey);

                if ($cookie_name && $cookie_value && $cookie_expire) {
                    setcookie($cookie_name, $cookie_value, $cookie_expire, '/');
                    return true;
                }
            }
        }
        return false;
    }
810453
public function delete($name)
    {
        $name = $this->parseName($name);
        ObjectArrayHelper::remove($this->data, $name);
        $this->isChanged = true;
    }
127862
public function refreshTableSchema($name)
    {
        $rawName = $this->getRawTableName($name);
        unset($this->_tableMetadata[$rawName]);
        $this->_tableNames = [];
        /* @var $cache CacheInterface */
        $cache = is_string($this->db->schemaCache) ? Zilf::$app->get($this->db->schemaCache, false) : $this->db->schemaCache;
        if ($this->db->enableSchemaCache && $cache instanceof CacheInterface) {
            $cache->delete($this->getCacheKey($rawName));
        }
    }
256923
public function set_name($name) {
        if ($this->state < self::STATE_BUILDING_DYNAMIC) {
            $this->update_user_visible();
        }
        $this->name = $name;
    }
1317804
public function delete($name)
    {
        if (file_exists(route()->com.$name)) {
            (new Files())->deleteDir(route()->com.$name);
        }
    }
1053274
private static function execTask($name)
	{
		$file = fopen(self::$lockFileName, 'w+');
		if(false === $file)
		{
			return;
		}
		flock($file,LOCK_EX);
		// 执行任务
		$className = $name . 'Task';
		require_once APP_TASK . $className . '.class.php';
		$className::exec();
		Config::set('Task.List.' . $name . '.LastRunTime',time());
		Config::save('Task');
		fclose($file);
		unlink(self::$lockFileName);
	}
586108
public function reset($name = null)
    {
        if ($name == null) {
            $this->data = array();
        } else {
            unset($this->data[$name]);
        }
    }
205209
public function reset($name = null) {
		if ($name === 'violations') {
			$this->_violations = array();
		} elseif ($name === 'warnings') {
			$this->_warnings = array();
		} else {
			$this->_violations = array();
			$this->_warnings = array();
		}
	}
223449
public function renameTable($name, $newName)
    {
        $tableDiff          = new TableDiff($name);
        $tableDiff->newName = $newName;
        $this->alterTable($tableDiff);
    }
528149
public function edit($name, $alias, $url): void
    {
        $this->name  = $name;
        $this->alias = $alias;
        $this->url   = $url;
        $this->updated_by = Yii::$app->user->identity->id;
    }
369382
public function setUsed($name)
    {
        $module = $this->findOrFail($name);

        $this->app['files']->put($this->getUsedStoragePath(), $module);
    }
1085272
public function clear($name)
    {
        if (!in_array($name, $this->clearedCookies, true)) {
            $this->clearedCookies[] = $name;
            foreach ($this->cookies as $index => $value) {
                if ($value->getName() === $name) {
                    unset($this->cookies[$index]);
                }
            }
            $this->cookies = array_values($this->cookies);
        }
    }