@param string $deviceId

@return array|bool
185903
public function getDeviceFromID($deviceId)
    {
        $success = null;
        $data    = $this->getAdapter()->getItem($deviceId, $success);

        if (!$success) {
            return;
        }

        return $data;
    }
1257520
public function getDeviceState($deviceName)
    {
        $uri = "deviceStates/$deviceName";
        $response = $this->client->getEndpoint()->get($uri);

        return new DeviceState($this->client, \GuzzleHttp\json_decode($response->getBody()));
    }
1228120
public static function get(int $deviceId, array $customHeaders = []): BunqResponseDevice
    {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->get(
            vsprintf(
                self::ENDPOINT_URL_READ,
                [$deviceId]
            ),
            [],
            $customHeaders
        );

        return BunqResponseDevice::castFromBunqResponse(
            static::fromJson($responseRaw)
        );
    }
873171
public function getTransportConfig($storeId)
    {
        $config = [
            'port' => $this->getSmtpPort($storeId),
            'auth' => 'login',
            'username' => $this->getSmtpUsername($storeId),
            'password' => $this->getSmtpPassword($storeId),
            'ssl' => 'tls',
        ];

        if ($this->isDebugEnabled($storeId)) {
            $this->_logger->debug('Mail transport config : ' . implode(',', $config));
        }

        return $config;
    }
1242747
public function filter($userAgent, $deviceID)
    {
        if ($this->canHandle($userAgent)) {
            $this->updateUserAgentsWithDeviceIDMap($userAgent, $deviceID);

            return true;
        }

        return false;
    }
1206483
public function getFoldersArrayItem($folderId)
    {
        return (isset($this->foldersArray[$folderId])) ? $this->foldersArray[$folderId] : false;
    }
1261042
public function getRegistrationById($registrationId)
    {
        /** @var Registration $registration */
        foreach ($this->registrations as $registration) {
            if ($registration->getId() === $registrationId) {
                return $registration;
            }
        }

        return false;
    }
1186950
public function isSitesResourceId($resourceId)
    {
        $needle = ResourceProvider::RESOURCE_SITES . '.';
        $length = strlen($needle);

        return (substr($resourceId, 0, $length) === $needle);
    }
1152519
private function getWrappedDevice($deviceID, $request = null)
    {
        $modelDevices = $this->_cacheProvider->load('DEVS_'.$deviceID);

        if (empty($modelDevices)) {
            $modelDevices = $this->_deviceRepository->getDeviceHierarchy($deviceID);
        }

        $this->_cacheProvider->save('DEVS_'.$deviceID, $modelDevices);

        if ($request === null) {
            // If a request was not provided, we generate one from the WURFL entry itself
            // to help resolve the virtual capabilities
            $requestFactory = new WURFL_Request_GenericRequestFactory();
            $request = $requestFactory->createRequestForUserAgent($modelDevices[0]->userAgent);
            $genericNormalizer = WURFL_UserAgentHandlerChainFactory::createGenericNormalizers();
            $request->userAgentNormalized = $genericNormalizer->normalize($request->userAgent);
        }

        // The CustomDevice is not cached since virtual capabilities must be recalculated
        // for every different request.
        return new WURFL_CustomDevice($modelDevices, $request);
    }
18751
public function removeDevices(int $groupId, array $deviceIdentifiers)
    {
        $params = [
            'group_id' => $groupId,
            'device_identifiers' => $deviceIdentifiers,
        ];

        return $this->httpPostJson('shakearound/device/group/deletedevice', $params);
    }
1014558
protected function getDeviceIden($device)
    {
        foreach ($this->devices() as $available_device) {
            foreach (['iden', 'nickname'] as $field) {
                if ($available_device->$field == $device) {
                    return $available_device->iden;
                }
            }
        }

        return false;
    }
1034128
public function getFilesArrayItem($fileId)
    {
        return isset($this->filesArray[$fileId]) ? $this->filesArray[$fileId] : false;
    }
261256
public function getMedia($mediaId)
    {
        $result = $this->httpGet(self::WECHAT_MEDIA_GET_PREFIX, [
            'access_token' => $this->getAccessToken(),
            'media_id' => $mediaId
        ]);
        return is_string($result) ? $result : false;
    }
1147778
public static function getProviderById($providerId)
    {
        foreach (self::getAllProviders() as $provider) {
            if ($provider->getId() == $providerId && $provider->isAvailable()) {
                return $provider;
            }
        }
        
        return null;
    }
818546
public static function getDeviceIpById($id)
    {
        $device = Discovery::lookupDevice('id', $id);
        if (isset($device['ip'])) {
            return $device['ip'];
        }
        throw new \Exception('Invalid device id supplied. No device found by id ' . $id);
    }
430260
public function mfaDeviceSecretGet($iUserId)
    {
        $oDb      = Factory::service('Database');
        $oEncrypt = Factory::service('Encrypt');

        $oDb->where('user_id', $iUserId);
        $oDb->limit(1);
        $aResult = $oDb->get(NAILS_DB_PREFIX . 'user_auth_two_factor_device_secret')->result();

        if (empty($aResult)) {
            return false;
        }

        $oReturn         = reset($aResult);
        $oReturn->secret = $oEncrypt->decode($oReturn->secret, APP_PRIVATE_KEY);

        return $oReturn;
    }
842308
public function find($itemId)
    {
        foreach ($this->items as $item) {
            if ($itemId === $item->id) {
                return $item;
            }
        }

        return;
    }