public function getLoadingOrder()
    {
        $return = array( 'before' => array(), 'after' => array() );

        if ( is_readable( $XMLDependencyFile = eZExtension::baseDirectory() . "/{$this->name}/extension.xml" ) )
        {
            libxml_use_internal_errors( true );
            $xml = simplexml_load_file( $XMLDependencyFile );
            // xml parsing error
            if ( $xml === false )
            {
                eZDebug::writeError( libxml_get_errors(), "ezpExtension( {$this->name} )::getLoadingOrder()" );
                return null;
            }
            foreach ( $xml->dependencies as $dependenciesNode )
            {
                foreach ( $dependenciesNode as $dependencyType => $dependenciesNode )
                {
                    switch ( $dependencyType )
                    {
                        case 'requires':
                            $relationship = 'after';
                            break;

                        case 'uses':
                            $relationship = 'after';
                            break;

                        case 'extends':
                            $relationship = 'before';
                            break;
                    }

                    foreach ( $dependenciesNode as $dependency )
                    {
                        $return[$relationship][] = (string)$dependency['name'];
                    }
                }
            }
        }

        return $return;
    }