1. Go to this page and download the library: Download ierusalim/github-repo-walk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ierusalim / github-repo-walk example snippets
namespace ierusalim\GitRepoWalk;
teEnable(); // if skip it remote repository will be compare with local
//download all files from repository to local-path
$stat = $g->gitRepoWalk(
'<local path for repository>',
'ierusalim/github-repo-walk' //git-user and repository in one string
);
print_r($stat);
//Get repositories list for specified user:
$repo_list_arr = $g->getUserRepositoriesList('php-fig');
//Get information about repository 'user/repo'
$repo_info = $g->getRepositoryInfo('ierusalim/github-repo-walk');
//Get contacts from repository 'user/repo' (emails, names, roles)
$contacts = $g->getRepositoryContacts('ierusalim/github-repo-walk');
print_r($contacts);
//Get files list from repository
$files = $g->getRepoFilesList("ierusalim/github-repo-walk");
//show file names
foreach($files->tree as $file_obj) {
echo $file_obj->path . "\t{$file_obj->size}\n";
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.