kernel/classes/ezsslzone.php
static function checkObject( $module, $view, $object )
    {
        if ( !eZSSLZone::enabled() )
            return;

        /* If the given module/view is not in the list of 'keep mode' views,
         * i.e. it cannot choose access mode itself,
         * then do nothing.
         */
        if ( !eZSSLZone::isKeepModeView( $module, $view ) )
            return;

        $pathStringList = eZPersistentObject::fetchObjectList(
            eZContentObjectTreeNode::definition(),                     // def
            array( 'path_string' ),                                    // field_filters
            array( 'contentobject_id' => $object->attribute( 'id' ) ), // conds
            null,                                                      // sorts
            null,                                                      // limit
            false                                                      // asObject
        );

        if ( is_array( $pathStringList ) && count( $pathStringList ) )
        {
            /* The object has some assigned nodes.
             * If at least one of those nodes belongs to an SSL zone,
             * we switch to SSL.
             */

            // "flatten" the array
            array_walk( $pathStringList, function( &$a ) { $a = $a['path_string']; } );
        }
        else
        {
            /* The object has no assigned nodes.
             * Let's work with its parent nodes.
             * If at least one of the parent nodes belongs to an SSL zone,
             * we switch to SSL.
             */
            $pathStringList = array();
            $nodes = $object->parentNodes( $object->attribute( 'current' ) );
            if ( !is_array( $nodes ) )
            {
                eZDebug::writeError( 'Object ' . $object->attribute( 'is' ) .
                                     'does not have neither assigned nor parent nodes.' );
            }
            else
            {
                foreach( $nodes as $node )
                {
                    $pathStringList[] = $node->attribute( 'path_string' );
                }
            }
        }

        $inSSL = false; // does the object belong to an SSL zone?
        foreach ( $pathStringList as $pathString )
        {
            if ( eZSSLZone::checkNodePath( $module, $view, $pathString, false ) )
            {
                $inSSL = true;
                break;
            }
        }

        eZSSLZone::switchIfNeeded( $inSSL );
    }
static function checkObject( $module, $view, $object )
    {
        if ( !eZSSLZone::enabled() )
            return;

        /* If the given module/view is not in the list of 'keep mode' views,
         * i.e. it cannot choose access mode itself,
         * then do nothing.
         */
        if ( !eZSSLZone::isKeepModeView( $module, $view ) )
            return;

        $pathStringList = eZPersistentObject::fetchObjectList(
            eZContentObjectTreeNode::definition(),                     // def
            array( 'path_string' ),                                    // field_filters
            array( 'contentobject_id' => $object->attribute( 'id' ) ), // conds
            null,                                                      // sorts
            null,                                                      // limit
            false                                                      // asObject
        );

        if ( is_array( $pathStringList ) && count( $pathStringList ) )
        {
            /* The object has some assigned nodes.
             * If at least one of those nodes belongs to an SSL zone,
             * we switch to SSL.
             */

            // "flatten" the array
            array_walk( $pathStringList, function( &$a ) { $a = $a['path_string']; } );
        }
        else
        {
            /* The object has no assigned nodes.
             * Let's work with its parent nodes.
             * If at least one of the parent nodes belongs to an SSL zone,
             * we switch to SSL.
             */
            $pathStringList = array();
            $nodes = $object->parentNodes( $object->attribute( 'current' ) );
            if ( !is_array( $nodes ) )
            {
                eZDebug::writeError( 'Object ' . $object->attribute( 'is' ) .
                                     'does not have neither assigned nor parent nodes.' );
            }
            else
            {
                foreach( $nodes as $node )
                {
                    $pathStringList[] = $node->attribute( 'path_string' );
                }
            }
        }

        $inSSL = false; // does the object belong to an SSL zone?
        foreach ( $pathStringList as $pathString )
        {
            if ( eZSSLZone::checkNodePath( $module, $view, $pathString, false ) )
            {
                $inSSL = true;
                break;
            }
        }

        eZSSLZone::switchIfNeeded( $inSSL );
    }
static function checkObject ( $ module , $ view , $ object ) { if ( ! eZSSLZone :: enabled ( ) ) return ; /* If the given module/view is not in the list of 'keep mode' views,
         * i.e. it cannot choose access mode itself,
         * then do nothing.
         */ if ( ! eZSSLZone :: isKeepModeView ( $ module , $ view ) ) return ; $ pathStringList = eZPersistentObject :: fetchObjectList ( eZContentObjectTreeNode :: definition ( ) , // def array ( 'path_string' ) , // field_filters array ( 'contentobject_id' => $ object -> attribute ( 'id' ) ) , // conds null , // sorts null , // limit false // asObject ) ; if ( is_array ( $ pathStringList ) && count ( $ pathStringList ) ) { /* The object has some assigned nodes.
             * If at least one of those nodes belongs to an SSL zone,
             * we switch to SSL.
             */ // "flatten" the array array_walk ( $ pathStringList , function ( & $ a ) { $ a = $ a [ 'path_string' ] ; } ) ; } else { /* The object has no assigned nodes.
             * Let's work with its parent nodes.
             * If at least one of the parent nodes belongs to an SSL zone,
             * we switch to SSL.
             */ $ pathStringList = array ( ) ; $ nodes = $ object -> parentNodes ( $ object -> attribute ( 'current' ) ) ; if ( ! is_array ( $ nodes ) ) { eZDebug :: writeError ( 'Object ' . $ object -> attribute ( 'is' ) . 'does not have neither assigned nor parent nodes.' ) ; } else { foreach ( $ nodes as $ node ) { $ pathStringList [ ] = $ node -> attribute ( 'path_string' ) ; } } } $ inSSL = false ; // does the object belong to an SSL zone? foreach ( $ pathStringList as $ pathString ) { if ( eZSSLZone :: checkNodePath ( $ module , $ view , $ pathString , false ) ) { $ inSSL = true ; break ; } } eZSSLZone :: switchIfNeeded ( $ inSSL ) ; }
\static
Check whether the given object should cause access mode change.
It it should, this method does not return.
\ static Check whether the given object should cause access mode change . It it should this method does not return .