private function initFieldsTypes()
    {
        $this->fieldTypes = [];

        $fieldTypes = $this->loadFieldTypes();

        foreach ($fieldTypes as $fieldType) {
            if (!$fieldType instanceof FieldTypeInterface) {
                throw new DataSourceException(sprintf('Expected instance of FieldTypeInterface, "%s" given.', get_class($fieldType)));
            }

            if (isset($this->fieldTypes[$fieldType->getType()])) {
                throw new DataSourceException(sprintf('Error during field types loading. Name "%s" already in use.', $fieldType->getType()));
            }

            $this->fieldTypes[$fieldType->getType()] = $fieldType;
        }
    }
private function initFieldsTypes()
    {
        $this->fieldTypes = [];

        $fieldTypes = $this->loadFieldTypes();

        foreach ($fieldTypes as $fieldType) {
            if (!$fieldType instanceof FieldTypeInterface) {
                throw new DataSourceException(sprintf('Expected instance of FieldTypeInterface, "%s" given.', get_class($fieldType)));
            }

            if (isset($this->fieldTypes[$fieldType->getType()])) {
                throw new DataSourceException(sprintf('Error during field types loading. Name "%s" already in use.', $fieldType->getType()));
            }

            $this->fieldTypes[$fieldType->getType()] = $fieldType;
        }
    }
private function initFieldsTypes ( ) { $ this -> fieldTypes = [ ] ; $ fieldTypes = $ this -> loadFieldTypes ( ) ; foreach ( $ fieldTypes as $ fieldType ) { if ( ! $ fieldType instanceof FieldTypeInterface ) { throw new DataSourceException ( sprintf ( 'Expected instance of FieldTypeInterface, "%s" given.' , get_class ( $ fieldType ) ) ) ; } if ( isset ( $ this -> fieldTypes [ $ fieldType -> getType ( ) ] ) ) { throw new DataSourceException ( sprintf ( 'Error during field types loading. Name "%s" already in use.' , $ fieldType -> getType ( ) ) ) ; } $ this -> fieldTypes [ $ fieldType -> getType ( ) ] = $ fieldType ; } }
Initializes every field type in extension.

@throws \FSi\Component\DataSource\Exception\DataSourceException
Initializes every field type in extension .