本文整理汇总了PHP中PEAR::PEAR方法的典型用法代码示例。如果您正苦于以下问题:PHP PEAR::PEAR方法的具体用法?PHP PEAR::PEAR怎么用?PHP PEAR::PEAR使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PEAR
的用法示例。
在下文中一共展示了PEAR::PEAR方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
/**
*
*
* @version 02/11/22
* @author Wolfram Kriesing <wolfram@kriesing.de>
* @return void
* @access public
*/
function I18N_Format($locale)
{
parent::PEAR();
$this->_locale = $locale;
//FIXXME catch locales that we dont have a class for yet, and use default class, which
// translates using google or something ...
if (include_once "I18N/Common/{$locale}.php") {
$class = "I18N_Common_{$locale}";
$this->_localeObj = new $class();
}
}
示例2:
/**
* PEAR_Registry constructor.
*
* @param string (optional) PEAR install directory (for .php files)
*
* @access public
*/
function PEAR_Registry($pear_install_dir = PEAR_INSTALL_DIR)
{
parent::PEAR();
$ds = DIRECTORY_SEPARATOR;
$this->install_dir = $pear_install_dir;
$this->statedir = $pear_install_dir . $ds . '.registry';
$this->filemap = $pear_install_dir . $ds . '.filemap';
$this->lockfile = $pear_install_dir . $ds . '.lock';
if (!file_exists($this->filemap)) {
$this->rebuildFileMap();
}
}
示例3: Page
function Page()
{
parent::PEAR();
$this->_header =& new HTTP_Header();
//start the session
if ($this->_start_session) {
$this->startSession();
}
//set language related session vars
$this->setLanguage();
$this->setI18NDomain();
$this->setI18NDir();
}
示例4: SApplication
function SApplication()
{
$this->_updateMeStatic();
if (ENABLE_PROFILING) {
include_once 'Benchmark/Timer.php';
$this->_timer =& new Benchmark_Timer();
$this->_timer->start();
}
parent::PEAR();
$u = SAURL::restore();
if (PEAR::isError($u)) {
if ($u->getCode() == URL_MANIPULATION) {
HTTP_Header::redirect(SAUrl::Url(APPLICATION_401_PAGE));
exit;
}
}
}
示例5: getenv
function PEAR_Frontend_CLI()
{
parent::PEAR();
$term = getenv('TERM');
//(cox) $_ENV is empty for me in 4.1.1
if ($term) {
// XXX can use ncurses extension here, if available
if (preg_match('/^(xterm|vt220|linux)/', $term)) {
$this->term['bold'] = sprintf("%c%c%c%c", 27, 91, 49, 109);
$this->term['normal'] = sprintf("%c%c%c", 27, 91, 109);
} elseif (preg_match('/^vt100/', $term)) {
$this->term['bold'] = sprintf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0);
$this->term['normal'] = sprintf("%c%c%c%c%c", 27, 91, 109, 0, 0);
}
} elseif (OS_WINDOWS) {
// XXX add ANSI codes here
}
}
示例6: getenv
function PEAR_Frontend_CLI()
{
parent::PEAR();
$term = getenv('TERM');
//(cox) $_ENV is empty for me in 4.1.1
if (function_exists('posix_isatty') && !posix_isatty(1)) {
// output is being redirected to a file or through a pipe
} elseif ($term) {
// XXX can use ncurses extension here, if available
if (preg_match('/^(xterm|vt220|linux)/', $term)) {
$this->term['bold'] = sprintf("%c%c%c%c", 27, 91, 49, 109);
$this->term['normal'] = sprintf("%c%c%c", 27, 91, 109);
} elseif (preg_match('/^vt100/', $term)) {
$this->term['bold'] = sprintf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0);
$this->term['normal'] = sprintf("%c%c%c%c%c", 27, 91, 109, 0, 0);
}
} elseif (OS_WINDOWS) {
// XXX add ANSI codes here
}
}
示例7: while
/**
* PEAR_Registry constructor.
*
* @param string (optional) PEAR install directory (for .php files)
*
* @access public
*/
function PEAR_Registry($pear_install_dir = PEAR_INSTALL_DIR)
{
parent::PEAR();
$ds = DIRECTORY_SEPARATOR;
$this->install_dir = $pear_install_dir;
$this->statedir = $pear_install_dir . $ds . '.registry';
$this->filemap = $pear_install_dir . $ds . '.filemap';
$this->lockfile = $pear_install_dir . $ds . '.lock';
// XXX Compatibility code should be removed in the future
// rename all registry files if any to lowercase
if (!OS_WINDOWS && ($handle = @opendir($this->statedir))) {
$dest = $this->statedir . DIRECTORY_SEPARATOR;
while (false !== ($file = readdir($handle))) {
if (preg_match('/^.*[A-Z].*\\.reg$/', $file)) {
rename($dest . $file, $dest . strtolower($file));
}
}
closedir($handle);
}
if (!file_exists($this->filemap)) {
$this->rebuildFileMap();
}
}
示例8:
/**
* PEAR_Registry constructor.
*
* @param string (optional) PEAR install directory (for .php files)
* @param PEAR_ChannelFile PEAR_ChannelFile object representing the PEAR channel, if
* default values are not desired. Only used the very first time a PEAR
* repository is initialized
* @param PEAR_ChannelFile PEAR_ChannelFile object representing the PECL channel, if
* default values are not desired. Only used the very first time a PEAR
* repository is initialized
*
* @access public
*/
function PEAR_Registry($pear_install_dir = PEAR_INSTALL_DIR, $pear_channel = false, $pecl_channel = false)
{
parent::PEAR();
$this->setInstallDir($pear_install_dir);
$this->_pearChannel = $pear_channel;
$this->_peclChannel = $pecl_channel;
$this->_config = false;
}
示例9:
/**
* PEAR_Registry constructor.
*
* @param string (optional) PEAR install directory (for .php files)
* @param PEAR_ChannelFile PEAR_ChannelFile object representing the PEAR channel, if
* default values are not desired. Only used the very first time a PEAR
* repository is initialized
* @param PEAR_ChannelFile PEAR_ChannelFile object representing the PECL channel, if
* default values are not desired. Only used the very first time a PEAR
* repository is initialized
*
* @access public
*/
function PEAR_Registry($pear_install_dir = PEAR_INSTALL_DIR, $pear_channel = false, $pecl_channel = false)
{
parent::PEAR();
$ds = DIRECTORY_SEPARATOR;
$this->install_dir = $pear_install_dir;
$this->channelsdir = $pear_install_dir . $ds . '.channels';
$this->statedir = $pear_install_dir . $ds . '.registry';
$this->filemap = $pear_install_dir . $ds . '.filemap';
$this->lockfile = $pear_install_dir . $ds . '.lock';
$this->_pearChannel = $pear_channel;
$this->_peclChannel = $pecl_channel;
$this->_config = false;
}
示例10: array
/**
* Call parent::PEAR() for destuctor to be called, and initialize vars
*
* @return: void
* @access: public
*/
function I18N_Common()
{
parent::PEAR();
$this->_codes = array();
}
示例11:
/**
* PEAR_Command_Common constructor.
*
* @access public
*/
function PEAR_Command_Common(&$ui, &$config)
{
parent::PEAR();
$this->config =& $config;
$this->ui =& $ui;
}
示例12:
/**
* Constructor.
*
* @param string $faultcode Error code.
*/
function SOAP_Base_Object($faultcode = 'Client')
{
$this->_myfaultcode = $faultcode;
parent::PEAR('SOAP_Fault');
}
示例13:
/**
* Constructor
*
* @param string error code
* @see $debug_data, _debug()
*/
function SOAP_Base_Object($faultcode = 'Client')
{
$this->_myfaultcode = $faultcode;
$this->_debug_flag = $GLOBALS['SOAP_DEBUG'];
parent::PEAR('SOAP_Fault');
}
示例15:
function PEAR_Frontend_Web()
{
parent::PEAR();
$GLOBALS['_PEAR_Frontend_Web_log'] = '';
$this->config = $GLOBALS['_PEAR_Frontend_Web_config'];
}