PHP Class Opensoft\Rollout\Feature

Author: Richard Fullmer ([email protected])
Afficher le fichier Open project: opensoft/rollout Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( string $name, string | null $settings = null )
addGroup ( string $group )
addUser ( RolloutUserInterface $user )
clear ( ) Clear the feature of all configuration
getGroups ( ) : array
getName ( ) : string
getPercentage ( ) : integer
getRequestParam ( ) : string | null
getUsers ( ) : array
isActive ( Rollout $rollout, RolloutUserInterface $user = null, array $requestParameters = [] ) : boolean Is the feature active?
removeGroup ( string $group )
removeUser ( RolloutUserInterface $user )
serialize ( ) : string
setPercentage ( integer $percentage )
setRequestParam ( string | null $requestParam )
toArray ( ) : array

Private Methods

Méthode Description
isParamInRequestParams ( array $requestParameters ) : boolean
isUserInActiveGroup ( RolloutUserInterface $user, Rollout $rollout ) : boolean
isUserInActiveUsers ( RolloutUserInterface $user ) : boolean
isUserInPercentage ( RolloutUserInterface $user ) : boolean

Method Details

__construct() public méthode

public __construct ( string $name, string | null $settings = null )
$name string
$settings string | null

addGroup() public méthode

public addGroup ( string $group )
$group string

addUser() public méthode

public addUser ( RolloutUserInterface $user )
$user RolloutUserInterface

clear() public méthode

Clear the feature of all configuration
public clear ( )

getGroups() public méthode

public getGroups ( ) : array
Résultat array

getName() public méthode

public getName ( ) : string
Résultat string

getPercentage() public méthode

public getPercentage ( ) : integer
Résultat integer

getRequestParam() public méthode

public getRequestParam ( ) : string | null
Résultat string | null

getUsers() public méthode

public getUsers ( ) : array
Résultat array

isActive() public méthode

Is the feature active?
public isActive ( Rollout $rollout, RolloutUserInterface $user = null, array $requestParameters = [] ) : boolean
$rollout Rollout
$user RolloutUserInterface
$requestParameters array
Résultat boolean

removeGroup() public méthode

public removeGroup ( string $group )
$group string

removeUser() public méthode

public removeUser ( RolloutUserInterface $user )
$user RolloutUserInterface

serialize() public méthode

public serialize ( ) : string
Résultat string

setPercentage() public méthode

public setPercentage ( integer $percentage )
$percentage integer

setRequestParam() public méthode

public setRequestParam ( string | null $requestParam )
$requestParam string | null

toArray() public méthode

public toArray ( ) : array
Résultat array