Sslurp\MozillaCertData::getContent PHP Méthode

getContent() public méthode

Get the raw certdata.txt contents from mxr.mozilla.org
public getContent ( $until = false ) : string
Résultat string
    public function getContent($until = false)
    {
        if ($until) {
            // don't cache the partial fetch for version check
            if ($this->certData !== null) {
                return substr($this->certData, 0, strpos($this->certData, "\n", strpos($this->certData, $until)));
            }
            return $this->fetchLatestCertData($until);
        }
        if ($this->certData === null) {
            $this->certData = $this->fetchLatestCertData();
        }
        return $this->certData;
    }

Usage Example

 public function getUpdatedCaRootBundle()
 {
     return $this->buildBundle($this->mozCertData->getContent());
 }