PHP Класс ZF\Apigility\Admin\Model\ModuleVersioningModel

Автор: Gabriel Somoza ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$configResource ZF\Configuration\ConfigResource
$docsConfigResource null | ZF\Configuration\ConfigResource
$moduleNameFilter Zend\Filter\FilterChain

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

Метод Описание
__construct ( string $moduleName, string $configDirPath, string $srcPath, ZF\Configuration\ConfigResource $config, ZF\Configuration\ConfigResource $docsConfig = null, null | string $pathSpecType = null )
createVersion ( integer $version ) : true Create a new version for a module
createWithPathSpec ( string $moduleName, ModulePathSpec $pathSpec, ZF\Configuration\ConfigResource $config, ZF\Configuration\ConfigResource $docsConfig = null ) : static createWithPathSpec
getModuleVersions ( ) : array | boolean Get the versions of a module
setDefaultVersion ( integer $defaultVersion ) : boolean Updates the default version of a module that will be used if no version is specified by the API consumer.

Защищенные методы

Метод Описание
changeVersionArray ( array $data, integer $previous, integer $version ) : array Change version in an array
changeVersionNamespace ( string $string, integer $previous, integer $version ) : string Change version in a namespace
getModuleNameFilter ( ) : Zend\Filter\FilterChain Filter for module names
recursiveCopy ( string $source, string $target, integer $previous, integer $version ) Copy file and folder recursively
updateConfigVersion ( string $file, integer $previous, integer $version ) : boolean Update a PHP configuration file from $previous to $version version
updateDocumentationVersion ( integer $previous, integer $version ) : true Update the documentation to add a new $version based on the $previous

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

Метод Описание
setConfigDirPath ( string $configDirPath ) : void
setPathSpecType ( string $pathSpecType ) : void
setVersionsPath ( string $srcPath ) : void Sets the path to the directory that contains each of the module's version. If the current module is a PSR-0 module then it automatically appends the module's namespace.

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

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

public __construct ( string $moduleName, string $configDirPath, string $srcPath, ZF\Configuration\ConfigResource $config, ZF\Configuration\ConfigResource $docsConfig = null, null | string $pathSpecType = null )
$moduleName string Name of the module. MUST be normalized.
$configDirPath string Path the the configuration folder, with one or more *.config.php files.
$srcPath string Path to the module's source folder for versions, resources & collections.
$config ZF\Configuration\ConfigResource
$docsConfig ZF\Configuration\ConfigResource
$pathSpecType null | string Whether the module uses a PSR-0 directory structure or not. Defaults to ModulePathSpec::PSR_0.

changeVersionArray() защищенный Метод

Change version in an array
protected changeVersionArray ( array $data, integer $previous, integer $version ) : array
$data array
$previous integer
$version integer
Результат array

changeVersionNamespace() защищенный Метод

Change version in a namespace
protected changeVersionNamespace ( string $string, integer $previous, integer $version ) : string
$string string
$previous integer
$version integer
Результат string

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

Create a new version for a module
public createVersion ( integer $version ) : true
$version integer
Результат true

createWithPathSpec() публичный статический Метод

createWithPathSpec
public static createWithPathSpec ( string $moduleName, ModulePathSpec $pathSpec, ZF\Configuration\ConfigResource $config, ZF\Configuration\ConfigResource $docsConfig = null ) : static
$moduleName string
$pathSpec ModulePathSpec
$config ZF\Configuration\ConfigResource
$docsConfig ZF\Configuration\ConfigResource
Результат static

getModuleNameFilter() защищенный Метод

Filter for module names
protected getModuleNameFilter ( ) : Zend\Filter\FilterChain
Результат Zend\Filter\FilterChain

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

Get the versions of a module
public getModuleVersions ( ) : array | boolean
Результат array | boolean

recursiveCopy() защищенный Метод

Copy file and folder recursively
protected recursiveCopy ( string $source, string $target, integer $previous, integer $version )
$source string
$target string
$previous integer
$version integer

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

Updates the default version of a module that will be used if no version is specified by the API consumer.
public setDefaultVersion ( integer $defaultVersion ) : boolean
$defaultVersion integer
Результат boolean

updateConfigVersion() защищенный Метод

Update a PHP configuration file from $previous to $version version
protected updateConfigVersion ( string $file, integer $previous, integer $version ) : boolean
$file string
$previous integer Previous version
$version integer New version
Результат boolean

updateDocumentationVersion() защищенный Метод

Update the documentation to add a new $version based on the $previous
protected updateDocumentationVersion ( integer $previous, integer $version ) : true
$previous integer Previous version
$version integer New version
Результат true

Описание свойств

$configResource защищенное свойство

protected ConfigResource,ZF\Configuration $configResource
Результат ZF\Configuration\ConfigResource

$docsConfigResource защищенное свойство

protected null|ConfigResource,ZF\Configuration $docsConfigResource
Результат null | ZF\Configuration\ConfigResource

$moduleNameFilter защищенное свойство

protected FilterChain,Zend\Filter $moduleNameFilter
Результат Zend\Filter\FilterChain