Prev Next

PHP Conventions

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

Stereotypes

Stereotype

Applies To

See also

trait

Class

Corresponds To: A 'trait'.

property get

Operation

Corresponds To: A 'read' property.

property set

Operation

Corresponds To: A 'write' property.

Tagged Values

Tag

Applies To

See also

attribute_name

Operation with stereotype property get or property set

Corresponds To: The name of the variable behind this property.

final

Operations in PHP 5

Corresponds To: The 'final' keyword.

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

Learn more