PHP Conventions

Return to Introduction  Previous page  Next page

Enterprise Architect supports the round trip engineering of PHP 4 and 5, where the following conventions are used.

Stereotypes

Stereotype

Applies to

Corresponds To

property get

Operation

A read property.

property set

Operation

A write property.

Tagged Values

Tag

Applies to

Corresponds To

final

Operations in PHP 5.

The final keyword.

attribute_name

Operation with stereotype property get or property set

The name of the variable behind this property.

Common Conventions

·An unspecified type is modeled as var
·Methods returning a reference are generated by setting the Return Type to var*
·Reference parameters are generated from parameters with the parameter Kind set to inout or out.

PHP 5 Conventions

·The final class modifier corresponds to the Is Leaf property
·The abstract class modifier corresponds to the Abstract property
·Parameter type hinting is supported by setting the Type of a parameter
·The value of inout or out for the Kind property of a parameter corresponds to a reference parameter.

See Also