/** * @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), ')')); }
protected function getCtorArgumentsPhpCode() { return array($this->container->getLogicalSchema()->getEntityName() . '::orm()', 'new AssociationMultiplicity(AssociationMultiplicity::' . $this->multiplicity->getId() . ')', 'new AssociationBreakAction(AssociationBreakAction::' . $this->action->getId() . ')'); }