GlobalScaleService
in package
Uses
TNCRequest, TStringTools
Class GlobalScaleService
Table of Contents
- $configService : ConfigService
- $eventWrapperRequest : EventWrapperRequest
- $miscService : MiscService
- $signer : Signer
- $urlGenerator : IURLGenerator
- $userManager : IUserManager
- $userSession : IUserSession
- __construct() : mixed
- GlobalScaleService constructor.
- clientService() : IClientService
- doRequest() : void
- generateRandomSentence() : string
- generateRandomWord() : string
- getDateDiff() : string
- getGlobalScaleInstances() : array<string|int, mixed>
- humanReadable() : string
- retrieveJson() : array<string|int, mixed>
- setMaxDownloadSize() : mixed
- commonPart() : string
- cut() : string
- feedStringWithParams() : string
- isUuid() : bool
- token() : string
- uuid() : string
- Generate uuid: 2b5a7a87-8db1-445f-a17b-405790f91c80
- generationClientOptions() : mixed
- useClient() : IResponse
Properties
$configService
private
ConfigService
$configService
$eventWrapperRequest
private
EventWrapperRequest
$eventWrapperRequest
$miscService
private
MiscService
$miscService
$signer
private
Signer
$signer
$urlGenerator
private
IURLGenerator
$urlGenerator
$userManager
private
IUserManager
$userManager
$userSession
private
IUserSession
$userSession
Methods
__construct()
GlobalScaleService constructor.
public
__construct(IURLGenerator $urlGenerator, IUserManager $userManager, IUserSession $userSession, Signer $signer, EventWrapperRequest $eventWrapperRequest, ConfigService $configService, MiscService $miscService) : mixed
Parameters
- $urlGenerator : IURLGenerator
- $userManager : IUserManager
- $userSession : IUserSession
- $signer : Signer
- $eventWrapperRequest : EventWrapperRequest
- $configService : ConfigService
- $miscService : MiscService
Return values
mixed —clientService()
public
clientService() : IClientService
Return values
IClientService —doRequest()
public
doRequest(NCRequest $request[, bool $exceptionOnIssue = true ]) : void
Parameters
- $request : NCRequest
- $exceptionOnIssue : bool = true
Tags
Return values
void —generateRandomSentence()
public
generateRandomSentence([int $words = 5 ]) : string
Parameters
- $words : int = 5
Return values
string —generateRandomWord()
public
generateRandomWord([int $length = 8 ]) : string
Parameters
- $length : int = 8
Return values
string —getDateDiff()
public
getDateDiff(int $first, int $second[, bool $short = false ][, array<string|int, mixed> $words = [] ]) : string
Parameters
- $first : int
- $second : int
- $short : bool = false
- $words : array<string|int, mixed> = []
Tags
Return values
string —getGlobalScaleInstances()
public
getGlobalScaleInstances() : array<string|int, mixed>
Return values
array<string|int, mixed> —humanReadable()
public
humanReadable(int $bytes) : string
Parameters
- $bytes : int
Return values
string —retrieveJson()
public
retrieveJson(NCRequest $request) : array<string|int, mixed>
Parameters
- $request : NCRequest
Tags
Return values
array<string|int, mixed> —setMaxDownloadSize()
public
setMaxDownloadSize(int $size) : mixed
Parameters
- $size : int
Return values
mixed —commonPart()
protected
commonPart(string $str1, string $str2[, bool $cs = true ]) : string
Parameters
- $str1 : string
- $str2 : string
- $cs : bool = true
-
case sensitive ?
Return values
string —cut()
protected
cut(string $line, int $length) : string
Parameters
- $line : string
- $length : int
Return values
string —feedStringWithParams()
protected
feedStringWithParams(string $line, array<string|int, mixed> $params) : string
Parameters
- $line : string
- $params : array<string|int, mixed>
Return values
string —isUuid()
protected
isUuid(string $uuid) : bool
Parameters
- $uuid : string
Return values
bool —token()
protected
token([int $length = 15 ]) : string
Parameters
- $length : int = 15
Return values
string —uuid()
Generate uuid: 2b5a7a87-8db1-445f-a17b-405790f91c80
protected
uuid(int $length) : string
Parameters
- $length : int
Return values
string —generationClientOptions()
private
generationClientOptions(NCRequest $request) : mixed
Parameters
- $request : NCRequest
Return values
mixed —useClient()
private
useClient(NCRequest $request) : IResponse
Parameters
- $request : NCRequest