| Author | Dave Jarvis <email> |
|---|---|
| Date | 2026-02-23 13:57:33 GMT-0800 |
| Commit | 9819949531e06779efefa5a2d843a5f4b28d24b4 |
| Parent | 11a80fb |
| public const SITE_TITLE = "Dave Jarvis' Repositories"; | ||
| private const REPOS_SUBDIR = '/repos'; | ||
| + private const ORDER_FILE = __DIR__ . '/order.txt'; | ||
| private const LOG_FILE = '/error.log'; | ||
| public function createRouter() { | ||
| - return new Router( $this->getHomeDirectory() . self::REPOS_SUBDIR ); | ||
| + return new Router( | ||
| + $this->getHomeDirectory() . self::REPOS_SUBDIR, | ||
| + self::ORDER_FILE | ||
| + ); | ||
| } | ||
| <?php | ||
| class RepositoryList { | ||
| - private const ORDER_FILE = __DIR__ . '/../order.txt'; | ||
| private const GIT_EXT = '.git'; | ||
| private const GLOB_PATTERN = '/*'; | ||
| private string $reposPath; | ||
| + private string $orderFile; | ||
| - public function __construct( string $path ) { | ||
| + public function __construct( string $path, string $orderFile ) { | ||
| $this->reposPath = $path; | ||
| + $this->orderFile = $orderFile; | ||
| } | ||
| private function sortRepositories( array $repos ): array { | ||
| - $file = self::ORDER_FILE; | ||
| + $file = $this->orderFile; | ||
| if( file_exists( $file ) ) { | ||
| private string $baseHash = ''; | ||
| - public function __construct( string $reposPath ) { | ||
| + public function __construct( string $reposPath, string $orderFile ) { | ||
| $this->git = new Git( $reposPath ); | ||
| - $list = new RepositoryList( $reposPath ); | ||
| + $list = new RepositoryList( $reposPath, $orderFile ); | ||
| $list->eachRepository( function( $repo ) { |
| Delta | 11 lines added, 6 lines removed, 5-line increase |
|---|