Jinya CMS

ApiKey
in package
implements Creatable, Deletable, Updatable Uses EntityTrait

This class contains an api key, used to log in to Jinya CMS api

Tags

Interfaces, Classes, Traits and Enums

Creatable
Deletable
Updatable

Table of Contents

$apiKey  : string
$remoteAddress  : string
$userAgent  : string
$userId  : int
$validSince  : DateTime
create()  : void
delete()  : void
findByApiKey()  : ApiKey|null
Gets the api key object that belongs to the key
findByArtist()  : Iterator<string|int, ApiKey>
Gets all api keys for the given artist
format()  : array<string, string>
Formats the api key into an array
getArtist()  : Artist|null
Gets the artist belonging to the api key
setApiKey()  : void
Sets the api key securely
update()  : void

Properties

$apiKey

public string $apiKey
Tags

$remoteAddress

public string $remoteAddress
Tags

$userAgent

public string $userAgent
Tags

$validSince

public DateTime $validSince
Tags

Methods

create()

public create() : void
Tags
Return values
void

delete()

public delete() : void
Tags
Return values
void

findByApiKey()

Gets the api key object that belongs to the key

public static findByApiKey(string $apiKey) : ApiKey|null
Parameters
$apiKey : string

The api key to search for

Tags
Return values
ApiKey|null

findByArtist()

Gets all api keys for the given artist

public static findByArtist(int $artistId) : Iterator<string|int, ApiKey>
Parameters
$artistId : int

The ID of the artist

Tags
Return values
Iterator<string|int, ApiKey>

format()

Formats the api key into an array

public format() : array<string, string>
Tags
Return values
array<string, string>

getArtist()

Gets the artist belonging to the api key

public getArtist() : Artist|null
Tags
Return values
Artist|null

setApiKey()

Sets the api key securely

public setApiKey() : void
Tags
throws
Exception
Return values
void

update()

public update() : void
Tags
Return values
void

Search results