* @copyright Copyright © 2007, Wolfstein Consulting (Colorado). * @license http://www.asherwolf.com/code_license_1.php?p=Platform_pear&l=lgpl&l2=c30 License Information * @package platform * @version 1.0 * @subpackage pear * @category compatibility */ require_once( '../config.php' ); /** * Retrieves pear installation include path * * Retrieves the pear installation include path to test for pear modules. * Will only work with ONE pear include path. * * To detect pear, it's best if you don't have in your include path the word * pear if it's not actually a PEAR installation. * * @return string|boolean Directory of PEAR installation or false otherwise */ function platform_pear_get_path() { if ( strpos( strtolower( ini_get( 'include_path' ) ), 'pear' ) !== false ) { $dirs = explode( PLATFORM_PATH_SEPARATOR, ini_get( 'include_path' ) ); foreach ( $dirs as $dir ) { if ( strpos( strtolower( $dir ), 'pear' ) !== false ) { return $dir . PLATFORM_DIR_SEP; } } } return false; } /** * Checks to see if PEAR filepath exists * * Tests to see if the include filepath exist in the PEAR include directory * * @param string $inc_path Filepath to include * @return boolean True if PEAR filepath exists, false otherwise */ function platform_pear_check_module( $inc_path ) { $p = platform_pear_get_path(); if ( $p && file_exists( $p . $inc_path ) ) { return true; } return false; } /** * True if filecloak.pear_check.php has been required/included * * @name PLATFORM_PEAR_PROC_CONF */ define( 'PLATFORM_PEAR_PROC_CONF', true ); ?>