\AmfphpDiscoveryService

analyses existing services. Warning: if 2 or more services have the same name, only one will appear in the returned data, as it is an associative array using the service name as key.

Summary

Methods
Properties
Constants
_getMethodRoles()
discover()
$excludePaths
$serviceFolders
$serviceNames2ClassFindInfo
$restrictAccess
No constants found
searchFolderForServices()
getServiceNames()
parseMethodComment()
No protected properties found
N/A
formatComment()
No private properties found
N/A

Properties

$excludePaths

$excludePaths : array

Type

array — of strings(patterns)

$serviceFolders

$serviceFolders : array

paths to folders containing services(relative or absolute). set by plugin.

Type

array — of paths

$serviceNames2ClassFindInfo

$serviceNames2ClassFindInfo : array

Type

array — of ClassFindInfo. set by plugin.

$restrictAccess

$restrictAccess : boolean

restrict access to amfphp_admin.

Type

boolean

Methods

_getMethodRoles()

_getMethodRoles(string $methodName) : array

get method roles

Parameters

string $methodName

Returns

array

discover()

discover() : array

does the actual collection of data about available services

Returns

array —

of AmfphpDiscovery_ServiceInfo

searchFolderForServices()

searchFolderForServices(string $rootPath, string $subFolder) : array

finds classes in folder. If in subfolders add the relative path to the name.

recursive, so use with care.

Parameters

string $rootPath
string $subFolder

Returns

array

getServiceNames()

getServiceNames(array $serviceFolders, array $serviceNames2ClassFindInfo) : array

returns a list of available services

Parameters

array $serviceFolders
array $serviceNames2ClassFindInfo

Returns

array —

of service names

parseMethodComment()

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: '

  • return type If data is missing because comment is incomplete the values are simply not set

Parameters

string $comment

Returns

\array{'returns' —

=> type, 'params' => array{variable name => parameter meta}}

formatComment()

formatComment(\type $comment) : \type

gets rid of blocks of 4 spaces and tabs, as well as comment markers.

Parameters

\type $comment

Returns

\type