\CRUDServiceCollection

Collection of the crud service's records.

Summary

Methods
Properties
Constants
__construct()
instance()
get_token()
new_records_since()
top_by_field()
$Collection
$Connector
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$Collection

$Collection : array

Collection of records.

Type

array

$Connector

$Connector : \CRUDServiceClient

Connection to the CRUD service.

Type

\CRUDServiceClient

Methods

__construct()

__construct(string  $Service, string  $Token) 

Constructor.

Parameters

string $Service
string $Token

instance()

instance(string  $Token) : \CRUDServiceCollection

Method creates connector to service.

Parameters

string $Token
  • Connection token.

Returns

\CRUDServiceCollection

Instance of the CRUDServiceCollection class.

get_token()

get_token(string  $Service, string  $Login, string  $Password) : string

Method initializes $Connector.

Parameters

string $Service
  • Service to be connected to.
string $Login
  • Login.
string $Password
  • Password.

Returns

string —

Token.

new_records_since()

new_records_since(string  $DateTime) 

Method fetches scripts, wich were created since $DateTime;

Parameters

string $DateTime

top_by_field()

top_by_field(integer  $Count, string  $Field, string  $Order = 'DESC') 

Fetching top $Count records sorted by field.

Parameters

integer $Count
  • Count of records to be fetched;
string $Field
  • Sorting field;
string $Order
  • Sorting order.