protected function getCoreFieldType($identifier)
    {
        if (!isset($this->coreFieldTypeMap[$identifier])) {
            throw new FieldTypeNotFoundException($identifier);
        }

        $fieldType = $this->coreFieldTypeMap[$identifier];

        if (!$this->coreFieldTypeMap[$identifier] instanceof FieldTypeInterface) {
            if (!is_callable($this->coreFieldTypeMap[$identifier])) {
                throw new RuntimeException("FieldType '$identifier' is not callable or instance");
            }

            /** @var $fieldType \Closure */
            $fieldType = $fieldType();
        }

        return $fieldType;
    }
protected function getCoreFieldType($identifier)
    {
        if (!isset($this->coreFieldTypeMap[$identifier])) {
            throw new FieldTypeNotFoundException($identifier);
        }

        $fieldType = $this->coreFieldTypeMap[$identifier];

        if (!$this->coreFieldTypeMap[$identifier] instanceof FieldTypeInterface) {
            if (!is_callable($this->coreFieldTypeMap[$identifier])) {
                throw new RuntimeException("FieldType '$identifier' is not callable or instance");
            }

            /** @var $fieldType \Closure */
            $fieldType = $fieldType();
        }

        return $fieldType;
    }
protected function getCoreFieldType ( $ identifier ) { if ( ! isset ( $ this -> coreFieldTypeMap [ $ identifier ] ) ) { throw new FieldTypeNotFoundException ( $ identifier ) ; } $ fieldType = $ this -> coreFieldTypeMap [ $ identifier ] ; if ( ! $ this -> coreFieldTypeMap [ $ identifier ] instanceof FieldTypeInterface ) { if ( ! is_callable ( $ this -> coreFieldTypeMap [ $ identifier ] ) ) { throw new RuntimeException ( "FieldType '$identifier' is not callable or instance" ) ; } /** @var $fieldType \Closure */ $ fieldType = $ fieldType ( ) ; } return $ fieldType ; }
Instantiates a FieldType object.

@throws FieldTypeNotFoundException If field type for given $identifier is not found.
@throws \RuntimeException If field type for given $identifier is not instance or callable.

@param string $identifier

@return \eZ\Publish\SPI\FieldType\FieldType
Instantiates a FieldType object .