core
in package
core contains the GitHub Profile, and builds the plugin UI.
Table of Contents
- $avatarURL : mixed
- $bio : mixed
- $call : mixed
- $company : mixed
- $followers : mixed
- $following : mixed
- $hTMLURL : mixed
- $login : mixed
- $name : mixed
- $popularLanguages : mixed
- $publicRepos : mixed
- $repos : mixed
- __construct() : mixed
- Constructor for the core API class.
- show() : void
- Collates all of the necessary data to build the plugin, and calls build_ui() to do so.
- build_ui() : void
- Builds the Plugin UI.
- repo_sort() : int
- A recursive array sorting algorithm used by usort in show().
Properties
$avatarURL
private
mixed
$avatarURL
$bio
private
mixed
$bio
$call
private
mixed
$call
$company
private
mixed
$company
$followers
private
mixed
$followers
$following
private
mixed
$following
$hTMLURL
private
mixed
$hTMLURL
$login
private
mixed
$login
$name
private
mixed
$name
$popularLanguages
private
mixed
$popularLanguages
$publicRepos
private
mixed
$publicRepos
$repos
private
mixed
$repos
Methods
__construct()
Constructor for the core API class.
public
__construct(string $personalAccessToken, string $gitHubUsername) : mixed
Parameters
- $personalAccessToken : string
-
The user's GitHub Personal Access Token.
- $gitHubUsername : string
-
The user's GitHub Username.
Return values
mixed —show()
Collates all of the necessary data to build the plugin, and calls build_ui() to do so.
public
show([int $bootstrapVersion = 4 ], int $numberOfRepos[, int $numberOfLanguages = 3 ]) : void
Parameters
- $bootstrapVersion : int = 4
-
Takes "4" or "5" to use Bootstrap 4 or 5.
- $numberOfRepos : int
-
Number of repos to display, 0 shows all.
- $numberOfLanguages : int = 3
-
Number of languages to display, 0 shows all.
Return values
void —build_ui()
Builds the Plugin UI.
private
build_ui(int $bootstrapVersion, int $numberOfRepos) : void
Parameters
- $bootstrapVersion : int
-
Bootstrap 4 or 5.
- $numberOfRepos : int
-
The number of Repos to show.
Return values
void —repo_sort()
A recursive array sorting algorithm used by usort in show().
private
repo_sort(object $a, object $b) : int
Sorts two repos by most recent push.
Parameters
- $a : object
-
One repo structure.
- $b : object
-
Another repo structure.
Return values
int —Signifies to usort the ordering for the two elements.