public function addDefinition(Definition $definition)
    {
        $attribute = $definition->getAttribute();
        $key = $definition->getKey();

        $this->mongoIndex[$key] = $attribute;

        $this->definitions[$attribute] = $definition;
    }
public function addDefinition(Definition $definition)
    {
        $attribute = $definition->getAttribute();
        $key = $definition->getKey();

        $this->mongoIndex[$key] = $attribute;

        $this->definitions[$attribute] = $definition;
    }
public function addDefinition ( Definition $ definition ) { $ attribute = $ definition -> getAttribute ( ) ; $ key = $ definition -> getKey ( ) ; $ this -> mongoIndex [ $ key ] = $ attribute ; $ this -> definitions [ $ attribute ] = $ definition ; }
Add a definition

@param Definition $definition
Add a definition