src/Collector.php
public function addAdoptee($for, $adoptee, $discriminator)
    {
        if (!isset($this->entities[$for]) || !is_array($this->entities[$for])) {
            $this->entities[$for] = [];
        }
        $this->entities[$for][$discriminator] = $adoptee;
        return $this;
    }
public function addAdoptee($for, $adoptee, $discriminator)
    {
        if (!isset($this->entities[$for]) || !is_array($this->entities[$for])) {
            $this->entities[$for] = [];
        }
        $this->entities[$for][$discriminator] = $adoptee;
        return $this;
    }
public function addAdoptee ( $ for , $ adoptee , $ discriminator ) { if ( ! isset ( $ this -> entities [ $ for ] ) || ! is_array ( $ this -> entities [ $ for ] ) ) { $ this -> entities [ $ for ] = [ ] ; } $ this -> entities [ $ for ] [ $ discriminator ] = $ adoptee ; return $ this ; }
Add adoptee to the collector.
@param string $for Class name of the adopting entity
@param string $adoptee Class name of the adopted entity
@param string $discriminator Name for the discriminator column
@return $this
Add adoptee to the collector .