public function addReference(Reference $reference)
    {
        $index = count($this->referenceList);
        $this->referenceList[$index] = $reference
            ->setLocator($this)
            ->setIndex($index);
        return $this;
    }
public function addReference(Reference $reference)
    {
        $index = count($this->referenceList);
        $this->referenceList[$index] = $reference
            ->setLocator($this)
            ->setIndex($index);
        return $this;
    }
public function addReference ( Reference $ reference ) { $ index = count ( $ this -> referenceList ) ; $ this -> referenceList [ $ index ] = $ reference -> setLocator ( $ this ) -> setIndex ( $ index ) ; return $ this ; }
Adds reference to list.

@param Reference $reference
@return $this
Adds reference to list .