finder = new Finder(); } public function isCli(): bool { return PHP_SAPI === 'cli'; } public function getFinder(): Finder { $this->finder->in(__DIR__ . '/../../../examples/provider/'); return $this->finder; } public function getHeader(): string { $title = $this->title; return << $title

$title

HTML; } public function getFooter() { return << HTML; } public function getForm(): string { return <<
HTML; } public function getContent(): string { $response = $this->getHeader(); $response .= $this->getForm(); $response .= $this->getFooter(); return $response; } public function isShowLink(): bool { return true; } public function getCurrentUrl(): string { return 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '?oauth=redirect&key=' . urldecode($_GET['key']) . '&secret=' . urldecode($_GET['secret']); } public function getErrorMessage($exception): void { echo '
' . $exception->getMessage() . '
'; echo '
';
        print_r($exception);
        echo '
'; } public function setTitle(string $title): void { $this->title = 'PHPoAuthLib - ' . $title; } }