Exemple #1
0
 /**
  * Loads a property into this graph element.
  *
  * This loads a property object into the graph element. If the property is the primary key, it is remembered in
  * <code>$this->primaryKey</code>, if it is a property, it is saved in <code>$this->properties</code>. If it is indexed,
  * it is saved to <code>$this->indexedProperties</code>
  *
  * @param Property $prop The property to load.
  */
 public function loadProperty($prop)
 {
     //Save primary key
     if ($prop->isPrimaryKey()) {
         $this->setPrimaryKey($prop);
     } else {
         if ($prop->isProperty()) {
             $this->properties[] = $prop;
             //Check for indexed properties
             if ($prop->isIndexed()) {
                 $this->indexedProperties[] = $prop;
             }
         }
     }
 }