Load the tool consumer from the database.

@param string  $key        The consumer key value
@param boolean $autoEnable True if the consumer should be enabled (optional, default if false)

@return boolean True if the consumer was successfully loaded
10831
private function load($key, $autoEnable = false)
    {
        $this->initialise();
        $this->key = $key;
        $ok = $this->storage->toolConsumerLoad($this);
        if (!$ok) {
            $this->enabled = $autoEnable;
        }

        return $ok;
    }
378534
public static function get($key=null,$default=null){
    return $key ? (filter_input(INPUT_GET,$key) ?: (is_callable($default)?call_user_func($default):$default)) : $_GET;
  }
645042
public function get($key, $default = null)
    {
        is_array($key)
            ? self::validateKeys($key)
            : self::validateKey($key);

        $this->queriesCount++;

        return ($tmp = $this->memcache->get($key)) === false
            ? false
            : unserialize($tmp);
    }
374686
public function get($key)
    {
        $this->init();
        $result = $this->driver->get($key);
        return $this->convertFalseToNull($result);
    }
1357037
public function fromQuery(Builder $builder, string $name, string $key = null): self
    {
        $key = $key ?? $builder->getModel()->getKeyName();

        return $this->setFromEloquent($builder, $name, $key);
    }
1282851
public function input($key, $default = false)
    {
        $this->populateInput();

        if (isset($this->input[$key])) {
            return $this->input[$key];
        }

        return $default;
    }
931448
public function register($key, $callable)
	{
		if (!$this->has($key) && is_callable($callable))
		{
			self::$registry[$key] = $callable;
			return true;
		}

		return false;
	}
217758
public static function selectDatabase($key) {
		if (self::$currentDB===$key) return false;
		self::configureFacadeWithToolbox(self::$toolboxes[$key]);
		self::$currentDB = $key;
		return true;
	}
939047
@Transactional(readOnly = true)
    public Object load(Object key) {
        List<T> results = getJdbcTemplate().query(
                getSelectSql(), getRowMapper(), getPrimaryKeyComponents(key));
        return results.size() == 0 ? null : results.get(0);
    }
956274
public function incr($key)
    {
        if ($this->isMappedKey($key)) {
            return false;
        }
        return $this->getDriver()->incr($key);
    }
425985
private function interactiveConsumersControlPanel_loadConsumer($key = null)
    {
        /*
         * load an existing consumer (if we have a consumer_key) or create a blank
         * that we will fill in
         */
        $consumer = new LTI_Tool_Consumer(
            (empty($key) ? LTI_Data_Connector::getRandomString(32) : $key),
            $this->getToolProvider()->data_connector,
            true // wicked confusing _not_ to autoenable
        );

        /* pre-fill secret if not editing an existing consumer */
        if (empty($key)) {
            $consumer->secret = LTI_Data_Connector::getRandomString(32);
        }

        return $consumer;
    }
383848
public static function import($key, $base = null)
    {
        foreach (self::$importIgnoreList as $item) {
            if (strpos($key, $item) === 0) {
                return true;
            }
        }

        $class = self::getClassByKey($key);
        $class = strtolower($class);
        if ($base === null) {
            $searchPaths = self::$instance->getLibrarySearchPaths();
            foreach ($searchPaths as $searchPath) {
                if (parent::import($key, $searchPath)) {
                    self::injectStaticDependencies($class);
                    return true;
                }
                unset(self::$imported[$key]);
            }
            self::$imported[$key] = false;

            return false;
        }

        return parent::import($key, $base);
    }
523326
function load($key): bool {
    $cacheKey = [__CLASS__, $key];
    $viewRenderer = $this->viewRenderer;

    /** @var \yii\caching\Cache $cache */
    $cache = $viewRenderer->cache;
    if (!$viewRenderer->enableCaching || !$cache->exists($cacheKey)) return false;

    eval("?>{$cache->get($cacheKey)}");
    return true;
  }
1077057
public function get($key, $default = null)
    {
        // Veriifcar se deve carregar
        if (! is_array($key)) {
            $this->loadKey($key);
        }

        // Retornar key
        return parent::get($key, $default);
    }
114542
public function get($key, $default = null)
    {
        return array_key_exists($key, $this->consumers) ? $this->consumers[$key] : $default;
    }
93468
public function getItem($key)
    {
        if (!$this->getOptions()->getEnabled()) {
            return null;
        }

        $this->normalizeKey($key);

        $result = null;
        try {
            $result = $this->internalGetItem($key);
        } catch (\Exception $e) {
        }

        return $result;
    }
875921
public function load($key, &$loaded) {
    $file = $this->getFile($this->getKey($key));
    if ($this->validate($file)) {
      $loaded = TRUE;
      
      return $this->direct ? $file : $file->getContents();
    }
    $loaded = FALSE;
  }