Parse manifest and create the manifest array

@return array
7530
public function load()
    {
        $this->manifest = new ArrayObject(array(
            'name' => $this->getModuleName(),
            'version' => $this->getModuleVersion(),
            'application_config' => array(),
            'autoloader_config' => array(),
            'console' => array(
                'usage' => array(),
            ),
        ));

        $this->loadClassConfig()
             ->loadLayoutConfig()
             ->loadResourceConfig()
             ->loadThemeConfig()
             ->loadServiceConfig()
             ->loadPluginManagerConfigs()
             ->loadLocaleConfig()
             ->loadRouteConfig()
             ->loadDiConfig()
             ->loadConsoleConfig();

//              ->loadDiConfig()
//              ->loadConsoleConfig();

        $this->processIncludes();

        return $this->manifest;
    }
642826
private function getManifest()
    {
        if (!isset($this->manifest)) {
            $context = stream_context_create(['http' => ['timeout' => $this->manifestTimeout]]);
            $manifestContents = file_get_contents($this->manifestUrl, false, $context);
            if ($manifestContents === false) {
                throw new \RuntimeException(sprintf('Failed to download manifest: %s', $this->manifestUrl));
            }

            $this->manifest = (array) json_decode($manifestContents, true);
            if (json_last_error() !== JSON_ERROR_NONE) {
                throw new JsonParsingException(
                    'Error parsing manifest file'
                    . (function_exists('json_last_error_msg') ? ': ' . json_last_error_msg() : '')
                );
            }
        }

        return $this->manifest;
    }
997437
public function getJsonContents()
	{
		$default = [];

		$path = $this->getJsonPath();

		if ($this->files->exists($path)) {
			$contents = $this->files->get($path);

			return json_decode($contents, true);
		} else {
			throw new UnknownFileException("The theme must have a valid theme.json manifest file.");
		}
	}
640600
public function toArray()
    {
        return array(
            'scheme' => $this->scheme->get(),
            'user' => $this->user->get(),
            'pass' => $this->pass->get(),
            'host' => $this->host->get(),
            'port' => $this->port->get(),
            'path' => $this->path->get(),
            'query' => $this->query->get(),
            'fragment' => $this->fragment->get(),
        );
    }
426751
public function &toArray()
	{
		$arr =	[];

		if ($this->_scheme !== null)
			$arr['scheme']		=	$this->_scheme;

		if ($this->_user !== null)
			$arr['user']		=	$this->_user;

		if ($this->_pass !== null)
			$arr['pass']		=	$this->_pass;

		if ($this->_host !== null)
			$arr['host']		=	$this->_host;

		if ($this->_port !== null)
			$arr['port']		=	$this->_port;

		if ($this->_path !== null)
			$arr['path']		=	$this->_path;

		if ($this->_query !== null)
			$arr['query']		=	$this->_query;

		if ($this->_frag !== null)
			$arr['fragment']	=	$this->_frag;

		return $arr;
	}
1118246
protected function getManifest()
    {
        if (! is_null($this->manifest)) {
            return $this->manifest;
        }

        if (! file_exists($this->manifestPath)) {
            $this->build();
        }

        $this->files->get($this->manifestPath);

        return $this->manifest = file_exists($this->manifestPath) ?
            $this->files->getRequire($this->manifestPath) : [];
    }
694317
public function toArray(): array
    {
        return array_filter([
            'name' => $this->name,
            'counters' => array_values(array_map(function (Counter $counter) {
                return $counter->toArray();
            }, $this->counters)),
            'application_type' => Filter::AT_LEAST_ONE === $this->applicationType
                ? null
                : $this->applicationType,
            'total_elements' => 0 === $this->totalElements
                ? null
                : $this->totalElements,
            'active_elements' => array_values(array_map(function ($counter) {
                return ($counter instanceof Counter)
                    ? $counter->toArray()
                    : $counter;
            }, $this->activeElements)),
            'highest_active_level' => 0 === $this->highestActiveLevel
                ? null
                : $this->highestActiveLevel,
        ], function ($element) {
            return
            !(
                is_null($element) ||
                (is_array($element) && empty($element))
            );
        });
    }
1367929
def _parse_manifest(self):
        
        with open(self.manifest_file, 'r') as f:
            for line in f:
                if line.startswith("Version"):
                    self.mver, self.relnum = self._parse_version(line)
                lineitems = line.split('  ')
                if len(lineitems) == 2:
                    asset_url = self._get_url(lineitems[1][:-1])
                    yield grequests.get(asset_url, stream=True)
989254
public function toArray()
	{
		$result = array( 'localname' => $this->localName );
		if ( isset( $this->prefix ) ) array( 'prefix' => $this->prefix );
		if ( isset( $this->namespaceURI ) ) array( 'namespace' => $this->namespaceURI );
		return $result;
	}
1244771
public function toArray()
    {
        $array = [];

        if (! empty($this->data)) {
            $array['data'] = $this->data->toIdentifier();
        }

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

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

        return $array;
    }
867639
public function toArray()
    {
        return [
            'userAgent'    => $this->userAgent,
            'version'      => $this->version,
            'majorVersion' => $this->majorVersion,
            'minorVersion' => $this->minorVersion,
            'patchVersion' => $this->patchVersion,
            'debug'        => $this->debug,
            'platform'     => $this->platform,
            'device'       => $this->device,
        ];
    }
1153375
public function getPlugins()
    {
        if (!$this->_plugins) {

            $manifest = $this->getPluginPath() . '/composer.json';

            if (!file_exists($manifest)) {
                return array();
            }

            $contents = file_get_contents($manifest);

            if ($contents === false) {
                return array();
            }

            $data = json_decode($contents);

            if (!isset($data->require)) {
                return array();
            }

            $this->_plugins = array();

            foreach ($data->require as $package => $version)
            {
                $file = $this->getPluginPath() . '/vendor/' . $package . '/composer.json';

                if (file_exists($file))
                {
                    $json     = file_get_contents($file);
                    $manifest = json_decode($json);

                    if (is_null($manifest)) {
                        continue;
                    }

                    if (isset($manifest->type) && $manifest->type == 'joomlatools-console-plugin') {
                        $this->_plugins[$package] = $version;
                    }
                }
            }
        }

        return $this->_plugins;
    }
1362045
public function toArray()
    {
        return [
            'folderId' => $this->folder->getId(),
            'usageType' => $this->usageType,
            'usageId' => $this->usageId,
            'status' => $this->status,
        ];
    }
1106199
public function getDevImplementations(){

        $returnValue = array();

        $hookFileName = $this->getHookFileName();

        foreach(glob($this->getBaseDevDir().'*/'.$hookFileName.'.js') as $file){

            $dir = str_replace($hookFileName.'.js', '', $file);
            $manifestFile = $dir.$hookFileName.'.json';

            if(file_exists($manifestFile)){

                $typeIdentifier = basename($dir);
                $baseUrl = $this->getBaseDevUrl().$typeIdentifier.'/';
                $manifest = json_decode(file_get_contents($manifestFile), true);
                
                $returnValue[] = array(
                    'typeIdentifier' => $typeIdentifier,
                    'label' => $manifest['label'],
                    'directory' => $dir,
                    'baseUrl' => $baseUrl,
                    'file' => $this->getEntryPointFile($typeIdentifier),
                    'manifest' => $manifest,
                    'dev' => true,
                    'debug' => (isset($manifest['debug']) && $manifest['debug']),
                    'registry' => get_class($this)
                );
            }
        }

        return $returnValue;
    }
102789
public function getAlarms(): array
    {
        if (is_array($this->alarms)) {
            return $this->alarms;
        }

        $data = $this->getController()->soap("AlarmClock", "ListAlarms");
        $parser = new XmlParser($data["CurrentAlarmList"]);

        $alarms = [];
        foreach ($parser->getTags("Alarm") as $tag) {
            $alarms[] = new Alarm($tag, $this);
        }

        return $this->alarms = $alarms;
    }
603670
public function toArray()
    {
        $notification = [
            'title' => $this->title,
            'body' => $this->body,
            'android_channel_id' => $this->channelId,
            'icon' => $this->icon,
            'sound' => $this->sound,
            'badge' => $this->badge,
            'tag' => $this->tag,
            'color' => $this->color,
            'click_action' => $this->clickAction,
            'body_loc_key' => $this->bodyLocationKey,
            'body_loc_args' => $this->bodyLocationArgs,
            'title_loc_key' => $this->titleLocationKey,
            'title_loc_args' => $this->titleLocationArgs,
        ];

        // remove null values
        $notification = array_filter($notification);

        return $notification;
    }
958786
protected function parse()
    {
        try {
            $data = app(Browscap::class)->getBrowser($this->userAgent);
        } catch (Exception $e) {
            return;
        }

        foreach ($data as $key => $value) {
            // Force lowercase on key
            $key = strtolower($key);

            // Remove whitespaces from value
            $value = trim($value);

            // Switch it up!
            switch ($key) {
                case 'ismobiledevice':
                    $this->isMobile = !empty($value);
                    break;
                case 'istablet':
                    $this->isTablet = !empty($value);
                    break;
                case 'crawler':
                    $this->isCrawler = !empty($value);
                    break;
                case 'majorver':
                    $this->majorVersion = (int) $value;
                    break;
                case 'minorver':
                    $this->minorVersion = (int) $value;
                    break;
                case 'device_type':
                    $this->device = $value;
                    break;
                case 'device_pointing_method':
                    $this->devicePointer = $value;
                    break;
                case 'browser_maker':
                    $this->publisher = $value;
                    break;
                case 'comment':
                    $this->browserWithVersion = $value;
                    break;
                case 'browser':
                case 'platform':
                    $this->{$key} = $value;
                    break;
            }
        }

        // Set version and if major and minor
        // wasn't present in the data array
        // we'll set them as well
        $this->setVersion($data->version);

        // Mark parsing as successful
        $this->successful = true;
    }