public function getFieldType($identifier)
    {
        if (!isset($this->fieldTypes[$identifier])) {
            throw new FieldTypeNotFoundException($identifier);
        }

        if ($this->fieldTypes[$identifier] instanceof SPIFieldType) {
            return $this->fieldTypes[$identifier];
        } elseif (is_callable($this->fieldTypes[$identifier])) {
            /** @var $closure \Closure */
            $closure = $this->fieldTypes[$identifier];
            $this->fieldTypes[$identifier] = $closure();
        }

        if (!$this->fieldTypes[$identifier] instanceof SPIFieldType) {
            throw new RuntimeException("\$fieldTypes[$identifier] must be instance of SPI\\FieldType\\FieldType or callable");
        }

        return $this->fieldTypes[$identifier];
    }
public function getFieldType($identifier)
    {
        if (!isset($this->fieldTypes[$identifier])) {
            throw new FieldTypeNotFoundException($identifier);
        }

        if ($this->fieldTypes[$identifier] instanceof SPIFieldType) {
            return $this->fieldTypes[$identifier];
        } elseif (is_callable($this->fieldTypes[$identifier])) {
            /** @var $closure \Closure */
            $closure = $this->fieldTypes[$identifier];
            $this->fieldTypes[$identifier] = $closure();
        }

        if (!$this->fieldTypes[$identifier] instanceof SPIFieldType) {
            throw new RuntimeException("\$fieldTypes[$identifier] must be instance of SPI\\FieldType\\FieldType or callable");
        }

        return $this->fieldTypes[$identifier];
    }
public function getFieldType ( $ identifier ) { if ( ! isset ( $ this -> fieldTypes [ $ identifier ] ) ) { throw new FieldTypeNotFoundException ( $ identifier ) ; } if ( $ this -> fieldTypes [ $ identifier ] instanceof SPIFieldType ) { return $ this -> fieldTypes [ $ identifier ] ; } elseif ( is_callable ( $ this -> fieldTypes [ $ identifier ] ) ) { /** @var $closure \Closure */ $ closure = $ this -> fieldTypes [ $ identifier ] ; $ this -> fieldTypes [ $ identifier ] = $ closure ( ) ; } if ( ! $ this -> fieldTypes [ $ identifier ] instanceof SPIFieldType ) { throw new RuntimeException ( "\$fieldTypes[$identifier] must be instance of SPI\\FieldType\\FieldType or callable" ) ; } return $ this -> fieldTypes [ $ identifier ] ; }
Return a SPI FieldType object.

@throws \eZ\Publish\Core\Base\Exceptions\NotFound\FieldTypeNotFoundException If $identifier was not found

@param string $identifier

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