Schema/Group.php
public function addDefinition(Definition $definition)
    {
        if ($this->hasDefinition($definition)) {
            throw new \InvalidArgumentException(sprintf('Definition "%s" allready exists.', $definition->getName()));
        }

        $this->definitions[$definition->getName()] = $definition;

        return $this;
    }
public function addDefinition(Definition $definition)
    {
        if ($this->hasDefinition($definition)) {
            throw new \InvalidArgumentException(sprintf('Definition "%s" allready exists.', $definition->getName()));
        }

        $this->definitions[$definition->getName()] = $definition;

        return $this;
    }
public function addDefinition ( Definition $ definition ) { if ( $ this -> hasDefinition ( $ definition ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Definition "%s" allready exists.' , $ definition -> getName ( ) ) ) ; } $ this -> definitions [ $ definition -> getName ( ) ] = $ definition ; return $ this ; }
Adds a definition.

@param Definition $definition

@throws \InvalidArgumentException

@return Group
Adds a definition .