public static function get($privateKeyFile) { if (!isset(self::$keys[$privateKeyFile])) { self::$keys[$privateKeyFile] = new PrivateKey($privateKeyFile); } return self::$keys[$privateKeyFile]; }
public function getPrivateKey() { $keyName = $this->getKeyName(); if (empty($keyName)) { return null; // throw new \Exception('No KeyName found'); } return PrivateKey::get('keys/' . $keyName . '.pem'); }