Gets the remote ini file update timestamp

@throws Exception
@return int the remote modification timestamp
425841
protected function _getRemoteMTime()
    {
        $remote_datetime = $this->_getRemoteData($this->remoteVerUrl);
        $remote_tmstp = strtotime($remote_datetime);

        if (!$remote_tmstp) {
            throw new Exception("Bad datetime format from {$this->remoteVerUrl}");
        }

        return $remote_tmstp;
    }
150835
protected function doUpdate(): int
    {
        /**
         * Run pre-UPDATE logic
         */
        $this->beforeUpdate();

        $data = $this->toArray();

        /**
         * Execute validator logic
         * Can throw ValidatorException
         */
        $this->assert($data);

        $primaryKey = $this->getPrimaryKey();

        /**
         * Compare the data to the modified fields array to discover
         * which columns have been changed.
         */
        $diffData = array_diff_assoc($data, $this->clean);

        $table = $this->getTable();

        $diffData = $table::filterColumns($diffData);

        /**
         * Execute the UPDATE (this may throw an exception)
         * Do this only if data values were changed.
         * Use the $diffData variable, so the UPDATE statement
         * includes SET terms only for data values that changed.
         */
        $result = 0;
        if (\count($diffData) > 0) {
            $result = $table::update($diffData, $primaryKey);
        }

        /**
         * Run post-UPDATE logic.  Do this before the _refresh()
         * so the _afterUpdate() function can tell the difference
         * between changed data and clean (pre-changed) data.
         */
        $this->afterUpdate();

        /**
         * Refresh the data just in case triggers in the RDBMS changed
         * any columns.  Also this resets the "clean".
         */
        $this->clean = $this->toArray();

        return $result;
    }
270371
public function getFileNameVersioned()
	{
		return static::buildFileNameVersioned($this->strFileName, static::getVersionForFileName($this->intVersionMajor, $this->intVersionMinor, $this->intVersionPatch), $this->strFileType);
	}
1304237
public function getTimeStamp()
    {
        if ($this->exists && !isset($this->timestamp)) {
            $this->timestamp = @filemtime($this->filepath);
        }
        return $this->timestamp;
    }
1149447
public function getModifiedAt() {
		$timestamp = filemtime($this->pathname);
		$time = new DateTime();
		$time->setTimestamp($timestamp);
		return $time;
	}
590729
public function getTimestamp()
	{
		if (!isset($this->timestamp))
		{
			$this->timestamp = $this->hasAdapterOrFail()->adapter->getTimestamp($this->getPath());
		}

		return $this->timestamp;
	}
134576
public function writeRevision()
    {
        if ($this->syncCommit) {
            $localRevision = $this->syncCommit;
        } else {
            $localRevision = $this->git->localRevision()[0];
        }

        try {
            $this->bridge->put($localRevision, $this->revisionFile);
        }
        catch (Exception $e) {
            throw new Exception("Could not update the revision file on server: {$e->getMessage()}");
        }
    }
776278
public function getUpdatedAt() : ?string 
    {
        if ( ! $this->hasUpdatedAt()) {
            $this->setUpdatedAt($this->getDefaultUpdatedAt());
        }
        return $this->updatedAt;
    }
212769
public function getDeletedAtTimestamp(): ?int
    {
        if (!$this->isDeleted()) {
            return null;
        }

	    $timestamp = strtotime($this->getDeletedAt() . 'UTC');

	    if ($timestamp === false) {
		    throw new Exception("Unable to get timestamp from \"{$this->getDeletedAt()}\"");
	    }

	    return $timestamp;
    }
349650
public function modifiedTime($remoteFile, $format = null)
    {
        $time = $this->ftp->mdtm($remoteFile);

        if ($time !== -1 && $format !== null) {
            return date($format, $time);
        }

        return $time;
    }
619834
public function readDate() {
            $dateref = $this->readU29();
            if (($dateref & 0x01) == 0) {
                $dateref = $dateref >> 1;
                if ($dateref>=count($this->storedObjects)) {
                    throw new Exception('Undefined date reference: ' . $dateref);
                    return false;
                }
                return $this->storedObjects[$dateref];
            }

            $timestamp = floor($this->stream->readDouble() / 1000);

            $dateTime = new DateTime('@' . $timestamp);
            
            $this->storedObjects[] = $dateTime;
            return $dateTime;
        }
68680
public function updateCache()
    {
        $ini_path = $this->cacheDir . $this->iniFilename;
        $cache_path = $this->cacheDir . $this->cacheFilename;

        // Choose the right url
        if ($this->_getUpdateMethod() == self::UPDATE_LOCAL) {
            $url = $this->localFile;
        } else {
            $url = $this->remoteIniUrl;
        }

        $this->_getRemoteIniFile($url, $ini_path);

        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
            $browsers = parse_ini_file($ini_path, true, INI_SCANNER_RAW);
        } else {
            $browsers = parse_ini_file($ini_path, true);
        }
        
        $this->_source_version = $browsers[self::BROWSCAP_VERSION_KEY]['Version'];
        unset($browsers[self::BROWSCAP_VERSION_KEY]);
        
        unset($browsers['DefaultProperties']['RenderingEngine_Description']);

        $this->_properties = array_keys($browsers['DefaultProperties']);
        
        array_unshift(
            $this->_properties,
            'browser_name',
            'browser_name_regex',
            'browser_name_pattern',
            'Parent'
        );
        
        $tmp_user_agents = array_keys($browsers);
        

        usort($tmp_user_agents, array($this, 'compareBcStrings'));

        $user_agents_keys = array_flip($tmp_user_agents);
        $properties_keys = array_flip($this->_properties);

        $tmp_patterns = array();

        foreach ($tmp_user_agents as $i => $user_agent) {
          
            if (empty($browsers[$user_agent]['Comment']) || strpos($user_agent, '*') !== false || strpos($user_agent, '?') !== false)
            {
              $pattern = $this->_pregQuote($user_agent);
  
              $matches_count = preg_match_all('@\d@', $pattern, $matches);
  
              if (!$matches_count) {
                $tmp_patterns[$pattern] = $i;
              } else {
                $compressed_pattern = preg_replace('@\d@', '(\d)', $pattern);
  
                if (!isset($tmp_patterns[$compressed_pattern])) {
                  $tmp_patterns[$compressed_pattern] = array('first' => $pattern);
                }
  
                $tmp_patterns[$compressed_pattern][$i] = $matches[0];
              }
            }

            if (!empty($browsers[$user_agent]['Parent'])) {
                $parent = $browsers[$user_agent]['Parent'];
                $parent_key = $user_agents_keys[$parent];
                $browsers[$user_agent]['Parent'] = $parent_key;
                $this->_userAgents[$parent_key . '.0'] = $tmp_user_agents[$parent_key];
            };

            $browser = array();
            foreach ($browsers[$user_agent] as $key => $value) {
                if (!isset($properties_keys[$key]))
                {
                  continue;
                }
                
                $key = $properties_keys[$key];
                $browser[$key] = $value;
            }
            

            $this->_browsers[] = $browser;
        }

        foreach ($tmp_patterns as $pattern => $pattern_data) {
          if (is_int($pattern_data)) {
            $this->_patterns[$pattern] = $pattern_data;
          } elseif (2 == count($pattern_data)) {
            end($pattern_data);
            $this->_patterns[$pattern_data['first']] = key($pattern_data);
          } else {
            unset($pattern_data['first']);

            $pattern_data = $this->deduplicateCompressionPattern($pattern_data, $pattern);

            $this->_patterns[$pattern] = $pattern_data;
          }
        }
        
        // Save the keys lowercased if needed
        if ($this->lowercase) {
            $this->_properties = array_map('strtolower', $this->_properties);
        }

        // Get the whole PHP code
        $cache = $this->_buildCache();

        // Save and return
        return (bool) file_put_contents($cache_path, $cache, LOCK_EX);
    }
853387
public function getLocalCopy()
    {
        /** @var ConfigModel $settings */
        $config = ImagerService::getConfig();

        if ($this->type !== 'local') {
            if (!file_exists($this->getFilePath()) || (($config->cacheDurationRemoteFiles !== false) && ((FileHelper::lastModifiedTime($this->getFilePath()) + $config->cacheDurationRemoteFiles) < time()))) {
                if ($this->asset && $this->type === 'volume') {
                    /** @var Volume $volume */
                    try {
                        $volume = $this->asset->getVolume();
                    } catch (InvalidConfigException $e) {
                        Craft::error($e->getMessage(), __METHOD__);
                        throw new ImagerException($e->getMessage(), $e->getCode(), $e);
                    }

                    $volume->saveFileLocally($this->asset->getPath(), $this->getFilePath());
                }

                if ($this->type === 'remoteurl') {
                    $this->downloadFile();
                }

                if (file_exists($this->getFilePath())) {
                    ImagerService::registerCachedRemoteFile($this->getFilePath());
                }
            }

            if (!file_exists($this->getFilePath())) {
                $msg = Craft::t('imager', 'File could not be downloaded and saved to “{path}”', ['path' => $this->path]);
                Craft::error($msg, __METHOD__);
                throw new ImagerException($msg);
            }
        }
    }
135160
private function getCustomerIP()
    {
        $ip = null;
        if(array_key_exists('X-Forwarded-For', $_SERVER)) {
            $ip = $_SERVER['X-Forwarded-For'];
        } elseif(array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER)) {
            $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
        } elseif(array_key_exists('REMOTE_ADDR', $_SERVER)) {
            $ip = $_SERVER['REMOTE_ADDR'];
        }

        return $ip;
    }
590555
@Override
    public long lastModified() throws IOException {
        long lastModified = getFileForLastModifiedCheck().lastModified();
        if (lastModified == 0L) {
            throw new FileNotFoundException(
                getDescription() + " cannot be resolved in the file system for resolving its last-modified timestamp");
        }
        return lastModified;
    }
771964
public function next():int
    {
        $timestamp = $this->milliTime();
        if ($timestamp < $this->_lastTimestamp) {
            throw new Exception(sprintf("Clock moved backwards.  Refusing to generate id for %d milliseconds", $this->_lastTimestamp - $timestamp));
        }
        if ($this->_lastTimestamp == $timestamp) {
            $this->_sequence = ($this->_sequence + 1) & self::SEQUENCE_MASK;
            if ($this->_sequence == 0) {
                $timestamp = $this->waitNextMilli($this->_lastTimestamp);
            }
        } else {
            $this->_sequence = 0;
        }
        $this->_lastTimestamp = $timestamp;
        return (($timestamp - $this->epoch) << self::TIMESTAMP_LEFT_SHIFT)
            | ($this->dataCenterId << self::DATA_CENTER_ID_SHIFT)
            | ($this->workerId << self::WORKER_ID_SHIFT)
            | $this->_sequence;
    }
948230
public function commit() {
		if (!$this->inTransaction()) {
			throw new Exception('There is no active transaction');
		}

		$res = @oci_commit($this->_dbh);
		$this->checkError($res);

		$this->_inTransaction = false;
		$this->_commitMode = null;

		return $res;
	}