PHP Класс OpenSkill\Datatable\Versions\VersionEngine

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( array $versions ) DTVersionEngine constructor. The first version will be set as default version.
getVersion ( ) : OpenSkill\Datatable\Versions\Version
hasVersion ( ) : boolean
setVersion ( OpenSkill\Datatable\Versions\Version $version )

Приватные методы

Метод Описание
setDefaultVersion ( array $versions ) Set the default version that will be used by the VersionEngine.
setVersionFromRequest ( array $versions ) Pick the verison of an engine that can parse a request.

Описание методов

__construct() публичный Метод

DTVersionEngine constructor. The first version will be set as default version.
public __construct ( array $versions )
$versions array an array of possible version this data table supports

getVersion() публичный Метод

public getVersion ( ) : OpenSkill\Datatable\Versions\Version
Результат OpenSkill\Datatable\Versions\Version Will return the version that is currently selected to handle the request.

hasVersion() публичный Метод

public hasVersion ( ) : boolean
Результат boolean true if one of the versions can handle the request, false otherwise

setVersion() публичный Метод

public setVersion ( OpenSkill\Datatable\Versions\Version $version )
$version OpenSkill\Datatable\Versions\Version The version that should be used in this request.