kernel/classes/ezsection.php
static function fetchByIdentifier( $sectionIdentifier, $asObject = true )
    {
        global $eZContentSectionObjectCache;
        if( !isset( $eZContentSectionObjectCache[$sectionIdentifier] ) || $asObject === false )
        {
            $sectionFetched = eZPersistentObject::fetchObject( eZSection::definition(),
                                                       null,
                                                       array( "identifier" => $sectionIdentifier ),
                                                       $asObject );
            if( !$sectionFetched )
            {
                return null;
            }

            if( $asObject )
            {
                // the section identifier index refers to the id index object
                $sectionID = $sectionFetched->attribute( 'id' );
                if( !isset( $eZContentSectionObjectCache[$sectionID] ) )
                {
                    $eZContentSectionObjectCache[$sectionID] = $sectionFetched;
                }
                $eZContentSectionObjectCache[$sectionIdentifier] = $eZContentSectionObjectCache[$sectionID];
            }
            else
            {
                return $sectionFetched;
            }
        }
        $section = $eZContentSectionObjectCache[$sectionIdentifier];
        return $section;
    }
static function fetchByIdentifier( $sectionIdentifier, $asObject = true )
    {
        global $eZContentSectionObjectCache;
        if( !isset( $eZContentSectionObjectCache[$sectionIdentifier] ) || $asObject === false )
        {
            $sectionFetched = eZPersistentObject::fetchObject( eZSection::definition(),
                                                       null,
                                                       array( "identifier" => $sectionIdentifier ),
                                                       $asObject );
            if( !$sectionFetched )
            {
                return null;
            }

            if( $asObject )
            {
                // the section identifier index refers to the id index object
                $sectionID = $sectionFetched->attribute( 'id' );
                if( !isset( $eZContentSectionObjectCache[$sectionID] ) )
                {
                    $eZContentSectionObjectCache[$sectionID] = $sectionFetched;
                }
                $eZContentSectionObjectCache[$sectionIdentifier] = $eZContentSectionObjectCache[$sectionID];
            }
            else
            {
                return $sectionFetched;
            }
        }
        $section = $eZContentSectionObjectCache[$sectionIdentifier];
        return $section;
    }
static function fetchByIdentifier ( $ sectionIdentifier , $ asObject = true ) { global $ eZContentSectionObjectCache ; if ( ! isset ( $ eZContentSectionObjectCache [ $ sectionIdentifier ] ) || $ asObject === false ) { $ sectionFetched = eZPersistentObject :: fetchObject ( eZSection :: definition ( ) , null , array ( "identifier" => $ sectionIdentifier ) , $ asObject ) ; if ( ! $ sectionFetched ) { return null ; } if ( $ asObject ) { // the section identifier index refers to the id index object $ sectionID = $ sectionFetched -> attribute ( 'id' ) ; if ( ! isset ( $ eZContentSectionObjectCache [ $ sectionID ] ) ) { $ eZContentSectionObjectCache [ $ sectionID ] = $ sectionFetched ; } $ eZContentSectionObjectCache [ $ sectionIdentifier ] = $ eZContentSectionObjectCache [ $ sectionID ] ; } else { return $ sectionFetched ; } } $ section = $ eZContentSectionObjectCache [ $ sectionIdentifier ] ; return $ section ; }
fetch object by section identifier
@param string $sectionIdentifier
@param boolean $asObject
@return object|null
fetch object by section identifier