PHP Class ZF\Apigility\Admin\Model\ModulePathSpec

Adds PSR-0 and PSR-4 support to Apigility.
显示文件 Open project: zfcampus/zf-apigility-admin Class Usage Examples

Protected Properties

Property Type Description
$applicationPath string
$currentSpec string
$modulePathSpec string
$moduleSourcePathSpec PSR-0
$modules ZF\Configuration\ModuleUtils
$psrSpecs array
$restPathSpec string
$rpcPathSpec string

Public Methods

Method Description
__construct ( ZF\Configuration\ModuleUtils $modules, string $sourcePathSpec = self::PSR_0, string $applicationPath = "." )
getApplicationPath ( ) : string Get the path of the application directory
getModuleConfigFilePath ( string $moduleName ) : string
getModuleConfigPath ( string $moduleName ) : string
getModulePath ( string $moduleName ) : string Returns the path for the module name that is specified.
getModuleSourcePath ( string $moduleName, boolean $fullPath = true ) : string Returns the source path for the module that is specified
getModuleViewPath ( string $moduleName ) : string
getPathSpec ( ) : string Returns the current path spec being utitlized. IE> psr-0 or psr-4
getRestPath ( string $moduleName, integer $version = 1, string $serviceName = null ) : string Get the REST service path for a given module, service name and version
getRpcPath ( string $moduleName, integer $version = 1, string $serviceName = null ) : string
normalizeModuleName ( string $moduleName ) : string Normalizes a module name by converting periods and forward slashes into backslashes (for namespaces). This function should always remain idempotent.
normalizePath ( string $path ) : string Normalizes a path by converting back-slashes into normal slashes. This function should always remain idempotent.
setApplicationPath ( string $path ) Set the path to the application directory

Method Details

__construct() public method

public __construct ( ZF\Configuration\ModuleUtils $modules, string $sourcePathSpec = self::PSR_0, string $applicationPath = "." )
$modules ZF\Configuration\ModuleUtils
$sourcePathSpec string
$applicationPath string

getApplicationPath() public method

Get the path of the application directory
public getApplicationPath ( ) : string
return string

getModuleConfigFilePath() public method

public getModuleConfigFilePath ( string $moduleName ) : string
$moduleName string
return string

getModuleConfigPath() public method

public getModuleConfigPath ( string $moduleName ) : string
$moduleName string
return string

getModulePath() public method

Returns the path for the module name that is specified.
public getModulePath ( string $moduleName ) : string
$moduleName string
return string

getModuleSourcePath() public method

Returns the source path for the module that is specified
public getModuleSourcePath ( string $moduleName, boolean $fullPath = true ) : string
$moduleName string
$fullPath boolean
return string

getModuleViewPath() public method

public getModuleViewPath ( string $moduleName ) : string
$moduleName string
return string

getPathSpec() public method

Returns the current path spec being utitlized. IE> psr-0 or psr-4
public getPathSpec ( ) : string
return string

getRestPath() public method

Get the REST service path for a given module, service name and version
public getRestPath ( string $moduleName, integer $version = 1, string $serviceName = null ) : string
$moduleName string
$version integer
$serviceName string
return string

getRpcPath() public method

public getRpcPath ( string $moduleName, integer $version = 1, string $serviceName = null ) : string
$moduleName string
$version integer
$serviceName string
return string

normalizeModuleName() public method

Normalizes a module name by converting periods and forward slashes into backslashes (for namespaces). This function should always remain idempotent.
public normalizeModuleName ( string $moduleName ) : string
$moduleName string
return string

normalizePath() public method

Normalizes a path by converting back-slashes into normal slashes. This function should always remain idempotent.
public normalizePath ( string $path ) : string
$path string
return string

setApplicationPath() public method

Set the path to the application directory
public setApplicationPath ( string $path )
$path string

Property Details

$applicationPath protected_oe property

protected string $applicationPath
return string

$currentSpec protected_oe property

protected string $currentSpec
return string

$modulePathSpec protected_oe property

protected string $modulePathSpec
return string

$moduleSourcePathSpec protected_oe property

PSR-0
protected $moduleSourcePathSpec

$modules protected_oe property

protected ModuleUtils,ZF\Configuration $modules
return ZF\Configuration\ModuleUtils

$psrSpecs protected_oe property

protected array $psrSpecs
return array

$restPathSpec protected_oe property

protected string $restPathSpec
return string

$rpcPathSpec protected_oe property

protected string $rpcPathSpec
return string