/** * @return string */ function toPhpCall() { $fields = array(); foreach ($this->fields as $field) { $fields[] = '\'' . $field . '\''; } $ctorArguments = array("'{$this->name}'", 'array(' . join(', ', $fields) . ')', $this->type->toPhpCodeCall(), "new OrmPropertyVisibility(OrmPropertyVisibility::{$this->visibility->getId()})", "new AssociationMultiplicity(AssociationMultiplicity::{$this->multiplicity->getId()})", $this->isUnique ? 'true' : 'false', $this->isIdentifier ? 'true' : 'false'); return join('', array('new OrmProperty(', join(', ', $ctorArguments), ')')); }