classes/ezfsolrdocumentfieldbase.php
static function getClassAttributeType( eZContentClassAttribute $classAttribute, $subAttribute = null, $context = 'search' )
    {
        $eZFindIni = eZINI::instance( 'ezfind.ini' );
        // Subattribute-related behaviour here.
        $datatypeString = $classAttribute->attribute( 'data_type_string' );
        $customMapList = $eZFindIni->variable( 'SolrFieldMapSettings', 'CustomMap' );

        if ( array_key_exists( $datatypeString, $customMapList ) )
        {
            if ( self::isStaticDelegationAllowed( $customMapList[$datatypeString], 'getClassAttributeType' ) and
                 ( $returnValue = call_user_func_array( array( $customMapList[$datatypeString], 'getClassAttributeType' ),
                                                        array( $classAttribute, $subAttribute, $context ) ) )
               )
            {
                return $returnValue;
            }
        }

        // Fallback #1: single-fielded datatype behaviour here.
        $datatypeMapList = $eZFindIni->variable( 'SolrFieldMapSettings', eZSolr::$fieldTypeContexts[$context] );
        if ( !empty( $datatypeMapList[$classAttribute->attribute( 'data_type_string' )] ) )
        {
            return $datatypeMapList[$classAttribute->attribute( 'data_type_string' )];
        }
        // Fallback #2: search field datatypemap (pre ezfind 2.2 behaviour)
        $datatypeMapList = $eZFindIni->variable( 'SolrFieldMapSettings', 'DatatypeMap' );
        if ( !empty( $datatypeMapList[$classAttribute->attribute( 'data_type_string' )] ) )
        {
            return $datatypeMapList[$classAttribute->attribute( 'data_type_string' )];
        }
        // Fallback #3: return default field.
        return $eZFindIni->variable( 'SolrFieldMapSettings', 'Default' );
    }
static function getClassAttributeType( eZContentClassAttribute $classAttribute, $subAttribute = null, $context = 'search' )
    {
        $eZFindIni = eZINI::instance( 'ezfind.ini' );
        // Subattribute-related behaviour here.
        $datatypeString = $classAttribute->attribute( 'data_type_string' );
        $customMapList = $eZFindIni->variable( 'SolrFieldMapSettings', 'CustomMap' );

        if ( array_key_exists( $datatypeString, $customMapList ) )
        {
            if ( self::isStaticDelegationAllowed( $customMapList[$datatypeString], 'getClassAttributeType' ) and
                 ( $returnValue = call_user_func_array( array( $customMapList[$datatypeString], 'getClassAttributeType' ),
                                                        array( $classAttribute, $subAttribute, $context ) ) )
               )
            {
                return $returnValue;
            }
        }

        // Fallback #1: single-fielded datatype behaviour here.
        $datatypeMapList = $eZFindIni->variable( 'SolrFieldMapSettings', eZSolr::$fieldTypeContexts[$context] );
        if ( !empty( $datatypeMapList[$classAttribute->attribute( 'data_type_string' )] ) )
        {
            return $datatypeMapList[$classAttribute->attribute( 'data_type_string' )];
        }
        // Fallback #2: search field datatypemap (pre ezfind 2.2 behaviour)
        $datatypeMapList = $eZFindIni->variable( 'SolrFieldMapSettings', 'DatatypeMap' );
        if ( !empty( $datatypeMapList[$classAttribute->attribute( 'data_type_string' )] ) )
        {
            return $datatypeMapList[$classAttribute->attribute( 'data_type_string' )];
        }
        // Fallback #3: return default field.
        return $eZFindIni->variable( 'SolrFieldMapSettings', 'Default' );
    }
static function getClassAttributeType ( eZContentClassAttribute $ classAttribute , $ subAttribute = null , $ context = 'search' ) { $ eZFindIni = eZINI :: instance ( 'ezfind.ini' ) ; // Subattribute-related behaviour here. $ datatypeString = $ classAttribute -> attribute ( 'data_type_string' ) ; $ customMapList = $ eZFindIni -> variable ( 'SolrFieldMapSettings' , 'CustomMap' ) ; if ( array_key_exists ( $ datatypeString , $ customMapList ) ) { if ( self :: isStaticDelegationAllowed ( $ customMapList [ $ datatypeString ] , 'getClassAttributeType' ) and ( $ returnValue = call_user_func_array ( array ( $ customMapList [ $ datatypeString ] , 'getClassAttributeType' ) , array ( $ classAttribute , $ subAttribute , $ context ) ) ) ) { return $ returnValue ; } } // Fallback #1: single-fielded datatype behaviour here. $ datatypeMapList = $ eZFindIni -> variable ( 'SolrFieldMapSettings' , eZSolr :: $ fieldTypeContexts [ $ context ] ) ; if ( ! empty ( $ datatypeMapList [ $ classAttribute -> attribute ( 'data_type_string' ) ] ) ) { return $ datatypeMapList [ $ classAttribute -> attribute ( 'data_type_string' ) ] ; } // Fallback #2: search field datatypemap (pre ezfind 2.2 behaviour) $ datatypeMapList = $ eZFindIni -> variable ( 'SolrFieldMapSettings' , 'DatatypeMap' ) ; if ( ! empty ( $ datatypeMapList [ $ classAttribute -> attribute ( 'data_type_string' ) ] ) ) { return $ datatypeMapList [ $ classAttribute -> attribute ( 'data_type_string' ) ] ; } // Fallback #3: return default field. return $ eZFindIni -> variable ( 'SolrFieldMapSettings' , 'Default' ) ; }
Get Solr schema field type from eZContentClassAttribute.

Available field types are:
- string - Unprocessed text
- boolean - Boolean
- int - Integer, not sortable
- long - Long, not sortable
- float - Float, not sortable
- double - Double, not sortable
- sint - Integer, sortable
- slong - Long, sortable
- sfloat - Float, sortable
- sdouble - Double, sortable
- date - Date, see also: http://www.w3.org/TR/xmlschema-2/#dateTime
- text - Text, processed and allows fuzzy matches.
- textTight - Text, less filters are applied than for the text datatype.

@see ezfSolrDocumentFieldName::$FieldTypeMap
@param eZContentClassAttribute Instance of eZContentClassAttribute.
@param $subAttribute string In case the type of a datatype's sub-attribute is requested,
the subattribute's name is passed here.

@return string Field type. Null if no field type is defined.
Get Solr schema field type from eZContentClassAttribute .