当前位置: 首页>>代码示例>>PHP>>正文


PHP XC_CLASS_EXISTS函数代码示例

本文整理汇总了PHP中XC_CLASS_EXISTS函数的典型用法代码示例。如果您正苦于以下问题:PHP XC_CLASS_EXISTS函数的具体用法?PHP XC_CLASS_EXISTS怎么用?PHP XC_CLASS_EXISTS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了XC_CLASS_EXISTS函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct(&$controler)
 {
     parent::__construct($controler);
     if (!XC_CLASS_EXISTS('Legacy_TextareaEditor')) {
         $this->Legacy_TextareaEditor_delete = true;
     }
 }
开发者ID:digideskio,项目名称:ckeditor4,代码行数:7,代码来源:TextAreaBBCode.class.php

示例2: _parseType

 function _parseType()
 {
     //
     // FIXME
     //
     foreach ($this->_mService->_mTypes as $className) {
         if (XC_CLASS_EXISTS($className)) {
             if (call_user_func(array($className, 'isArray')) == true) {
                 $targetClassName = call_user_func(array($className, 'getClassName'));
                 if (XCube_ServiceUtils::isXSD($targetClassName)) {
                     $targetClassName = 'xsd:' . $targetClassName;
                 } else {
                     $targetClassName = 'tns:' . $targetClassName;
                 }
                 $this->_mServer->wsdl->addComplexType($className, 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => $targetClassName . '[]')), $targetClassName);
             } else {
                 $t_fieldArr = call_user_func(array($className, 'getPropertyDefinition'));
                 $t_arr = array();
                 foreach ($t_fieldArr as $t_field) {
                     $name = $t_field['name'];
                     $type = $t_field['type'];
                     if (XCube_ServiceUtils::isXSD($t_field['type'])) {
                         $type = 'xsd:' . $type;
                     } else {
                         $type = 'tns:' . $type;
                     }
                     $t_arr[$name] = array('name' => $name, 'type' => $type);
                 }
                 $this->_mServer->wsdl->addComplexType($className, 'complexType', 'struct', 'all', '', $t_arr);
             }
         }
     }
 }
开发者ID:nouphet,项目名称:rata,代码行数:33,代码来源:ServiceServer.class.php

示例3: _createAction

	function _createAction(&$actionFrame)
	{
		if (is_object($this->mAction)) {
			return;
		}
		
		//
		// Create action object by mActionName
		//
		$className = "User_" . ucfirst($actionFrame->mActionName) . "Action";
		$fileName = ucfirst($actionFrame->mActionName) . "Action";
		if ($actionFrame->mAdminFlag) {
			$fileName = XOOPS_MODULE_PATH . "/user/admin/actions/${fileName}.class.php";
		}
		else {
			$fileName = XOOPS_MODULE_PATH . "/user/actions/${fileName}.class.php";
		}
	
		if (!file_exists($fileName)) {
			die();
		}
	
		require_once $fileName;
	
		if (XC_CLASS_EXISTS($className)) {
			$actionFrame->mAction =new $className($actionFrame->mAdminFlag);
		}
	}
开发者ID:nunoluciano,项目名称:uxcl,代码行数:28,代码来源:ActionFrame.class.php

示例4: smarty_function_hyp_emoji_pad

function smarty_function_hyp_emoji_pad($params, &$smarty)
{
    if (!function_exists('XC_CLASS_EXISTS') || !XC_CLASS_EXISTS('HypCommonFunc')) {
        return 'Class "HypCommonFunc" not exists.';
    }
    if (empty($params['id'])) {
        return 'Parameter "id" is not set.';
    }
    $id = $params['id'];
    $checkmsg = empty($params['msg']) ? '' : $params['msg'];
    $clearDisplayId = empty($params['showDomId']) ? '' : $params['showDomId'];
    $emojiurl = empty($params['emojiUrl']) ? '' : $params['emojiUrl'];
    $writeJS = empty($params['outputWithJS']) ? TRUE : (bool) $params['outputWithJS'];
    $emj_list = empty($params['emojiList']) ? NULL : $params['emojiList'];
    if (strtolower($emj_list) === 'all') {
        $emj_list = 'all';
    } else {
        if (!empty($emj_list)) {
            $emj_list = explode(',', $emj_list);
            $emj_list = array_map('trim', $emj_list);
            $emj_list = array_map('intval', $emj_list);
        }
    }
    return HypCommonFunc::make_emoji_pad($id, $checkmsg, $clearDisplayId, $emojiurl, $writeJS, $emj_list);
}
开发者ID:nouphet,项目名称:rata,代码行数:25,代码来源:function.hyp_emoji_pad.php

示例5: execute

 function execute(&$controller)
 {
     if (!preg_match("/^\\w+\$/", $this->mActionName)) {
         die;
     }
     //
     // Create action object by mActionName
     //
     $className = "Pm_" . ucfirst($this->mActionName) . "Action";
     $fileName = ucfirst($this->mActionName) . "Action";
     if ($this->mAdminFlag) {
         $fileName = XOOPS_MODULE_PATH . "/pm/admin/actions/{$fileName}.class.php";
     } else {
         $fileName = XOOPS_MODULE_PATH . "/pm/actions/{$fileName}.class.php";
     }
     if (!file_exists($fileName)) {
         die;
     }
     require_once $fileName;
     if (XC_CLASS_EXISTS($className)) {
         $this->mAction =& new $className();
     }
     if (!is_object($this->mAction)) {
         $this->doActionNotFoundError($controller);
         return;
     }
     $handler =& xoops_gethandler('config');
     $moduleConfig =& $handler->getConfigsByDirname('pm');
     $this->mAction->prepare($controller, $controller->mRoot->mContext->mXoopsUser, $moduleConfig);
     if (!$this->mAction->hasPermission($controller, $controller->mRoot->mContext->mXoopsUser, $moduleConfig)) {
         $this->doPermissionError($controller);
         return;
     }
     if (xoops_getenv("REQUEST_METHOD") == "POST") {
         $viewStatus = $this->mAction->execute($controller, $controller->mRoot->mContext->mXoopsUser);
     } else {
         $viewStatus = $this->mAction->getDefaultView($controller, $controller->mRoot->mContext->mXoopsUser);
     }
     switch ($viewStatus) {
         case PM_FRAME_VIEW_SUCCESS:
             $this->mAction->executeViewSuccess($controller, $controller->mRoot->mContext->mXoopsUser, $controller->mRoot->mContext->mModule->getRenderTarget());
             break;
         case PM_FRAME_VIEW_ERROR:
             $this->mAction->executeViewError($controller, $controller->mRoot->mContext->mXoopsUser, $controller->mRoot->mContext->mModule->getRenderTarget());
             break;
         case PM_FRAME_VIEW_INDEX:
             $this->mAction->executeViewIndex($controller, $controller->mRoot->mContext->mXoopsUser, $controller->mRoot->mContext->mModule->getRenderTarget());
             break;
         case PM_FRAME_VIEW_INPUT:
             $this->mAction->executeViewInput($controller, $controller->mRoot->mContext->mXoopsUser, $controller->mRoot->mContext->mModule->getRenderTarget());
             break;
         case PM_FRAME_VIEW_PREVIEW:
             $this->mAction->executeViewPreview($controller, $controller->mRoot->mContext->mXoopsUser, $controller->mRoot->mContext->mModule->getRenderTarget());
             break;
         case PM_FRAME_VIEW_CANCEL:
             $this->mAction->executeViewCancel($controller, $controller->mRoot->mContext->mXoopsUser, $controller->mRoot->mContext->mModule->getRenderTarget());
             break;
     }
 }
开发者ID:hiro1173,项目名称:legacy,代码行数:59,代码来源:ActionFrame.class.php

示例6: _buildXML

    function _buildXML()
    {
        if ($this->encording) {
            if (!extension_loaded('mbstring') && !XC_CLASS_EXISTS('HypMBString')) {
                require_once dirname(dirname(__FILE__)) . '/mbemulator/mb-emulator.php';
            }
            $this->name = htmlspecialchars(mb_convert_encoding($this->name, 'UTF-8', $this->encording), ENT_COMPAT, 'UTF-8');
            $this->tag = htmlspecialchars(mb_convert_encoding($this->tag, 'UTF-8', $this->encording), ENT_COMPAT, 'UTF-8');
        }
        $tag = $changesurl = '';
        if ($this->changesurl) {
            $changesurl = <<<EOD
<param>
<value>{$this->changesurl}</value>
</param>
EOD;
        }
        if ($this->tag) {
            $tag = <<<EOD
<param>
<value>{$this->tag}</value>
</param>
EOD;
        }
        $this->xml_normal = <<<EOD
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>weblogUpdates.ping</methodName>
<params>
<param>
<value>{$this->name}</value>
</param>
<param>
<value>{$this->url}</value>
</param>{$changesurl}{$tag}
</params>
</methodCall>
EOD;
        $this->xml_extended = <<<EOD
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>weblogUpdates.extendedPing</methodName>
<params>
<param>
<value>{$this->name}</value>
</param>
<param>
<value>{$this->url}</value>
</param>
{$changesurl}
<param>
<value>{$this->rssurl}</value>
</param>
{$tag}
</params>
</methodCall>
EOD;
    }
开发者ID:nao-pon,项目名称:HypCommon,代码行数:58,代码来源:hyppinger.php

示例7:

 /**
  * create
  * 
  * @param   bool $isNew
  * 
  * @return  XoopsSimpleObject  $obj
  **/
 public function &create($isNew = true)
 {
     $obj = null;
     if (XC_CLASS_EXISTS($this->mClass)) {
         $obj = new $this->mClass($this->getDirname());
         if ($isNew) {
             $obj->setNew();
         }
     }
     return $obj;
 }
开发者ID:mambax7,项目名称:xcck,代码行数:18,代码来源:ObjectHandler.class.php

示例8: renderNone

 /**
  *  @public
  */
 public static function renderNone(&$html, $params)
 {
     if (!XC_CLASS_EXISTS('xoopsformelement')) {
         require_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
     }
     $form = new XoopsFormTextArea($params['name'], $params['name'], $params['value'], $params['rows'], $params['cols']);
     $form->setId($params['id']);
     if ($params['class'] != null) {
         $form->setClass($params['class']);
     }
     $html = $form->render();
 }
开发者ID:nunoluciano,项目名称:uxcl,代码行数:15,代码来源:TextareaEditor.class.php

示例9: smarty_function_xoops_dhtmltarea

function smarty_function_xoops_dhtmltarea($params, &$smarty)
{
	if (!XC_CLASS_EXISTS('xoopsformelement')) {
		require_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
	}
	$form = null;

	$root =& XCube_Root::getSingleton();
	$textFilter =& $root->getTextFilter();
	if (isset($params['name'])) {
		//
		// Fetch major elements from $params.
		//
		$params['name'] = trim($params['name']);
		$params['class'] = isset($params['class']) ? trim($params['class']) : null;
		$params['cols'] = isset($params['cols']) ? intval($params['cols']) : XOOPS_DHTMLTAREA_DEFAULT_COLS;
		$params['rows'] = isset($params['rows']) ? intval($params['rows']) : XOOPS_DHTMLTAREA_DEFAULT_ROWS;
		$params['value'] = isset($params['value']) ? $textFilter->toEdit($params['value']) : null;
		$params['id'] = isset($params['id']) ? trim($params['id']) : XOOPS_DHTMLTAREA_DEFID_PREFIX . $params['name'];
	
		//
		// Build the object for output.
		//
		$html = "";
		switch($params['editor']){
		case 'html':
			XCube_DelegateUtils::call("Site.TextareaEditor.HTML.Show", new XCube_Ref($html), $params);
			break;
		
		case 'none':
			XCube_DelegateUtils::call("Site.TextareaEditor.None.Show", new XCube_Ref($html), $params);
			break;
		case 'bbcode':
		default:
			XCube_DelegateUtils::call("Site.TextareaEditor.BBCode.Show", new XCube_Ref($html), $params);
			break;
		}
		print $html;
	
		/*
		$form =new XoopsFormDhtmlTextArea($name, $name, $value, $rows, $cols);
		$form->setId($id);
		if ($class != null) {
			$form->setClass($class);
		}
		
		print $form->render();
		*/
	}
}
开发者ID:nunoluciano,项目名称:uxcl,代码行数:50,代码来源:function.xoops_dhtmltarea.php

示例10: output

 function output($file, $mime, $size, $mtime)
 {
     $this->check_304($mtime);
     header('Content-Length: ' . $size);
     header('Content-Type: ' . $mime);
     header('Last-Modified: ' . gmdate("D, d M Y H:i:s", $mtime) . " GMT");
     header('Etag: ' . $mtime);
     header('Cache-Control: private, max-age=' . XELFINDER_CACHE_TTL);
     header('Expires: ' . gmdate("D, d M Y H:i:s", XELFINDER_UNIX_TIME + XELFINDER_CACHE_TTL) . ' GMT');
     header('Pragma:');
     if (function_exists('XC_CLASS_EXISTS') && XC_CLASS_EXISTS('HypCommonFunc')) {
         HypCommonFunc::readfile($file);
     } else {
         readfile($file);
     }
 }
开发者ID:naao,项目名称:xelfinder,代码行数:16,代码来源:xelFinderMisc.class.php

示例11: getMailer

 protected function getMailer()
 {
     $classname = 'XoopsMailer';
     if (_USE_XOOPSMAILER == true) {
         require_once XOOPS_ROOT_PATH . '/class/xoopsmailer.php';
         if (is_file(XOOPS_ROOT_PATH . '/language/' . $this->root->mLanguageManager->mLanguageName . '/xoopsmailerlocal.php')) {
             require_once XOOPS_ROOT_PATH . '/language/' . $this->root->mLanguageManager->mLanguageName . '/xoopsmailerlocal.php';
             if (XC_CLASS_EXISTS('XoopsMailerLocal')) {
                 $classname = 'XoopsMailerLocal';
             }
         }
     } else {
         require_once XOOPS_ROOT_PATH . '/class/mail/phpmailer/class.phpmailer.php';
         require_once _MY_MODULE_PATH . 'class/MyMailer.class.php';
         $classname = 'My_Mailer';
     }
     return new $classname();
 }
开发者ID:nunoluciano,项目名称:uxcl,代码行数:18,代码来源:AbstractAction.class.php

示例12: dirname

 /**
  * タイプに合わせて、専用のクラスオブジェクトを生成
  *
  * 例.
  * <code>
  * require_once("MobilePictogramConverter.php");
  *
  * $mpc =& MobilePictogramConverter::factory($str, MPC_FROM_FOMA, MPC_FROM_CHARSET_SJIS);
  * if (is_object($mpc) == false) {
  *     die($mpc);
  * }
  * </code>
  *
  * @param string  $str     変換前文字列
  * @param string  $carrier $strの絵文字キャリア (MPC_FROM_FOMA, MPC_FROM_EZWEB, MPC_FROM_SOFTBANK)
  * @param string  $charset 文字コード         (MPC_FROM_CHARSET_SJIS, MPC_FROM_CHARSET_UTF8)
  * @param string  $type    $strの絵文字タイプ  (MPC_FROM_OPTION_RAW, MPC_FROM_OPTION_WEB, MPC_FROM_OPTION_IMG)
  * @return mixed
  */
 public static function &factory($str, $carrier, $charset, $type = MPC_FROM_OPTION_RAW)
 {
     $filepath = dirname(__FILE__) . '/Carrier/' . strtolower($carrier) . '.php';
     if (file_exists($filepath) == false) {
         $error = 'The file doesn\'t exist.';
         return $error;
     }
     require_once $filepath;
     $classname = 'MPC_' . $carrier;
     if (XC_CLASS_EXISTS($classname) == false) {
         $error = 'The class doesn\'t exist.';
         return $error;
     }
     $mpc = new $classname();
     $mpc->setFromCharset($charset);
     $mpc->setString($str);
     $mpc->setFrom(strtoupper($carrier));
     $mpc->setStringType($type);
     return $mpc;
 }
开发者ID:nao-pon,项目名称:HypCommon,代码行数:39,代码来源:MobilePictogramConverter.php

示例13: smarty_modifier_hyp_emoji_pad

function smarty_modifier_hyp_emoji_pad($id = '', $checkmsg = '', $clearDisplayId = '', $emojiurl = '', $writeJS = TRUE, $emj_list = NULL)
{
    if (!function_exists('XC_CLASS_EXISTS') || !XC_CLASS_EXISTS('HypCommonFunc')) {
        return 'Class "HypCommonFunc" not exists.';
    }
    if (empty($id)) {
        return 'Parameter "id" is not set.';
    }
    $writeJS = (bool) $writeJS;
    $emj_list = empty($params['emojiList']) ? NULL : $params['emojiList'];
    if (is_string($emj_list)) {
        if (strtolower($emj_list) === 'all') {
            $emj_list = 'all';
        } else {
            if (!empty($emj_list)) {
                $emj_list = explode(',', $emj_list);
                $emj_list = array_map('trim', $emj_list);
                $emj_list = array_map('intval', $emj_list);
            }
        }
    }
    return HypCommonFunc::make_emoji_pad($id, $checkmsg, $clearDisplayId, $emojiurl, $writeJS, $emj_list);
}
开发者ID:nouphet,项目名称:rata,代码行数:23,代码来源:modifier.hyp_emoji_pad.php

示例14: xpwiki_pagecss_filter

function xpwiki_pagecss_filter(&$css, $chrctor)
{
    if (!extension_loaded('mbstring')) {
        if (!function_exists('XC_CLASS_EXISTS')) {
            include XOOPS_TRUST_PATH . '/class/hyp_common/XC_CLASS_EXISTS.inc.php';
        }
        if (!XC_CLASS_EXISTS('HypMBString')) {
            include XOOPS_TRUST_PATH . '/class/hyp_common/mbemulator/mb-emulator.php';
        }
    }
    $css = mb_convert_kana($css, 'asKV', mb_detect_encoding($css));
    $css = preg_replace('/(expression|javascript|vbscript|@import|cookie|eval|behavior|behaviour|binding|include-source|@i|[\\x00-\\x08\\x0e-\\x1f\\x7f]+|\\\\(?![\'"{};:()#A*]))/i', '', $css);
    $css = str_replace(array('*/', '<', '>', '&#'), array('*/  ', '&lt;', '&gt;', ''), $css);
}
开发者ID:nouphet,项目名称:rata,代码行数:14,代码来源:loader.php

示例15: invoke_method

 function invoke_method()
 {
     $this->debug('in invoke_method, methodname=' . $this->methodname . ' methodURI=' . $this->methodURI . ' SOAPAction=' . $this->SOAPAction);
     if ($this->wsdl) {
         if ($this->opData = $this->wsdl->getOperationData($this->methodname)) {
             $this->debug('in invoke_method, found WSDL operation=' . $this->methodname);
             $this->appendDebug('opData=' . $this->varDump($this->opData));
         } elseif ($this->opData = $this->wsdl->getOperationDataForSoapAction($this->SOAPAction)) {
             // Note: hopefully this case will only be used for doc/lit, since rpc services should have wrapper element
             $this->debug('in invoke_method, found WSDL soapAction=' . $this->SOAPAction . ' for operation=' . $this->opData['name']);
             $this->appendDebug('opData=' . $this->varDump($this->opData));
             $this->methodname = $this->opData['name'];
         } else {
             $this->debug('in invoke_method, no WSDL for operation=' . $this->methodname);
             $this->fault('Client', "Operation '" . $this->methodname . "' is not defined in the WSDL for this service");
             return;
         }
     } else {
         $this->debug('in invoke_method, no WSDL to validate method');
     }
     // if a . is present in $this->methodname, we see if there is a class in scope,
     // which could be referred to. We will also distinguish between two deliminators,
     // to allow methods to be called a the class or an instance
     $class = '';
     $method = '';
     if (strpos($this->methodname, '..') > 0) {
         $delim = '..';
     } else {
         if (strpos($this->methodname, '.') > 0) {
             $delim = '.';
         } else {
             $delim = '';
         }
     }
     if (strlen($delim) > 0 && substr_count($this->methodname, $delim) == 1 && XC_CLASS_EXISTS(substr($this->methodname, 0, strpos($this->methodname, $delim)))) {
         // get the class and method name
         $class = substr($this->methodname, 0, strpos($this->methodname, $delim));
         $method = substr($this->methodname, strpos($this->methodname, $delim) + strlen($delim));
         $this->debug("in invoke_method, class={$class} method={$method} delim={$delim}");
     }
     // does method exist?
     if ($class == '') {
         if (!function_exists($this->methodname)) {
             $this->debug("in invoke_method, function '{$this->methodname}' not found!");
             $this->result = 'fault: method not found';
             $this->fault('Client', "method '{$this->methodname}' not defined in service");
             return;
         }
     } else {
         $method_to_compare = substr(phpversion(), 0, 2) == '4.' ? strtolower($method) : $method;
         if (!in_array($method_to_compare, get_class_methods($class))) {
             $this->debug("in invoke_method, method '{$this->methodname}' not found in class '{$class}'!");
             $this->result = 'fault: method not found';
             $this->fault('Client', "method '{$this->methodname}' not defined in service");
             return;
         }
     }
     // evaluate message, getting back parameters
     // verify that request parameters match the method's signature
     if (!$this->verify_method($this->methodname, $this->methodparams)) {
         // debug
         $this->debug('ERROR: request not verified against method signature');
         $this->result = 'fault: request failed validation against method signature';
         // return fault
         $this->fault('Client', "Operation '{$this->methodname}' not defined in service.");
         return;
     }
     // if there are parameters to pass
     $this->debug('in invoke_method, params:');
     $this->appendDebug($this->varDump($this->methodparams));
     $this->debug("in invoke_method, calling '{$this->methodname}'");
     if ($class == '') {
         $this->debug('in invoke_method, calling function using call_user_func_array()');
         $call_arg = "{$this->methodname}";
         // straight assignment changes $this->methodname to lower case after call_user_func_array()
     } elseif ($delim == '..') {
         $this->debug('in invoke_method, calling class method using call_user_func_array()');
         $call_arg = array($class, $method);
     } else {
         $this->debug('in invoke_method, calling instance method using call_user_func_array()');
         $instance = new $class();
         $call_arg = array(&$instance, $method);
     }
     //
     // Insert CUBE CODE
     //
     $root =& XCube_Root::getSingleton();
     // $root->mContext->mUser->setService(true);
     $retValue = call_user_func_array($call_arg, array($root->mContext->mUser, $this->methodparams));
     if (is_array($retValue)) {
         $retValue = $this->_encodeUTF8($retValue, $root->mLanguageManager);
     } else {
         $retValue = $root->mLanguageManager->encodeUTF8($retValue);
     }
     $this->methodreturn = $retValue;
     $this->debug('in invoke_method, methodreturn:');
     $this->appendDebug($this->varDump($this->methodreturn));
     $this->debug("in invoke_method, called method {$this->methodname}, received {$this->methodreturn} of type " . gettype($this->methodreturn));
 }
开发者ID:hiro1173,项目名称:legacy,代码行数:99,代码来源:NusoapServer.class.php


注:本文中的XC_CLASS_EXISTS函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。