Example #1
0
File: Table.php Project: chh/sirel
 /**
  * Predefine an Attribute with the given Instance
  *
  * @param  Attribute $attribute
  * @return Table
  */
 function addAttribute(Attribute $attribute)
 {
     $attribute->setRelation($this);
     $this->attributes[$attribute->getName()] = $attribute;
     return $this;
 }
Example #2
0
File: ToSql.php Project: chh/sirel
 /**
  * Returns the Attribute's fully qualified name
  *
  * @param  Attribute $attribute
  * @return string
  */
 protected function visitSirelAttributeAttribute(Attribute $attribute)
 {
     return $this->visit($attribute->getRelation()) . "." . $attribute->getName();
 }