/** * @param string $name name of the property * @param array list of database field names * @param OrmPropertyType property type * @param false property visibility * @param boolean whether the property unique or not */ function __construct($name, array $fields, OrmPropertyType $type, OrmPropertyVisibility $visibility, AssociationMultiplicity $multiplicity, $isUnique = false, $isIdentifier = false) { Assert::isScalar($name); Assert::isBoolean($isUnique); Assert::isBoolean($isIdentifier); $this->name = $name; Assert::isTrue(sizeof($fields) == $type->getColumnCount(), 'wrong DB field count'); $this->fields = $fields; $this->type = $type; $this->visibility = $visibility; $this->multiplicity = $multiplicity; $this->isUnique = $isUnique; $this->isIdentifier = $isIdentifier; }
function getColumnCount() { return $this->fkType->getColumnCount(); }