public function getLastNonce() { if (preg_match('~Replay\\-Nonce: (.+)~i', $this->lastHeader, $matches)) { return trim($matches[1]); } $this->curl('GET', '/directory'); return $this->getLastNonce(); }