00001 <?php 00002 // 00003 // Definition of eZModuleManager class 00004 // 00005 // Created on: <19-Aug-2002 16:37:56 sp> 00006 // 00007 // ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ## 00008 // SOFTWARE NAME: eZ publish 00009 // SOFTWARE RELEASE: 3.9.x 00010 // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS 00011 // SOFTWARE LICENSE: GNU General Public License v2.0 00012 // NOTICE: > 00013 // This program is free software; you can redistribute it and/or 00014 // modify it under the terms of version 2.0 of the GNU General 00015 // Public License as published by the Free Software Foundation. 00016 // 00017 // This program is distributed in the hope that it will be useful, 00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 // GNU General Public License for more details. 00021 // 00022 // You should have received a copy of version 2.0 of the GNU General 00023 // Public License along with this program; if not, write to the Free 00024 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 00025 // MA 02110-1301, USA. 00026 // 00027 // 00028 // ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## 00029 // 00030 00031 /*! \file ezmodulemanager.php 00032 */ 00033 00034 /*! 00035 \class eZModuleManager ezmodulemanager.php 00036 \brief The class eZModuleManager does 00037 00038 */ 00039 00040 class eZModuleManager 00041 { 00042 /*! 00043 Constructor 00044 */ 00045 function eZModuleManager() 00046 { 00047 00048 } 00049 00050 function aviableModules() 00051 { 00052 eZDebug::writeWarning( 'The function eZModuleManager::aviableModules is deprecated, use eZModuleManager::availableModules instead' ); 00053 return eZModuleManager::availableModules(); 00054 } 00055 00056 function availableModules() 00057 { 00058 include_once( 'lib/ezutils/classes/ezmodule.php' ); 00059 $pathList = eZModule::globalPathList(); 00060 $modules = array(); 00061 foreach ( $pathList as $pathItem ) 00062 { 00063 if ( $handle = opendir( $pathItem ) ) 00064 { 00065 while ( false !== ( $file = readdir( $handle ) ) ) 00066 { 00067 if ( is_dir( $pathItem . '/' . $file ) && file_exists( $pathItem . '/' . $file . '/module.php' ) ) 00068 { 00069 $modules[] = $file; 00070 } 00071 } 00072 closedir( $handle ); 00073 } 00074 } 00075 return $modules; 00076 } 00077 } 00078 00079 ?>
1.6.3