protected function stringToType($config)
    {
        list($typeName, $properties) = $this->splitTypeAndProperties($config);

        $type = $this->createType($typeName);

        if ($properties) {
            $type->fill($this->parseProperties($properties));
        }

        if (!$type instanceof ObjectType) {
            return $type;
        }

        if (!$type->hasKeyProvider()) {
            $type->provideKeysBy($this->buildKeyProvider($type));
        }

        return $type;
    }
protected function stringToType($config)
    {
        list($typeName, $properties) = $this->splitTypeAndProperties($config);

        $type = $this->createType($typeName);

        if ($properties) {
            $type->fill($this->parseProperties($properties));
        }

        if (!$type instanceof ObjectType) {
            return $type;
        }

        if (!$type->hasKeyProvider()) {
            $type->provideKeysBy($this->buildKeyProvider($type));
        }

        return $type;
    }
protected function stringToType ( $ config ) { list ( $ typeName , $ properties ) = $ this -> splitTypeAndProperties ( $ config ) ; $ type = $ this -> createType ( $ typeName ) ; if ( $ properties ) { $ type -> fill ( $ this -> parseProperties ( $ properties ) ) ; } if ( ! $ type instanceof ObjectType ) { return $ type ; } if ( ! $ type -> hasKeyProvider ( ) ) { $ type -> provideKeysBy ( $ this -> buildKeyProvider ( $ type ) ) ; } return $ type ; }
Creates a type by a string and fills it

@param string $config

@return AbstractType

@throws \Ems\Contracts\Core\Errors\Unsupported
Creates a type by a string and fills it