eZ\Publish\Core\Persistence\FieldTypeRegistry::getCoreFieldType PHP Méthode

getCoreFieldType() protected méthode

Instantiates a FieldType object.
protected getCoreFieldType ( string $identifier ) : eZ\Publish\SPI\FieldType\FieldType
$identifier string
Résultat eZ\Publish\SPI\FieldType\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;
    }