src/Schema.php
private function addMixin(Mixin $mixin)
    {
        $id = $mixin->getId();
        $curieStr = $id->getCurie()->toString();

        if (isset($this->mixinsByCurie[$curieStr])) {
            throw new MixinAlreadyAdded($this, $this->mixinsByCurie[$curieStr], $mixin);
        }

        $this->mixins[$id->getCurieMajor()] = $mixin;
        $this->mixinsByCurie[$curieStr] = $mixin;

        foreach ($mixin->getFields() as $field) {
            $this->addField($field);
        }
    }
private function addMixin(Mixin $mixin)
    {
        $id = $mixin->getId();
        $curieStr = $id->getCurie()->toString();

        if (isset($this->mixinsByCurie[$curieStr])) {
            throw new MixinAlreadyAdded($this, $this->mixinsByCurie[$curieStr], $mixin);
        }

        $this->mixins[$id->getCurieMajor()] = $mixin;
        $this->mixinsByCurie[$curieStr] = $mixin;

        foreach ($mixin->getFields() as $field) {
            $this->addField($field);
        }
    }
private function addMixin ( Mixin $ mixin ) { $ id = $ mixin -> getId ( ) ; $ curieStr = $ id -> getCurie ( ) -> toString ( ) ; if ( isset ( $ this -> mixinsByCurie [ $ curieStr ] ) ) { throw new MixinAlreadyAdded ( $ this , $ this -> mixinsByCurie [ $ curieStr ] , $ mixin ) ; } $ this -> mixins [ $ id -> getCurieMajor ( ) ] = $ mixin ; $ this -> mixinsByCurie [ $ curieStr ] = $ mixin ; foreach ( $ mixin -> getFields ( ) as $ field ) { $ this -> addField ( $ field ) ; } }
@param Mixin $mixin

@throws MixinAlreadyAdded
@param Mixin $mixin