generates a Flash project for consumption of amfPHP services

copies the template. 2. looks for template directives in the code. Usually these directives indicate a block of code that must be replicated. Each directive starts with '/**ACG' and must end with * / note that services in subfolders should get a special treatment, and ideally code would be generated in them with additionnal sub-packages. This is technically too messy, so the '/' is simply replaced by '__'. This will be replaced by a '/' in Amfphp.

author | Ariel Sommeria-klein
package | Amfphp_Backoffice_Generators

### Methods

## constructor

    __construct()

## generate project based on template

    generate(array $services, string $amfphpEntryPointUrl, String $targetFolder) : null

Inherited

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::generate()

### Parameters

#### $services

`array`

. note: here '/' in each service name is replaced by '__', to avoid dealing with packages

#### $amfphpEntryPointUrl

`string`

#### $targetFolder

`String`

absolute url to folder where to put the generated code

### Returns

`null`

## info url

    getInfoUrl() : string

### Returns

`string`

## (non-PHPdoc)

    getTestUrlSuffix()

see | \ClientGenerator/Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::getTestUrlSuffix()

## get ui call text

    getUiCallText() : string

### Returns

`string`

## generates code for one Service File.

    generateOneServiceFileCode(String $code) : String

Inherited

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::generateOneServiceFileCode()

### Parameters

#### $code

`String`

### Returns

`String`

## generate as many copies as there are services and treat it as a service block.

    generateServiceFiles(String $code, \SplFileInfo $file)

Inherited

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::generateServiceFiles()

### Parameters

#### $code

`String`

#### $file

`\SplFileInfo`

## finds parameter blocks.

    processMethodListBlock(\type $code)

Inherited

applies processParameterListBlock to each of them then multiplies and adapts the resulting code for each method

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::processMethodListBlock()

### Parameters

#### $code

`\type`

## multiplies and adapts the code for each parameter, but adds a comma between each

    processParameterCommaListBlock(\type $code)

Inherited

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::processParameterCommaListBlock()

### Parameters

#### $code

`\type`

## multiplies and adapts the code for each parameter

    processParameterListBlock(\type $code)

Inherited

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::processParameterListBlock()

### Parameters

#### $code

`\type`

## finds method blocks.

    processServiceListBlock(\type $code)

Inherited

applies processMethodListBlock to each of them then multiplies and adapts the resulting code for each service

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::processServiceListBlock()

### Parameters

#### $code

`\type`

## load the code, and look if either file is a service block, or il it contains service blocks.

    processSourceFile(\SplFileInfo $file)

Inherited

If the file is a service block(detected by having 'SERVICE' in the file name), call generateServiceFiles If not, look for block delimited by the 'SERVICE' directive and call processServiceListBlock on them Also sets the amfphp entry point url

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::processSourceFile()

### Parameters

#### $file

`\SplFileInfo`

## looks for blocks delimited by the start and stop markers matching the directive, and applies a processing function to each found block.

    searchForBlocksAndApplyProcessing(String $code, String $directive, String $functionName) : \mixed.

Inherited

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::searchForBlocksAndApplyProcessing()

### Parameters

#### $code

`String`

the template code. Is modified continually

#### $directive

`String`

for example 'SERVICE'

#### $functionName

`String`

functionName

### Returns

`\mixed.`if there was a change, returns the modified code, else returns false

### Properties

##

    $targetFolder : string

Inherited

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::$$targetFolder

##

    $amfphpEntryPointUrl : string

Inherited

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::$$amfphpEntryPointUrl

##

    $codeFileExtensions : array

Inherited

for example array('as')

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::$$codeFileExtensions

##

    $fileBeingProcessed : \SplFileInfo

Inherited

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::$$fileBeingProcessed

##

    $methodBeingProcessed : \stdClass

Inherited

untyped

see | \AmfphpDiscovery_MethodDescriptor
inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::$$methodBeingProcessed

##

    $serviceBeingProcessed : \stdClass

Inherited

untyped

see | \AmfphpDiscovery_ServiceDescriptor
inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::$$serviceBeingProcessed

##

    $services : array

Inherited

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::$$services

##

    $templateFolderUrl : string

Inherited

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::$$templateFolderUrl

### Constants

## METHOD

    METHOD

Inherited

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::METHOD

## PARAMETER

    PARAMETER

Inherited

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::PARAMETER

## PARAMETER_COMMA

    PARAMETER_COMMA

Inherited

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::PARAMETER_COMMA

## SERVICE

    SERVICE

Inherited

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::SERVICE

## _METHOD_

    _METHOD_

Inherited

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::_METHOD_

## _PARAMETER_

    _PARAMETER_

Inherited

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::_PARAMETER_

## _SERVICE_

    _SERVICE_

Inherited

inherited_from | \Amfphp_BackOffice_ClientGenerator_LocalClientGenerator::_SERVICE_