getProfile

@param string  $type
@param integer $key

@return  string
4226
protected static function getProfile($type, $key = null)
    {
        $type = strtolower($type);

        if (array_key_exists($type, static::$typeDefinitions)) {
            return static::$typeDefinitions[$type][$key];
        }

        if (array_key_exists($type, self::$typeDefinitions)) {
            return self::$typeDefinitions[$type][$key];
        }

        return null;
    }
1035777
public function getProfileFromWatson()
    {
        // We have the request in cache and cache is on.
        if ($this->cacheIsOn() && $this->cache->has($this->getContainer()->getCacheKey())) {
            // Return results from cache.
            return $this->cache->get($this->getContainer()->getCacheKey());
        }

        // Send Request to Watson.
        $response = $this->sendRequest();

        // Decode and map onto Object.
        /** @var Profile $profile */
        $profile = $this->jsonMapper->map(json_decode($response->getBody()->getContents()), new Profile);

        // Cache results if cache is on.
        if ($this->cacheIsOn()) {
            $this->cache->put($this->getContainer()->getCacheKey(), $profile, $this->cacheLifetime());
        }

        // Return profile.
        return $profile;
    }
972309
private function hasData($type, $key)
    {
        return isset($this->data[$type]) && isset($this->data[$type][$key]);
    }
426799
private function execute($type)
    {
        $uniqueId = $this->profiler->start();
        switch ($type) {
            case self::TYPE_GET:
                $response = $this->transformValue($this->driver->get($this->getKey()));
                break;
            case self::TYPE_DELETE:
                $response = $this->driver->delete($this->getKey());
                break;
            case self::TYPE_REPLACE:
                $response = $this->driver->replace($this->getKey(), $this->getValue(), $this->expiration);
                break;
            case self::TYPE_SET:
                $response = $this->driver->set($this->getKey(), $this->getValue(), $this->expiration);
                break;
        }
        $this->profiler
            ->setKey($uniqueId, $this->concatKeyParts())
            ->setType($uniqueId, $type)
            ->setHit($uniqueId, $response !== false)
            ->end($uniqueId);
        return $response;
    }
30312
public function getProviderType(string $type): int
    {
        assert(isset($this->providerType[$type]));
        return $this->providerType[$type];
    }
1258172
protected static function passed($type, $key = null, $default = null)
    {
        return Session::get(
            $type . ($key !== null ? '.' . $key : ''),
            $key === null && $default === null ? [] : $default
        );
    }
1153977
private function getFromCache($type)
    {
        if (false === $this->hasCache()) {
            return null;
        }
        return $this->cache->loadMetadataFromCache($type);
    }
1056492
public function getConfig($type)
    {
        if (null !== $this->cachedConfig) {
            return $this->cachedConfig[$type];
        }

        $this->loadConfig();

        return $this->cachedConfig[$type];
    }
1014449
public function get($key, $type = self::NORMAL, $default = null)
    {
        $typeConfig = $this->getTypeConfig($type);

        if (array_key_exists($key, $typeConfig)) {
            return $typeConfig[$key];
        }

        return $default;
    }
242312
public static function getType($type)
    {
        $type = strtolower($type);

        if (!isset(static::$typeMapping[$type])) {
            return $type;
        }

        return static::$typeMapping[$type];
    }
653459
public function getForm(string $key, string $type = null): array
    {
        $this->regenerateForms();

        $formHolder = cache()->get('hc-forms');

        if (!Arr::has($formHolder, $key) || !class_exists($formHolder[$key])) {
            throw new HCException(trans('HCStarter::starter.error.form_not_found', ['key' => $key]));
        }

        $form = app()->make($formHolder[$key]);

        if (!$form instanceof HCForm) {
            throw new HCException(
                'Class ' . $formHolder[$key] . ' must be instance of HoneyComb\\Starter\\Forms\\HCForm'
            );
        }

        if ($form->authCheck && auth()->guest()) {
            throw new HCException(trans('HCStarter::starter.error.not_authorized'));
        }

        return $form->createForm($type);
    }
730333
private function getKey(string $name, string $type = self::TYPE_QUEUE) : string
    {
        return $name . ':' . $type;
    }
690713
protected function getTypeConfig($type = null)
    {
        if ($type == null) {
            $type = static::BASE_TYPE;
        }

        if (is_object($type)) {
            $type = $this->getTypeName($type);
        }

        if (!$this->types->containsKey($type)) {
            $this->throwInvalidTypeException($type);
        }

        return $this->types->get($type);
    }
44470
private static function getFromCache($type)
    {
        if (!isset(self::$cache[$type])) {
            return;
        }

        $candidate = self::$cache[$type];
        if (isset($candidate['condition'])) {
            if (!self::evaluateCondition($candidate['condition'])) {
                return;
            }
        }

        return $candidate['class'];
    }
568298
public final function get ($key)
    {
        if (in_array($key, $this->getColumn())) {
            return $this->record->{$key};
        }

        return false;
    }
679015
protected function get($key)
    {
        return $this->getFrontEndController()->fe_user->getKey(self::$types[$this->type], $key);
    }
436721
public function getProfile() : ?string 
    {
        if ( ! $this->hasProfile()) {
            $this->setProfile($this->getDefaultProfile());
        }
        return $this->profile;
    }