GraphAware\Neo4j\OGM\Tests\Integration\Model\City::addHabitant PHP Method

addHabitant() public method

public addHabitant ( LivesIn $livesIn )
$livesIn LivesIn
    public function addHabitant(LivesIn $livesIn)
    {
        $this->habitants->add($livesIn);
    }

Usage Example

Example #1
0
 public function setCity(City $city, $since = null)
 {
     $since = null !== $since ? $since : 123;
     $rel = new LivesIn($this, $city, $since);
     $this->setLivesIn($rel);
     $city->addHabitant($rel);
 }