ConsoleRunner.php
Static Export Console Runner
CLI経由でプロジェクトルートとURLを指定してHTMLを静的エクスポートするための関数群
Tags
Table of Contents
Functions
- errorExit() : never
- エラーメッセージを出力して終了
- getCurrentDirectory() : string
- 現在のディレクトリパスを取得
- getIndexFile() : string
- index.phpのパスを検証して取得
- parseUrl() : array{host: string|null, path: string, query: string, isHttps: bool}
- URLを解析してパラメータを取得
- buildServerEnvironment() : void
- 仮想サーバー環境を構築
- run() : void
- メイン処理を実行
Functions
errorExit()
エラーメッセージを出力して終了
errorExit(string $message) : never
Parameters
- $message : string
Return values
nevergetCurrentDirectory()
現在のディレクトリパスを取得
getCurrentDirectory() : string
Return values
stringgetIndexFile()
index.phpのパスを検証して取得
getIndexFile(string $projectRoot) : string
Parameters
- $projectRoot : string
Return values
stringparseUrl()
URLを解析してパラメータを取得
parseUrl(string $url) : array{host: string|null, path: string, query: string, isHttps: bool}
Parameters
- $url : string
Return values
array{host: string|null, path: string, query: string, isHttps: bool}buildServerEnvironment()
仮想サーバー環境を構築
buildServerEnvironment(string $indexFile, string $url, array{host: string|null, path: string, query: string, isHttps: bool} $urlParams[, string|null $userAgent = null ]) : void
Parameters
- $indexFile : string
- $url : string
- $urlParams : array{host: string|null, path: string, query: string, isHttps: bool}
- $userAgent : string|null = null
run()
メイン処理を実行
run(array<int, string> $argv) : void
Parameters
- $argv : array<int, string>