Gets a list of known device types.

@param bool $includecustomtypes If set to true we'll include types that have been added by the admin.
@return array
161894
public static function get_device_type_list($includecustomtypes = true) {
        $types = self::$devicetypes;
        if ($includecustomtypes) {
            $instance = self::instance();
            $types = array_merge($types, array_keys($instance->devicetypecustoms));
        }
        return $types;
    }
761043
private function getClientBrowserDevice(\DeviceDetector\DeviceDetector $deviceDetectorClass)
    {
        $this->autoPopulateSuperGlobals();
        $clientIp = $this->brServerGlobals->getClientIp();
        return [
            'brand'     => $deviceDetectorClass->getDeviceName(),
            'ip'        => $clientIp,
            'ip direct' => $this->brServerGlobals->server->get('REMOTE_ADDR'),
            'ip type'   => $this->checkIpIsPrivate($clientIp),
            'ip v4/v6'  => $this->checkIpIsV4OrV6($clientIp),
            'model'     => $deviceDetectorClass->getModel(),
            'name'      => $deviceDetectorClass->getBrandName(),
        ];
    }
448306
protected function magic_get_devicetypeinuse() {
        if (empty($this->_devicetypeinuse)) {
            $this->_devicetypeinuse = core_useragent::get_user_device_type();
        }
        return $this->_devicetypeinuse;
    }
1180916
public function otherModules(bool $include_disabled = false): Collection
    {
        return $this->findByInterface(ModuleInterface::class, $include_disabled, true)
            ->filter(static function (ModuleInterface $module): bool {
                foreach (self::COMPONENTS as $interface) {
                    if ($module instanceof $interface) {
                        return false;
                    }
                }

                return true;
            });
    }
1034071
public static function get_device_type_theme($devicetype = null) {
        global $CFG;
        if ($devicetype === null) {
            $devicetype = self::get_device_type();
        }
        $themevarname = self::get_device_type_cfg_var_name($devicetype);
        if (empty($CFG->$themevarname)) {
            return false;
        }
        return $CFG->$themevarname;
    }
225203
protected function getListTypes()
	{
		$manager = \Aimeos\MShop::create( $this->getContext(), 'customer/lists/type' );

		$search = $manager->createSearch( true )->setSlice( 0, 10000 );
		$search->setConditions( $search->compare( '==', 'customer.lists.type.domain', 'product' ) );
		$search->setSortations( [$search->sort( '+', 'customer.lists.type.position' )] );

		return $this->map( $manager->searchItems( $search ) );
	}
1040338
public static function getAllIdentifiers(bool $includeObsolete = false) : array
    {
        return \DateTimeZone::listIdentifiers(
            $includeObsolete
            ? \DateTimeZone::ALL_WITH_BC
            : \DateTimeZone::ALL
        );
    }
249921
private function deviceClassificationNames()
    {
        $deviceClusterNames = array();

        foreach ($this->userAgentHandlerChain->getHandlers() as $userAgentHandler) {
            /* @var $userAgentHandler \Wurfl\Handlers\AbstractHandler */
            $deviceClusterNames[] = $userAgentHandler->getPrefix();
        }

        return $deviceClusterNames;
    }
345531
public function getPreconditions($includeWebPreconditions = true)
    {
        $result = [];
        foreach ($this->getAllPreconditions() as $instance) {
            if (!$instance instanceof OptionsPreconditionInterface) {
                if ($includeWebPreconditions || !$instance instanceof WebPreconditionInterface) {
                    $result[] = $instance;
                }
            }
        }

        return $result;
    }
1360625
public static function getTypes()
    {
        return array(   self::TT_WORD,
                        self::TT_PHRASE,
                        self::TT_FIELD,
                        self::TT_FIELD_INDICATOR,
                        self::TT_REQUIRED,
                        self::TT_PROHIBITED,
                        self::TT_FUZZY_PROX_MARK,
                        self::TT_BOOSTING_MARK,
                        self::TT_RANGE_INCL_START,
                        self::TT_RANGE_INCL_END,
                        self::TT_RANGE_EXCL_START,
                        self::TT_RANGE_EXCL_END,
                        self::TT_SUBQUERY_START,
                        self::TT_SUBQUERY_END,
                        self::TT_AND_LEXEME,
                        self::TT_OR_LEXEME,
                        self::TT_NOT_LEXEME,
                        self::TT_TO_LEXEME,
                        self::TT_NUMBER
                     );
    }
1138521
protected function getCustomMappingTypes()
    {
        $mappingTypes = (array) $this->getOption('custom_mapping_types');

        return array_filter(
            $mappingTypes,
            function ($name) {
                return is_string($name);
            },
            ARRAY_FILTER_USE_KEY
        );
    }
105810
public function getNewNotificationTypeArray($includeNotificationCenterPlusTokens = false)
    {
        $type = [
            'recipients' => ['admin_email'],
            'email_subject' => ['admin_email'],
            'email_text' => ['admin_email'],
            'email_html' => ['admin_email'],
            'file_name' => ['admin_email'],
            'file_content' => ['admin_email'],
            'email_sender_name' => ['admin_email'],
            'email_sender_address' => ['admin_email'],
            'email_recipient_cc' => ['admin_email'],
            'email_recipient_bcc' => ['admin_email'],
            'email_replyTo' => ['admin_email'],
            'attachment_tokens' => [],
        ];

        if ($includeNotificationCenterPlusTokens) {
            foreach ($type as $field => $tokens) {
                $type[$field] = array_unique(array_merge([
                    'env_*',
                    'page_*',
                    'user_*',
                    'date',
                    'last_update',
                ], $tokens));
            }
        }

        return $type;
    }
113894
public function getAcceptedFileTypes($includeDot = false)
    {
        $types = $this->fileTypes;

        if ($types === false) {
            $isImage = starts_with($this->getDisplayMode(), 'image');
            $types = implode(',', FileDefinitions::get($isImage ? 'imageExtensions' : 'defaultExtensions'));
        }

        if (!$types || $types == '*') {
            return null;
        }

        if (!is_array($types)) {
            $types = explode(',', $types);
        }

        $types = array_map(function ($value) use ($includeDot) {
            $value = trim($value);

            if (substr($value, 0, 1) == '.') {
                $value = substr($value, 1);
            }

            if ($includeDot) {
                $value = '.'.$value;
            }

            return $value;
        }, $types);

        return implode(',', $types);
    }
728267
public function getCookies(bool $includeDeletedCookies = false) : array
    {
        $cookies = [];

        foreach ($this->cookies as $domain => $cookiesByDomain) {
            foreach ($cookiesByDomain as $path => $cookiesByPath) {
                /**
                 * @var string $name
                 * @var Cookie $cookie
                 */
                foreach ($cookiesByPath as $name => $cookie) {
                    // Only include active cookies
                    if ($includeDeletedCookies || $cookie->getExpiration() >= time()) {
                        $cookies[] = $cookie;
                    }
                }
            }
        }

        return $cookies;
    }
925600
protected function getTypes()
    {
        return array(
            self::CLASS_NAME,
            self::CSS_SELECTOR,
            self::ID,
            self::NAME,
            self::LINK_TEXT,
            self::PARTIAL_LINK_TEXT,
            self::TAG_NAME,
            self::XPATH
        );
    }
1192162
public static function get_device_type() {
        $instance = self::instance();
        if ($instance->devicetype === null) {
            return $instance->guess_device_type();
        }
        return $instance->devicetype;
    }
396960
protected function get_media_types() {
		$media_types = array();
		foreach ( get_allowed_mime_types() as $mime_type ) {
			$parts = explode( '/', $mime_type );
			if ( ! isset( $media_types[ $parts[0] ] ) ) {
				$media_types[ $parts[0] ] = array();
			}
			$media_types[ $parts[0] ][] = $mime_type;
		}
		return $media_types;
	}