Overview

Namespaces

  • ApiAxle
    • Api
    • Shared
  • ApiAxleTest
    • Api
    • Shared
  • PHP

Classes

  • Api
  • Key
  • Keyring
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class Keyring

ApiAxle\Api\Keyring class

Wraps Keyring related calls to the ApiAxle API

Namespace: ApiAxle\Api
Author: Phillip Shipley <phillip@phillipshipley.com>
Located at src/ApiAxle/Api/Keyring.php
Methods summary
public
# __construct( ApiAxle\Shared\Config $config = false, string $name = false )

Construct new Keyring object

Construct new Keyring object

If $name is provided it will fetch the created/updated values from API

Parameters

$config
ApiAxle\Shared\Config
$config
$name
string
$name
public string
# getName( )

Return current name value

Return current name value

Returns

string
public
# setName( string $name )

Set name value

Set name value

Parameters

$name
string
$name
public ApiAxle\Api\Keyring
# setData( array $data )

Set object properties

Set object properties

Parameters

$data
array
$data

Returns

ApiAxle\Api\Keyring
public ApiAxle\Api\Keyring
# get( string $name )

Fetch keyring information from ApiAxle API and update object properties

Fetch keyring information from ApiAxle API and update object properties

Parameters

$name
string
$key

Returns

ApiAxle\Api\Keyring
public ApiAxle\Api\Key
# create( string $name, array $keys = false )

Create a new keyring

Create a new keyring

Parameters

$name
string
$name
$keys
array
$keys

Returns

ApiAxle\Api\Key

Throws

ErrorException
public ApiAxle\Shared\ItemList
# getList( integer $from = 0, integer $to = 100, string $resolve = 'true' )

Get a list of all Keyrings

Get a list of all Keyrings

Parameters $from and $to are used for pagination of results

Parameters

$from
integer
$from
$to
integer
$to
$resolve
string
$resolve

Returns

ApiAxle\Shared\ItemList
public boolean
# delete( string $name = false )

Delete a keyring

Delete a keyring

Parameters

$name
string
$name

Returns

boolean

Throws

Exception
ErrorException
public ApiAxle\Shared\ItemList
# getKeyList( integer $from = 0, integer $to = 100, string $resolve = 'true' )

Get a list of Keys with access to this Keyring

Get a list of Keys with access to this Keyring

Parameters $from and $to are used for paginating through results

Parameters

$from
integer
$from Default is 0
$to
integer
$to Default is 100
$resolve
string
$resolve Wether or not get Key details. Default is 'true'

Returns

ApiAxle\Shared\ItemList

Throws

Exception
ErrorException
public ApiAxle\Api\Keyring
# linkKeys( array $keys )

Convenience method to pass an array of keys to be linked after creating keyring.

Convenience method to pass an array of keys to be linked after creating keyring.

Parameters

$keys
array
$keys

Returns

ApiAxle\Api\Keyring
public ApiAxle\Api\Keyring
# linkKey( ApiAxle\Api\Key $key )

Link a Key to this Keyring

Link a Key to this Keyring

Parameters

$key
ApiAxle\Api\Key
$key

Returns

ApiAxle\Api\Keyring

Throws

Exception
public ApiAxle\Api\Keyring
# unLinkKey( ApiAxle\Api\Key $key )

Unlink a Key from this Keyring

Unlink a Key from this Keyring

Parameters

$key
ApiAxle\Api\Key
$key

Returns

ApiAxle\Api\Keyring

Throws

Exception
public type
# getStats( integer $timestart = false, integer $timeend = false, string $granularity = 'minute', string $format_timeseries = 'true', string $format_timestamp = 'epoch_seconds', ApiAxle\Api\Key $forkey = false, ApiAxle\Api\Api $forapi = false )

Get real time hits for a keyring

Get real time hits for a keyring

Parameters

$timestart
integer
$timestart
$timeend
integer
$timeend
$granularity
string
$granularity
$format_timeseries
string
$format_timeseries
$format_timestamp
string
$format_timestamp
$forkey
ApiAxle\Api\Key
$forkey
$forapi
ApiAxle\Api\Api
$forapi

Returns

type

Throws

Exception
public
# getCreatedAt( )
public ApiAxle\Shared\Config
# getConfig( )

Return config object

Return config object

Returns

ApiAxle\Shared\Config
public
# isValid( )
Properties summary
protected ApiAxle\Shared\Config $config
#

Configuration data

Configuration data

protected string $name
#

Keyring Name

Keyring Name

protected integer $createdAt
#

Created at timestamp, set automatically by API

Created at timestamp, set automatically by API

protected integer $updatedAt
#

Updated at timestamp, set automatically by API

Updated at timestamp, set automatically by API

fillup/apiaxle API documentation generated by ApiGen 2.8.0