PHP 클래스 ZF\Apigility\Admin\Model\ModuleModel

파일 보기 프로젝트 열기: zfcampus/zf-apigility-admin 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$moduleManager Zend\ModuleManager\ModuleManager
$modules array
$restConfig array
$rpcConfig array
$services array Services for each module
$useShortArrayNotation boolean
$valueGenerator Zend\Code\Generator\ValueGenerator

공개 메소드들

메소드 설명
__construct ( Zend\ModuleManager\ModuleManager $moduleManager, array $restConfig, array $rpcConfig )
createModule ( string $module, ModulePathSpec $pathSpec ) : boolean Create a module
deleteModule ( string $module, string $path = '.', boolean $recursive = false ) : boolean Delete an existing module
exportConfig ( array $config, integer $indent ) : string Export the $config array in a human readable format
getModule ( string $moduleName ) : null | ModuleEntity
getModules ( ) : ModuleEntity[] Retrieve modules
setUseShortArrayNotation ( $flag = true ) : void Set the flag indicating whether or not generated config files should use short array notation.
updateModule ( string $module ) : boolean Update a module (adding the ApigilityModule interface)

보호된 메소드들

메소드 설명
discoverServicesByModule ( string $module, array $config ) : array Loops through an array of controllers, determining which match the given module.
getEnabledModules ( ) : array Returns list of all API-First-enabled modules
getModuleDefaultVersion ( ZF\Apigility\ApigilityModuleInterface | ZF\Apigility\Provider\ApigilityProviderInterface $module ) : integer Retrieves the configured default version for the specified module.
getServicesByModule ( string $module ) : null | array Retrieve all services for a given module
getVersionsByModule ( string $moduleName, ZF\Apigility\Provider\ApigilityProviderInterface | ZF\Apigility\ApigilityModuleInterface $module ) : array Retrieve versions by module
writeApplicationConfig ( array $application, string $path ) : boolean Write application configuration.
writeConfigFile ( array $config, string $configFile ) : boolean Write a configuration file.

비공개 메소드들

메소드 설명
detectSourcePathFromModule ( string $moduleName, ZF\Apigility\Provider\ApigilityProviderInterface | ZF\Apigility\ApigilityModuleInterface $module ) : string Determine where the source path is for a module.

메소드 상세

__construct() 공개 메소드

public __construct ( Zend\ModuleManager\ModuleManager $moduleManager, array $restConfig, array $rpcConfig )
$moduleManager Zend\ModuleManager\ModuleManager
$restConfig array
$rpcConfig array

createModule() 공개 메소드

Create a module
public createModule ( string $module, ModulePathSpec $pathSpec ) : boolean
$module string
$pathSpec ModulePathSpec
리턴 boolean

deleteModule() 공개 메소드

Delete an existing module
public deleteModule ( string $module, string $path = '.', boolean $recursive = false ) : boolean
$module string
$path string
$recursive boolean
리턴 boolean

discoverServicesByModule() 보호된 메소드

Loops through an array of controllers, determining which match the given module.
protected discoverServicesByModule ( string $module, array $config ) : array
$module string
$config array
리턴 array

exportConfig() 공개 정적인 메소드

Export the $config array in a human readable format
public static exportConfig ( array $config, integer $indent ) : string
$config array
$indent integer the initial indentation value
리턴 string

getEnabledModules() 보호된 메소드

Returns list of all API-First-enabled modules
protected getEnabledModules ( ) : array
리턴 array

getModule() 공개 메소드

public getModule ( string $moduleName ) : null | ModuleEntity
$moduleName string
리턴 null | ModuleEntity

getModuleDefaultVersion() 보호된 메소드

Retrieves the configured default version for the specified module.
protected getModuleDefaultVersion ( ZF\Apigility\ApigilityModuleInterface | ZF\Apigility\Provider\ApigilityProviderInterface $module ) : integer
$module ZF\Apigility\ApigilityModuleInterface | ZF\Apigility\Provider\ApigilityProviderInterface
리턴 integer

getModules() 공개 메소드

Retrieve modules
public getModules ( ) : ModuleEntity[]
리턴 ModuleEntity[]

getServicesByModule() 보호된 메소드

Returns null if the module is not API-enabled. Returns an array with the elements "rest" and "rpc" on success, with each being an array of controller service names.
protected getServicesByModule ( string $module ) : null | array
$module string
리턴 null | array

getVersionsByModule() 보호된 메소드

Checks each REST and RPC service name for a version subnamespace; if found, that version is added to the list.
protected getVersionsByModule ( string $moduleName, ZF\Apigility\Provider\ApigilityProviderInterface | ZF\Apigility\ApigilityModuleInterface $module ) : array
$moduleName string
$module ZF\Apigility\Provider\ApigilityProviderInterface | ZF\Apigility\ApigilityModuleInterface
리턴 array

setUseShortArrayNotation() 공개 메소드

Set the flag indicating whether or not generated config files should use short array notation.
public setUseShortArrayNotation ( $flag = true ) : void
리턴 void

updateModule() 공개 메소드

Update a module (adding the ApigilityModule interface)
public updateModule ( string $module ) : boolean
$module string
리턴 boolean

writeApplicationConfig() 보호된 메소드

If a "modules.config.php" exists, writes to that with the "modules" subkey of the provided configuration; otherwise, writes to application.config.php.
protected writeApplicationConfig ( array $application, string $path ) : boolean
$application array Application configuration.
$path string Base path of the application.
리턴 boolean Whether or not the operation was successful.

writeConfigFile() 보호된 메소드

Writes a configuration file, after first creating an archived version of it with the suffix '.old'.
protected writeConfigFile ( array $config, string $configFile ) : boolean
$config array Configuration to export.
$configFile string Configuration file to write.
리턴 boolean

프로퍼티 상세

$moduleManager 보호되어 있는 프로퍼티

protected ModuleManager,Zend\ModuleManager $moduleManager
리턴 Zend\ModuleManager\ModuleManager

$modules 보호되어 있는 프로퍼티

protected array $modules
리턴 array

$restConfig 보호되어 있는 프로퍼티

protected array $restConfig
리턴 array

$rpcConfig 보호되어 있는 프로퍼티

protected array $rpcConfig
리턴 array

$services 보호되어 있는 프로퍼티

Services for each module
protected array $services
리턴 array

$useShortArrayNotation 보호되어 있는 정적으로 프로퍼티

protected static bool $useShortArrayNotation
리턴 boolean

$valueGenerator 보호되어 있는 정적으로 프로퍼티

protected static ValueGenerator,Zend\Code\Generator $valueGenerator
리턴 Zend\Code\Generator\ValueGenerator