删除缓存结果.

@param string $class
@param mixed  $id
515612
public function remove($class, array $id)
    {
        if (!$this->isEnabled()) {
            return false;
        }

        $key = self::key($class, $id);
        unset($this->members[$key]);
    }
353662
public function render($src, $class = '', $id = '', array $attrs = array())
    {
        $attrs = array_merge(array(
            'frameborder' => 0,
            'content'     => null,
            'tag'         => 'iframe',
            'src'         => Str::trim($src)
        ), $attrs);

        $attrs   = $this->_cleanAttrs($attrs);
        $content = $attrs['content'];
        unset($attrs['content']);

        return Html::_('tag')->render($content, Str::trim($class), Str::trim($id), $attrs);
    }
345266
public function set($object, $id = null)
    {
        if (is_array($object)) {
            return $this->setAll($object);
        }

        $this->objects[$object] = $id;
    }
222269
public function getClass($id)
    {
        return isset($this->classes[$id]) ? $this->classes[$id] : null;
    }
975926
public function set($id, $definition)
	{
	    if (is_numeric($id)) {
	        $id = is_string($definition) ? $definition : $definition['class'];
	    }
	    $this->_definitions[$id] = $definition;
	    return $this;
	}
592772
public static function delete_by_id($className, $id)
    {
        $obj = DataObject::get_by_id($className, $id);
        if ($obj) {
            $obj->delete();
        } else {
            user_error("$className object #$id wasn't found when calling DataObject::delete_by_id", E_USER_WARNING);
        }
    }
1070197
protected function setId(Identifier $id, Model $model): void
    {
        $prop = new ReflectionProperty(get_class($model), 'id');
        $prop->setAccessible(true);
        $prop->setValue($model, $id);
    }
1079339
public function removeClass($id)
    {
        if (isset($this->classes[$id])) {
            unset($this->classes[$id]);
        }
        if (isset($this->items[$id])) {
            unset($this->items[$id]);
        }
        return $this;
    }
1125262
public function findById($class, $id) {
        $mapper = MapperBuilder::buildFromMapping($this->mapping, $class);

        $newEntity = NULL;

        $query = "SELECT * FROM `" . $mapper->getTable() . "` WHERE id='$id'";
        $result = $this->conn->executeQuery($query);

        if ($result) {
            $class = $mapper->getClass();
            $newEntity = new $class();
            $this->populateEntity($newEntity, $result[0], $mapper);

            // populate relations
            foreach ($mapper->getRelations() as $relation) {

                $relMapper = MapperBuilder::buildFromName($this->mapping, $relation->getEntity());
                $queryRel = $this->buildSelectRelation($newEntity, $mapper, $relation, $relMapper);
                $resRel = $this->conn->executeQuery($queryRel);

                $classRel = $relMapper->getClass();
                $method = "set" . $relation->getName();
                if ($resRel) {
                    foreach ($resRel as $row) {
                        $newEntityRel = new $classRel();
                        $this->populateEntity($newEntityRel, $row, $relMapper, $relation->getForeignColumn());
                        $array[] = $newEntityRel;
                    }
                    $newEntity->$method($array);
                }
            }
        }
        return $newEntity;
    }
173666
public function grid_start($id = null, $class = null) {
        $gridclass = 'grid-start grid-row-r d-flex flex-wrap row';
        if (is_null($class)) {
            $class = $gridclass;
        } else {
            $class .= ' ' . $gridclass;
        }
        $attributes = array();
        if (!is_null($id)) {
            $attributes['id'] = $id;
        }
        return html_writer::start_div($class, $attributes);
    }
1105166
public static function observe($class)
    {
        foreach (static::$observe as $event) {
            $eventFuncName = Db::parseName($event, 1, false);

            if (method_exists($class, $eventFuncName)) {
                static::event($event, [$class, $eventFuncName]);
            }
        }
    }
915895
public function render($content, $class = '', $id = '', array $attrs = array())
    {
        $attrs = $this->_setId($attrs, $id);
        $attrs = $this->_cleanAttrs($attrs);

        if (!empty($class)) {
            $attrs = $this->_normalizeClassAttr($attrs, $class);
        }

        $tag = $this->_tag;
        if (Arr::key('tag', $attrs)) {
            $tag = $attrs['tag'];
            unset($attrs['tag']);
        }

        $format = (!empty($attrs)) ? '<%s %s>%s</%s>' : '<%s%s>%s</%s>';
        $output = sprintf($format, $tag, $this->buildAttrs($attrs), $content, $tag);

        return $output;
    }
1231499
private function securityMapCheck($route, $class, $method)
    {
        if ($this->enableSecurityMap) {
            $mapConfig = static::getCommonConfigVar('map');

            if (!isset($mapConfig[$route])) {
                unset($mapConfig);
                throw new \Exception("Error: $route in map config undefined ", 500);
            }
            $srvMapConfig = $mapConfig[$route];
            //var_dump($srvMapConfig,$class,$method);
            if (!empty($this->mod) && $this->mod != 'api') {
                $class = $this->mod . '.' . $class;
            }
            if (!isset($srvMapConfig[$class])) {
                unset($mapConfig);
                throw new \Exception("Error: {$route} {$class} in map config undefined ", 501);
            }

            // v($srv_map_config);
            unset($mapConfig);
            if ($srvMapConfig[$class] == '*' || empty($srvMapConfig[$class])) {
                // 可以继续
            } else {
                // 否则被禁止调用
                if (!in_array($method, $srvMapConfig[$class])) {
                    throw new \Exception("Error: {$this->cmd} access forbidden ", 503);
                }
            }
        }
    }
183153
protected <T> void remove(Class<T> entityClass, Object id)
    {
        remove(entityClass, id, Boolean.TRUE);
    }
352844
final public function set(string $id, string $class = null): ServiceConfigurator
    {
        $this->__destruct();

        return $this->parent->set($id, $class);
    }
740696
protected function setClass($class): void
    {
        // @todo fix logic about storing the classname
        $this->className = $class;
        if (is_object($class)) {
            $this->className = get_class($class);
        }
        $this->class = new ReflectionClass($class);
    }
502770
public function setClass($identifier, $class)
    {
        $class      = trim($class);
        $identifier = (string) $identifier;

        $this->_classes[$identifier] = $class;

        return $this;
    }