Populates associative array of iOS versions.

@throws \Exception
502353
private static function populate() {
    $arr = array();
    $epoch = 0;
    if (!isset(self::$BuildVer) || !is_array(self::$BuildVer)) {
      require __DIR__ .'/data.php';
      if (empty($arr) || !is_array($arr) || empty($epoch)) {
        throw new \Exception('Error fetching file data.php');
      }
      self::$DataTimestamp = $epoch;
      self::$BuildVer = $arr;
    }
  }
1202740
public function load_initial_version() {
		//if there's an INITIAL_VERSION in the upgrade config file, use that.
		$this->read_upgrade_config_file();
		if(isset($this->initialVersion) && strlen($this->initialVersion)) {
			$parseThis = $this->initialVersion;
		}
		else {
			$parseThis = $this->versionFileVersion;
		}
		
		$loadRes = $this->set_initial_version($parseThis);
		
		return($loadRes);
	}
196944
public function toArray()
    {
        return [
            'platform'        => $this->platform,
            'environment'     => $this->environment,
            'version'         => $this->version,
            'majorVersion'    => $this->majorVersion,
            'minorVersion'    => $this->minorVersion,
            'patchVersion'    => $this->patchVersion,
            'deviceOsVersion' => $this->deviceOsVersion,
            'device'          => $this->device,
        ];
    }
1195037
public function populate($data = array())
    {
        if (isset($data['title']) && $data['title'] != null) {
            $this->title = $data['title'];
        }
        if (isset($data['address']) && $data['address'] != null) {
            $this->address = $data['address'];
        }
        if (isset($data['emailAddress']) && $data['emailAddress'] != null) {
            $this->emailAddress = $data['emailAddress'];
        }
        if (isset($data['emailName']) && $data['emailName'] != null) {
            $this->emailName = $data['emailName'];
        }
        if (isset($data['phoneNumber']) && $data['phoneNumber'] != null) {
            $this->phoneNumber = $data['phoneNumber'];
        }
        if (isset($data['facebookPage']) && $data['facebookPage'] != null) {
            $this->facebookPage = $data['facebookPage'];
        }
        if (isset($data['twitterAccount']) && $data['twitterAccount'] != null) {
            $this->twitterAccount = $data['twitterAccount'];
        }
        if (isset($data['googleAnalytics']) && $data['googleAnalytics'] != null) {
            $this->googleAnalytics = $data['googleAnalytics'];
        }
        if (isset($data['mainImage']) && $data['mainImage'] != null) {
            $this->mainImage = $data['mainImage'];
        }
    }
231313
public function toArray(): array
    {
        $data = [
            'version' => $this->getVersion()
        ];

        if ($this->hasMetadata()) {
            $data['meta'] = $this->getMetadata();
        }

        return $data;
    }
1327990
public function populate($data = array())
    {
        $this->title = (isset($data['title'])) ? $data['title'] : null;
        $this->dynarea = (isset($data['dynarea'])) ? $data['dynarea'] : null;
        if (isset($data['is_active']) && $data['is_active'] != null) {
            $this->is_active = $data['is_active'];
        }
        if (isset($data['position']) && $data['position'] != null) {
            $this->position = $data['position'];
        }
        $this->identifier = (isset($data['identifier'])) ? $data['identifier'] : null;
        $this->type = (isset($data['type'])) ? $data['type'] : null;
    }
141851
public function populate(array $data = [], array $ignore = ['createdByUserId', 'createdDate', 'createdReason'])
    {
        if (!empty($data['languageId']) && !in_array('languageId', $ignore)) {
            $this->setLanguageId($data['languageId']);
        }
        if (!empty($data['languageName']) && !in_array('languageName', $ignore)) {
            $this->setLanguageName($data['languageName']);
        }
        if (!empty($data['iso639_1']) && !in_array('iso639_1', $ignore)) {
            $this->setIso6391($data['iso639_1']);
        }
        if (!empty($data['iso639_2b']) && !in_array('iso639_2b', $ignore)) {
            $this->setIso6392b($data['iso639_2b']);
        }
        if (!empty($data['iso639_2t']) && !in_array('iso639_2t', $ignore)) {
            $this->setIso6392t($data['iso639_2t']);
        }
    }
1365707
protected function storeVersion()
    {
        $versions = $this->versions();

        $this->storeConfiguredVersion($versions);
        $this->storeLatestVersion($versions);
    }
1191225
public function readArray() {

            $arrId = $this->readU29();
            if (($arrId & 0x01)==0) {
                 $arrId = $arrId >> 1;
                 if ($arrId>=count($this->storedObjects)) {
                    throw new Exception('Undefined array reference: ' . $arrId);
                    return false;
                }
                return $this->storedObjects[$arrId]; 
            }
            $arrId = $arrId >> 1;
            
            $data = array();
            $this->storedObjects[] &= $data;

            $key = $this->readString();

            while($key!="") {
                $data[$key] = $this->readAMFData();
                $key = $this->readString();
            }

            for($i=0;$i<$arrId;$i++) {
                $data[] = $this->readAMFData();
            }

            return $data;

        }
1102968
private function getAvailableVersions()
    {
        if (!isset($this->availableVersions)) {
            $this->availableVersions = [];
            foreach ($this->getManifest() as $key => $item) {
                if ($missing = array_diff(self::$requiredKeys, array_keys($item))) {
                    throw new \RuntimeException(sprintf(
                        'Manifest item %s missing required key(s): %s',
                        $key,
                        implode(',', $missing)
                    ));
                }
                $this->availableVersions[$item['version']] = $item;
            }
        }

        return $this->availableVersions;
    }
479351
public function toArray()
    {
        $result = [];

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

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

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

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

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

        if (isset($result['version']) && empty($result['version'])) {
            unset($result['version']);
        }

        return $result;
    }
242728
public function toArray()
    {
        $returnValue = parent::toArray();
        //$returnValue['ca'] = "deprecated";
        $returnValue['contextId'] = $this->contextIdentifier;
        $returnValue['contextLabel'] = $this->contextLabel;
        $returnValue['variableIdentifier'] = $this->identifier;
        

        return (array) $returnValue;
    }
921266
public function getDealerContactInfoVersions()
    {
        if (null === $this->dealer_contact_info_versions_unserialized) {
            $this->dealer_contact_info_versions_unserialized = array();
        }
        if (!$this->dealer_contact_info_versions_unserialized && null !== $this->dealer_contact_info_versions) {
            $dealer_contact_info_versions_unserialized = substr($this->dealer_contact_info_versions, 2, -2);
            $this->dealer_contact_info_versions_unserialized = $dealer_contact_info_versions_unserialized ? explode(' | ', $dealer_contact_info_versions_unserialized) : array();
        }

        return $this->dealer_contact_info_versions_unserialized;
    }
576290
protected function initialize()
    {
        ArrayRepository::initialize();

        $verbose = $this->verbose;

        /** @var VcsDriver $driver */
        $driver = $this->getDriver();
        if (!$driver) {
            throw new \InvalidArgumentException('No driver found to handle VCS repository '.$this->url);
        }

        $this->versionParser = new VersionParser();
        if (!$this->loader) {
            $this->loader = new ArrayLoader($this->versionParser);
        }

        try {
            if ($driver->hasComposerFile($driver->getRootIdentifier())) {
                $data = $driver->getComposerInformation($driver->getRootIdentifier());
                $this->packageName = !empty($data['name']) ? $data['name'] : null;
            }
        } catch (\Exception $e) {
            if ($verbose) {
                $this->io->write('<error>Skipped parsing '.$driver->getRootIdentifier().', '.$e->getMessage().'</error>');
            }
        }

        foreach ($driver->getTags() as $tag => $identifier) {
            $msg = 'Reading composer.json of <info>' . ($this->packageName ?: $this->url) . '</info> (<comment>' . $tag . '</comment>)';
            if ($verbose) {
                $this->io->write($msg);
            } else {
                $this->io->overwrite($msg, false);
            }

            // strip the release- prefix from tags if present
            $tag = str_replace('release-', '', $tag);

            if (!$parsedTag = $this->validateTag($tag)) {
                if ($verbose) {
                    $this->io->write('<warning>Skipped tag '.$tag.', invalid tag name</warning>');
                }
                continue;
            }

            try {
                if (!$data = $driver->getComposerInformation($identifier)) {
                    if ($verbose) {
                        $this->io->write('<warning>Skipped tag '.$tag.', no composer file</warning>');
                    }
                    continue;
                }

                // manually versioned package
                if (isset($data['version'])) {
                    $data['version_normalized'] = $this->versionParser->normalize($data['version']);
                } else {
                    // auto-versioned package, read value from tag
                    //set version without namespace
                    $data['version'] = $this->_getBranchWithoutNamespace($tag);
                    $data['version_normalized'] = $parsedTag;
                }

                //set package namespace to generate package name based upon repository name
                $data['namespace'] = isset($data['namespace'])
                    ? $data['namespace'] : $this->_getBranchNamespace($tag);

                // make sure tag packages have no -dev flag
                $data['version'] = preg_replace('{[.-]?dev$}i', '', $data['version']);
                $data['version_normalized'] = preg_replace('{(^dev-|[.-]?dev$)}i', '', $data['version_normalized']);

                // broken package, version doesn't match tag
                if ($data['version_normalized'] !== $parsedTag) {
                    if ($verbose) {
                        $this->io->write('<warning>Skipped tag '.$tag.', tag ('.$parsedTag.') does not match version ('.$data['version_normalized'].') in composer.json</warning>');
                    }
                    continue;
                }

                if ($verbose) {
                    $this->io->write('Importing tag '.$tag.' ('.$data['version_normalized'].')');
                }

                $this->addPackage($this->loader->load($this->preProcess($driver, $data, $identifier)));
            } catch (\Exception $e) {
                if ($verbose) {
                    $this->io->write('<warning>Skipped tag '.$tag.', '.($e instanceof TransportException ? 'no composer file was found' : $e->getMessage()).'</warning>');
                }
                continue;
            }
        }

        if (!$verbose) {
            $this->io->overwrite('', false);
        }

        foreach ($driver->getBranches() as $branch => $identifier) {
            $msg = 'Reading composer.json of <info>' . ($this->packageName ?: $this->url) . '</info> (<comment>' . $branch . '</comment>)';
            if ($verbose) {
                $this->io->write($msg);
            } else {
                $this->io->overwrite($msg, false);
            }

            if (!$parsedBranch = $this->validateBranch($branch)) {
                if ($verbose) {
                    $this->io->write('<warning>Skipped branch '.$branch.', invalid name</warning>');
                }
                continue;
            }

            try {
                if (!$data = $driver->getComposerInformation($identifier)) {
                    if ($verbose) {
                        $this->io->write('<warning>Skipped branch '.$branch.', no composer file</warning>');
                    }
                    continue;
                }

                // branches are always auto-versioned, read value from branch name
                // set branch name without package namespace
                $data['version'] = $this->_getBranchWithoutNamespace($branch);
                //set package namespace to generate package name based upon repository name
                $data['namespace'] = isset($data['namespace'])
                    ? $data['namespace'] : $this->_getBranchNamespace($branch);
                $data['version_normalized'] = $parsedBranch;

                // make sure branch packages have a dev flag
                if ('dev-' === substr($parsedBranch, 0, 4) || '9999999-dev' === $parsedBranch) {
                    $data['version'] = 'dev-' . $data['version'];
                } else {
                    $data['version'] = preg_replace('{(\.9{7})+}', '.x', $parsedBranch);
                }

                if ($verbose) {
                    $this->io->write('Importing branch '.$branch.' ('.$data['version'].')');
                }

                $packageData = $this->preProcess($driver, $data, $identifier);
                $package = $this->loader->load($packageData);
                if ($this->loader instanceof ValidatingArrayLoader && $this->loader->getWarnings()) {
                    throw new InvalidPackageException($this->loader->getErrors(), $this->loader->getWarnings(), $packageData);
                }
                $this->addPackage($package);
            } catch (TransportException $e) {
                if ($verbose) {
                    $this->io->write('<warning>Skipped branch '.$branch.', no composer file was found</warning>');
                }
                continue;
            } catch (\Exception $e) {
                if (!$verbose) {
                    $this->io->write('');
                }
                $this->branchErrorOccurred = true;
                $this->io->write('<error>Skipped branch '.$branch.', '.$e->getMessage().'</error>');
                $this->io->write('');
                continue;
            }
        }
        $driver->cleanup();

        if (!$verbose) {
            $this->io->overwrite('', false);
        }

        if (!$this->getPackages()) {
            throw new InvalidRepositoryException('No valid composer.json was found in any branch or tag of '.$this->url.', could not load a package from it.');
        }
    }
23603
public static function settings(): array
    {
        $filename = static::filename();
        if (!static::checkFileExist($filename)) {
            throw new \Exception($filename . ' dosnt exists. Please create this file.');
        }
        $settings = YamlManipulator::getFileContents($filename);
        if (!isset($settings['settings'])) {
            throw new \Exception('The settigns files is not valid, all parameters must be under settings array.');
        }
        return (array)$settings['settings'];
    }
1033814
public function getSearchedVersions()
    {
        $versions = array();
        
        if (!empty($_REQUEST['Versions'])) {
            if (is_array($_REQUEST['Versions'])) {
                $versions = Convert::raw2att($_REQUEST['Versions']);
                $versions = array_combine($versions, $versions);
            } else {
                $version = Convert::raw2att($_REQUEST['Versions']);
                $versions[$version] = $version;
            }
        }

        return $versions;
    }
502781
public function load()
    {
        $matchesInfo = $this->_getMatchesIdsFromMatches();
        $matchesIds = array();
        foreach ($matchesInfo as $matchInfo) {
            array_push($matchesIds, $matchInfo['match_id']);
        }
        if (count($matchesIds) === 0) {
            return array();
        }
        $slotsInfo = $this->_loadSlotsInfo($matchesIds);
        $picksBansFormattedInfo = $this->_loadPicksBansInfo($matchesIds);

        $slotsIds = array();
        foreach ($slotsInfo as $slotInfo) {
            array_push($slotsIds, $slotInfo['id']);
        }

        $abilitiesUpgradeFormattedInfo = $this->_loadAbilityUpgradesInfo($slotsIds);
        $additionalUnitsFormattedInfo = $this->_loadAdditionalUnitsInfo($slotsIds);

        // we load all matches info and now need to make proper match objects
        $matches = array();
        foreach ($matchesInfo as $matchInfo) {
            $match = new Match();
            $match->setArray($matchInfo);
            $slots_count = 0;
            foreach ($slotsInfo as $slotInfo) {
                if ($slots_count > 9) {
                    // match can't has more than 10 slots
                    break;
                }
                if ($slotInfo['match_id'] == $match->get('match_id')) {
                    $slot = new slot();
                    $slot->setArray($slotInfo);
                    if (array_key_exists($slot->get('id'), $abilitiesUpgradeFormattedInfo)) {
                        $slot->setAbilitiesUpgrade($abilitiesUpgradeFormattedInfo[$slot->get('id')]);
                    }
                    if (array_key_exists($slot->get('id'), $additionalUnitsFormattedInfo)) {
                        $slot->setAdditionalUnitItems($additionalUnitsFormattedInfo[$slot->get('id')]);
                    }
                    $match->addSlot($slot);
                    $slots_count++;
                }
            }
            if (array_key_exists($match->get('match_id'), $picksBansFormattedInfo)) {
                $match->setAllPickBans($picksBansFormattedInfo[$match->get('match_id')]);
            }
            $matches[$match->get('match_id')] = $match;
        }
        return $matches;
    }