Documentation

O3PO_Author
in package

A class to represent authors.

Tags
subpackage

O3PO/includes

author

Christian Gogolin o3po@quantum-journal.org

Table of Contents

Properties

$affiliations  : mixed
Array of affiliations.
$given_name  : mixed
Given name.
$name_style  : mixed
Name style.
$name_styles  : mixed
Array of valid name styles
$orcid  : mixed
ORCID.
$surname  : mixed
Surname.
$url  : mixed
Url.

Methods

__construct()  : mixed
Construct an author
get()  : string
Get the content of any field of the the author.
get_affiliations_csv()  : string
Get a comma separated string of the author's affiliations.
get_name()  : string
Get the full name of the author.
get_name_bibtex()  : string
Get the name in bibtex format.
get_name_style()  : string
Get the name style.
get_surname()  : string
Get the surname of the author.

Properties

$affiliations

Array of affiliations.

private mixed $affiliations

An array of strings of the affiliations of the author.

Tags
since
0.3.0
access

private

$given_name

Given name.

private mixed $given_name
Tags
since
0.3.0
access

private

$name_style

Name style.

private mixed $name_style

Can be one of "western", "eastern", "islensk", or "given-only".

Tags
since
0.3.0
access

private

$name_styles

Array of valid name styles

private static mixed $name_styles = array("western", "eastern", "islensk", "given-only")
Tags
since
0.3.0
access

private

Methods

__construct()

Construct an author

public __construct(string $given_name, string $surname[, string $name_style = 'western' ][, string $orcid = '' ][, string $url = '' ][, array<string|int, mixed>|string $affiliations = array() ]) : mixed

Construct an author object from given_name, surname, and further details. The $orcid is verified with a checksum test, and $affiliations can be given as both an array of strings or a single string of comma separated affiliations. Affiliations that contain a comma must be passed as an array containing a single string.

Parameters
$given_name : string

The given name.

$surname : string

The surname.

$name_style : string = 'western'

(optional) One of "western", "eastern", "islensk", ir "given-only".

$orcid : string = ''

(optional) The ORCID

$url : string = ''

(optional) The url, for example of the authors homepage.

$affiliations : array<string|int, mixed>|string = array()

(optional) The affiliations of the author, either as an array of strings or a single string of comma separated affiliations.

Tags
since
0.3.0
access

public

get()

Get the content of any field of the the author.

public get(string $field) : string
Parameters
$field : string

The field whose value to get.

Tags
since
0.3.0
access

public

Return values
string —

Value of the $field.

get_affiliations_csv()

Get a comma separated string of the author's affiliations.

public get_affiliations_csv() : string

TODO: Commas in affiliations are not escaped.

Tags
sice

0.3.0

access

public

Return values
string —

Comma separated string of affiliations.

get_name()

Get the full name of the author.

public get_name() : string
Tags
since
0.3.0
0.4.0

Name styles are honored

access

public

Return values
string —

The name of the author.

get_name_bibtex()

Get the name in bibtex format.

public get_name_bibtex() : string
Tags
since
0.4.0
access

public

Return values
string —

The name of the author.

get_name_style()

Get the name style.

public get_name_style() : string
Tags
since
0.4.0
access

public

Return values
string —

The name of the author.

get_surname()

Get the surname of the author.

public get_surname() : string
Tags
sice

0.3.0

access

public

Return values
string —

The surname of the author.


        
On this page

Search results