Documentation

ServiceLogic extends ServiceLogicWithModel
in package
Uses StandartSecurityMethods

Class stores all service's logic

Tags
author

Dodonov A.A.

Table of Contents

$model  : ServiceModel
Model
$authorizationProvider  : AuthorizationProviderInterface
Authorization provider
$paramsFetcher  : RequestParamsInterface
Request params fetcher
$securityProvider  : ProviderInterface
Security provider
__construct()  : mixed
Constructor
connect()  : array<string|int, mixed>
Method creates connection
getAuthorizationProvider()  : AuthorizationProviderInterface
Method returns AuthorizationProvider
getParamsFetcher()  : RequestParamsInterface
Method return params fetcher
getSecurityProvider()  : ProviderInterface
Method returns security provider
getSelfId()  : array<string|int, mixed>
Method returns session user's id
getSelfIdValue()  : int
Method returns self id
getSelfLogin()  : array<string|int, mixed>
Method returns session user's login
getSelfLoginValue()  : string
Method returns self login
hasPermit()  : bool
Checking does user has permit
loginAs()  : array<string|int, mixed>
Method allows to login under another user
setSecurityProvider()  : void
Method sets security provider
setToken()  : array<string|int, mixed>
Method sets token
validatePermit()  : void
The same as hasPermit but throwing exception for session user no permit
getParam()  : mixed
Method returns request parameter
getSessionId()  : string
Method returns session id

Properties

Methods

connect()

Method creates connection

public connect() : array<string|int, mixed>
Return values
array<string|int, mixed>

session id

getSelfId()

Method returns session user's id

public getSelfId() : array<string|int, mixed>
Return values
array<string|int, mixed>

session user's id

getSelfIdValue()

Method returns self id

public getSelfIdValue() : int
Return values
int

session user's id

getSelfLogin()

Method returns session user's login

public getSelfLogin() : array<string|int, mixed>
Return values
array<string|int, mixed>

session user's login

getSelfLoginValue()

Method returns self login

public getSelfLoginValue() : string
Return values
string

session user's login

hasPermit()

Checking does user has permit

public hasPermit(string $permit) : bool
Parameters
$permit : string

permit to check

Return values
bool

true or false if the session user has permit or not

loginAs()

Method allows to login under another user

public loginAs() : array<string|int, mixed>
Return values
array<string|int, mixed>

session id

setToken()

Method sets token

public setToken() : array<string|int, mixed>
Return values
array<string|int, mixed>

Session id

validatePermit()

The same as hasPermit but throwing exception for session user no permit

public validatePermit(string $permit) : void
Parameters
$permit : string

permit name

Return values
void

getParam()

Method returns request parameter

protected getParam(string $param[, mixed $default = false ]) : mixed
Parameters
$param : string

parameter name

$default : mixed = false

default value

Return values
mixed

Parameter value

getSessionId()

Method returns session id

protected getSessionId() : string
Return values
string

session id

Search results

    Яндекс.Метрика