Gets an array of all the virtual capabilities

@return array Virtual capabilities in format 'name => value'
964936
public function getAll()
    {
        $all = array();

        foreach ($this->getNames() as $name) {
            $all[$name] = $this->get($name);
        }

        return $all;
    }
90863
public function toArray()
    {
        return array(
            "resourceId" => $this->resourceId,
            "operation" => $this->operation,
            "specTypes" => $this->specTypes,
            "storeName" => $this->storeName,
            "podName" => $this->podName
        );
    }
801378
public static function getControlCapabilities()
    {
        $caps = array();
        foreach (array_keys(self::$virtualCapabilities) as $capabilityName) {
            $caps[] = self::PREFIX_CONTROL . $capabilityName;
        }

        return $caps;
    }
1237449
public function toArray()
    {
        $result = [];

        if (!empty($this->value)) {
            if (!empty($this->details)) {
                $parts = explode('.', $this->value);
                $result['value'] = join('.', array_slice($parts, 0, $this->details));
            } else {
                $result['value'] = $this->value;
            }
        }

        if (!empty($this->alias)) {
            $result['alias'] = $this->alias;
        }

        if (!empty($this->nickname)) {
            $result['nickname'] = $this->nickname;
        }

        if (isset($result['value']) && !isset($result['alias']) && !isset($result['nickname'])) {
            return $result['value'];
        }

        return $result;
    }
287557
public function managerGetRealms()
    {
        $theRealms = [];

        foreach ($this->realmManager->getRealms() as $realm) {
            /* @var $realm \Thruway\Realm */
            $theRealms[] = [
                'name' => $realm->getRealmName()
            ];
        }

        return [$theRealms];
    }
735017
public function get_capabilities() {
        global $DB;

        $sort = 'ORDER BY contextlevel,component,name';   // To group them sensibly for display

        $params = array();
        $bi = $DB->get_record('block_instances', array('id' => $this->_instanceid));

        $extra = '';
        $extracaps = block_method_result($bi->blockname, 'get_extra_capabilities');
        if ($extracaps) {
            list($extra, $params) = $DB->get_in_or_equal($extracaps, SQL_PARAMS_NAMED, 'cap');
            $extra = "OR name $extra";
        }

        $sql = "SELECT *
                  FROM {capabilities}
                 WHERE (contextlevel = ".CONTEXT_BLOCK."
                       AND component = :component)
                       $extra";
        $params['component'] = 'block_' . $bi->blockname;

        return $DB->get_records_sql($sql.' '.$sort, $params);
    }
1245983
public function getVirtualHostsAsArray()
    {

        // prepare the array containing the virtual host configuration
        $virtualHosts = array();

        // iterate hosts
        /** @var \AppserverIo\Appserver\Core\Api\Node\VirtualHostNode $virtualHost */
        foreach ($this->getVirtualHosts() as $virtualHost) {
            // explode the virtual host names
            $virtualHostNames = explode(' ', $virtualHost->getName());

            // Some virtual hosts might have an extensionType to expand their name attribute, check for that
            if ($virtualHost->hasInjector()) {
                $virtualHostNames = array_merge($virtualHostNames, explode(' ', $virtualHost->getInjection()));
            }

            // prepare the virtual hosts
            foreach ($virtualHostNames as $virtualHostName) {
                // set all virtual hosts params per key for faster matching later on
                $virtualHosts[trim($virtualHostName)] = array(
                    'params' => $virtualHost->getParamsAsArray(),
                    'headers' => $virtualHost->getHeadersAsArray(),
                    'rewriteMaps' => $virtualHost->getRewriteMapsAsArray(),
                    'rewrites' => $virtualHost->getRewritesAsArray(),
                    'environmentVariables' => $virtualHost->getEnvironmentVariablesAsArray(),
                    'accesses' => $virtualHost->getAccessesAsArray(),
                    'locations' => $virtualHost->getLocationsAsArray(),
                    'authentications' => $virtualHost->getAuthenticationsAsArray(),
                    'analytics' => $virtualHost->getAnalyticsAsArray()
                );
            }
        }

        // return the virtual host configuration
        return $virtualHosts;
    }
140296
public static function all()
    {
        $result = [];
        foreach (self::getConstants() as $k => $v) {
            if (static::isValid($v)) {
                /** @var Value $object */
                $object = new static($v);
                $result[$object->getValue()] = $object;
            }
        }

        return $result;
    }
191084
public function toArray()
    {
        return [
            'userAgent'          => $this->userAgent,
            'browser'            => $this->browser,
            'version'            => $this->version,
            'majorVersion'       => $this->majorVersion,
            'minorVersion'       => $this->minorVersion,
            'browserWithVersion' => $this->browserWithVersion,
            'publisher'          => $this->publisher,
            'platform'           => $this->platform,
            'device'             => $this->device,
            'devicePointer'      => $this->devicePointer,
            'isMobile'           => $this->isMobile,
            'isTablet'           => $this->isTablet(),
            'isCrawler'          => $this->isCrawler,
        ];
    }
1066665
public function getObject($name)
    {
        if (!array_key_exists($name, $this->cache)) {
            if (($pos = strpos(self::$virtual_capabilities[$name], '.')) !== false) {
                // Group of capabilities
                list($group, $property) = explode('.', self::$virtual_capabilities[$name]);
                
                if (!array_key_exists($group, $this->group_cache)) {
                    $class = "WURFL_VirtualCapability_{$group}Group";
                    // Cache the group
                    $this->group_cache[$group] = new $class($this->device, $this->request);
                    $this->group_cache[$group]->compute();
                }
                
                // Cache the capability
                $this->cache[$name] = $this->group_cache[$group]->get($property);
            } else {
                // Individual capability
                $class = 'WURFL_VirtualCapability_'.self::$virtual_capabilities[$name];
                $this->cache[$name] = new $class($this->device, $this->request);
            }
        }
        return $this->cache[$name];
    }
614618
public function toArray()
    {
        return [
            'name' => $this->name,
            'class-name' => $this->className,
            'path' => $this->path,
            'is-create' => $this->isCreate,
            'is-virtual' => $this->isVirtual,
            'is-organized' => $this->isOrganized,
            'with-soft-delete' => $this->withSoftDelete,
            'without-timestamps' => $this->withoutTimestamps,
            'resource' => ($this->resource ?: new Resource())->toArray(),
        ];
    }
577225
public function getDesiredCapabilities()
	{
		$capabilities = parent::getDesiredCapabilities();

		if ( !isset($capabilities['platform']) ) {
			$capabilities['platform'] = 'Windows 7';
		}

		if ( !isset($capabilities['version']) ) {
			$capabilities['version'] = '';
		}

		return $capabilities;
	}
968052
public function getOptions() {
        $options = parent::getOptions();
        
        $statusProperty = new core_kernel_classes_Property(TaoOntology::PROPERTY_ABSTRACT_MODEL_STATUS);
        $current = $this->getEvaluatedValue();
                    
        $options = array();
        $map = ValidationRuleRegistry::getRegistry()->getMap();
        foreach (ValidationRuleRegistry::getRegistry()->getMap() as $id => $validator) {
            $options[$id] = $id; 
        }
        
        return $options;
    }
826217
public function virtualAttributesNames()
    {
        if (!empty($this->_virtualAttributes))
            return $this->_virtualAttributes;

        if (!is_array($this->virtualAttributes) || empty($this->virtualAttributes))
            return null;

        $attributes = [];
        foreach ($this->virtualAttributes as $a) {
            if (!in_array($a, $this->objAttributesNames()) && !in_array($a, $attributes)) {
                $attributes[] = $a;
            }
        }

        return !empty($attributes) ? $this->_virtualAttributes = $attributes : null;
    }
173212
public function getActionAllowableValues()
    {
        return [
            self::ACTION_ADD,
            self::ACTION_ASSEMBLE,
            self::ACTION_CONFIGURE,
            self::ACTION_ENTER_PASSWORD,
            self::ACTION_LOCK,
            self::ACTION_MOVE,
            self::ACTION_REPACKAGE,
            self::ACTION_SET_NAME,
            self::ACTION_SET_PASSWORD,
            self::ACTION_UNLOCK,
        ];
    }
372547
public function getGroupIdCapabilitiesMap()
    {
        $groupIdCapabilitiesMap = array();
        foreach ($this->groupIdCapabilitiesNameMap as $groupId => $capabilitiesName) {
            foreach ($capabilitiesName as $capabilityName) {
                $groupIdCapabilitiesMap[$groupId][$capabilityName] = $this->capabilities[$capabilityName];
            }
        }

        return $groupIdCapabilitiesMap;
    }
469879
protected function getRepositoryCredentials()
    {
        $config = (array) $this->config->getContextually('vcs');
        $credentials = (array) $this->localStorage->get('credentials');

        return array_merge($config, $credentials);
    }