Author
in package
Allows you to easily add pre-defined authors for your blog posts.
Tags
Table of Contents
Methods
- all() : Collection<string|int, PostAuthor>
- Get all the defined Post Author instances from the config.
- create() : PostAuthor
- Construct a new Post Author. For Hyde to discover this author, you must call this method from your hyde.php config file.
- get() : PostAuthor
- Get a Post Author instance from the config. If no author matching the username is found, a new Post Author instance will be created with just username supplied to the method.
Methods
all()
Get all the defined Post Author instances from the config.
public
static all() : Collection<string|int, PostAuthor>
Return values
Collection<string|int, PostAuthor>create()
Construct a new Post Author. For Hyde to discover this author, you must call this method from your hyde.php config file.
public
static create(string $username[, string|null $name = null ][, string|null $website = null ]) : PostAuthor
Parameters
- $username : string
-
The username of the author. This is the key used to find authors in the config.
- $name : string|null = null
-
The optional display name of the author, leave blank to use the username.
- $website : string|null = null
-
The author's optional website URL. Website, Twitter, etc.
Tags
Return values
PostAuthorget()
Get a Post Author instance from the config. If no author matching the username is found, a new Post Author instance will be created with just username supplied to the method.
public
static get(string $username) : PostAuthor
Parameters
- $username : string