public function import($list)
    {
        if (!is_array($list) && !($list instanceof Iterator)) {
            throw new InvalidArgumentException("Expected a list of properties and types");
        }

        foreach ($list as $name => $type) {
            $this->add($name, $type);
        }

        return $this;
    }
public function import($list)
    {
        if (!is_array($list) && !($list instanceof Iterator)) {
            throw new InvalidArgumentException("Expected a list of properties and types");
        }

        foreach ($list as $name => $type) {
            $this->add($name, $type);
        }

        return $this;
    }
public function import ( $ list ) { if ( ! is_array ( $ list ) && ! ( $ list instanceof Iterator ) ) { throw new InvalidArgumentException ( "Expected a list of properties and types" ) ; } foreach ( $ list as $ name => $ type ) { $ this -> add ( $ name , $ type ) ; } return $ this ; }
Add a list of properties and types

@param   array $list   key=>type pair list of properties and types.

@return  PropertyDefinitionCollection
@throws  InvalidArgumentException
Add a list of properties and types