PHP Class AmfphpDiscoveryService, amfphp-2.0

Author: Ariel Sommeria-Klein
Show file Open project: silexlabs/amfphp-2.0 Class Usage Examples

Public Properties

Property Type Description
$excludePaths of strings(patterns)
$restrictAccess boolean restrict access to amfphp_admin.
$serviceFolders paths to folders containing services(relative or absolute). set by plugin.
$serviceNames2ClassFindInfo of ClassFindInfo. set by plugin.

Public Methods

Method Description
_getMethodRoles ( string $methodName ) : array get method roles
discover ( ) : array does the actual collection of data about available services

Protected Methods

Method Description
getServiceNames ( array $serviceFolders, array $serviceNames2ClassFindInfo ) : array returns a list of available services
parseMethodComment ( string $comment ) : array{'returns' extracts - meta data from param tags: 1) type is first word after tag name, name of the variable is second word ($ is removed) 2) example is end of line after 'example: '
searchFolderForServices ( string $rootPath, string $subFolder ) : array finds classes in folder. If in subfolders add the relative path to the name.

Private Methods

Method Description
formatComment ( type $comment ) : type gets rid of blocks of 4 spaces and tabs, as well as comment markers.

Method Details

_getMethodRoles() public method

get method roles
public _getMethodRoles ( string $methodName ) : array
$methodName string
return array

discover() public method

does the actual collection of data about available services
public discover ( ) : array
return array of AmfphpDiscovery_ServiceInfo

getServiceNames() protected method

returns a list of available services
protected getServiceNames ( array $serviceFolders, array $serviceNames2ClassFindInfo ) : array
$serviceFolders array
$serviceNames2ClassFindInfo array
return array of service names

parseMethodComment() protected method

- return type If data is missing because comment is incomplete the values are simply not set
protected parseMethodComment ( string $comment ) : array{'returns'
$comment string
return array{'returns'

searchFolderForServices() protected method

recursive, so use with care.
protected searchFolderForServices ( string $rootPath, string $subFolder ) : array
$rootPath string
$subFolder string
return array

Property Details

$excludePaths public static property

of strings(patterns)
See also: AmfphpDiscovery
public static $excludePaths

$restrictAccess public static property

restrict access to amfphp_admin.
public static bool $restrictAccess
return boolean

$serviceFolders public static property

paths to folders containing services(relative or absolute). set by plugin.
public static $serviceFolders

$serviceNames2ClassFindInfo public static property

of ClassFindInfo. set by plugin.
public static $serviceNames2ClassFindInfo