本文整理汇总了PHP中ui函数的典型用法代码示例。如果您正苦于以下问题:PHP ui函数的具体用法?PHP ui怎么用?PHP ui使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ui函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: vlist
public function vlist()
{
$this->CheckAdminPrivs('styles');
$default = ini('styles.default');
$styles = ui('style')->get_all();
include handler('template')->file('@admin/styles_list');
}
开发者ID:pf5512,项目名称:phpstudy,代码行数:7,代码来源:styles.mod.php
示例2: __construct
public function __construct(Charcoal_String $file, Charcoal_Integer $line, Charcoal_Integer $range = NULL)
{
parent::__construct();
$this->_file = us($file);
$this->_line = ui($line);
$this->_range = $range ? ui($range) : self::DEFAULT_RANGE;
}
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:7,代码来源:PhpSourceInfo.class.php
示例3: showHttpErrorDocument
public static function showHttpErrorDocument($status_code)
{
// Charcoal_ParamTrait::validateInteger( 1, $status_code );
$status_code = ui($status_code);
// HTML
$html_file = $status_code . '.html';
// アプリケーション以下のerror_docを検索
$html_file_path = Charcoal_ResourceLocator::getApplicationPath('error_doc', $html_file);
if (!is_file($html_file_path)) {
// log_info( 'system,debug,error',"エラードキュメント($html_file_path)は存在しません。", 'framework');
// プロジェクト以下のerror_docを検索
$html_file_path = Charcoal_ResourceLocator::getProjectPath('error_doc', $html_file);
if (!is_file($html_file_path)) {
// log_debug( 'system,debug,error',"エラードキュメント($html_file_path)は存在しません。", 'framework');
// フレームワーク以下のerror_docを検索
$html_file_path = Charcoal_ResourceLocator::getFrameworkPath('error_doc', $html_file);
if (!is_file($html_file_path)) {
// log_warning( 'system,debug,error',"エラードキュメント($html_file_path)は存在しません。", 'framework');
}
}
}
// 読み込みと表示
if (is_file($html_file_path)) {
readfile($html_file_path);
print "<br>";
}
}
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:27,代码来源:HttpErrorDocumentExceptionHandler.class.php
示例4: configure
/**
* Initialize instance
*
* @param Charcoal_Config $config configuration data
*/
public function configure($config)
{
parent::configure($config);
$session_name = $config->getString('session_name', '');
$save_path = $config->getString('save_path', '', TRUE);
$lifetime = $config->getInteger('lifetime', 0);
$valid_path = $config->getString('valid_path', '');
$valid_domain = $config->getString('valid_domain', '');
$ssl_only = $config->getBoolean('ssl_only', FALSE);
$save_path = us($save_path);
$lifetime = ui($lifetime);
$ssl_only = ub($ssl_only);
$session_name = us($session_name);
// デフォルトのセッション保存先
if (!$save_path || !is_dir($save_path)) {
$save_path = Charcoal_ResourceLocator::getApplicationPath('sessions');
}
// セッション初期化処理
// session_set_cookie_params( $lifetime, "$valid_path", "$valid_domain", $ssl_only );
session_save_path($save_path);
// $session_name = session_name( $session_name ? $session_name : APPLICATION );
session_name("PHPSESSID");
//session_regenerate_id( TRUE );
if ($this->getSandbox()->isDebug()) {
log_debug("session", "session_name:{$session_name}", self::TAG);
log_debug("session", "save_path:{$save_path}", self::TAG);
log_debug("session", "lifetime:{$lifetime}", self::TAG);
log_debug("session", "valid_path:{$valid_path}", self::TAG);
log_debug("session", "valid_domain:{$valid_domain}", self::TAG);
log_debug("session", "ssl_only:{$ssl_only}", self::TAG);
}
// メンバーに保存
$this->save_path = $save_path;
}
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:39,代码来源:DefaultSessionHandler.class.php
示例5: set
/**
* Save a value to cache
*
* @param string $key The key under which to store the value.
* @param Charcoal_Object $value value to save
* @param int $duration specify expiration span which the cache will be removed.
*/
public function set($key, $value, $duration = NULL)
{
// Charcoal_ParamTrait::validateString( 1, $key );
// Charcoal_ParamTrait::validateInteger( 3, $duration, TRUE );
$key = us($key);
$duration = $duration ? ui($duration) : ui($this->_default_duration);
$value = serialize($value);
$res = $this->_memcache->set($key, $value);
}
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:16,代码来源:MemcacheCacheDriver.class.php
示例6: configure
/**
* Initialize instance
*
* @param Charcoal_Config $config configuration data
*/
public function configure($config)
{
parent::configure($config);
$enable_cahche = $config->getBoolean('enable_cahche', true);
$cache_dir = $config->getString('cache_dir', CHARCOAL_CACHE_DIR . '/simplepie', TRUE);
$duration = $config->getInteger('duration', 1800);
$this->simple_pie->enable_cache(ub($enable_cahche));
$this->simple_pie->set_cache_location(us($cache_dir));
$this->simple_pie->set_cache_duration(ui($duration));
}
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:15,代码来源:SimplePieComponent.class.php
示例7: isBitSet
/**
* Test if specified bit flag is set
*
* @param int $target target value to test
* @param int $flag target flag to test
* @param int $mode test mode(see BITTEST_MODE_XXX constants)
*
* @return boolean
*/
public static function isBitSet($target, $flag, $mode)
{
switch (ui($mode)) {
case self::BITTEST_MODE_ALL:
return ($target & $flag) === $flag;
break;
case self::BITTEST_MODE_ANY:
return ($target & $flag) != 0;
}
return false;
}
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:20,代码来源:System.class.php
示例8: set
/**
* Save a value to cache
*
* @param string $key The key under which to store the value.
* @param Charcoal_Object $value value to save
* @param int $duration specify expiration span which the cache will be removed.
*/
public function set($key, Charcoal_Object $value, $duration = NULL)
{
// Charcoal_ParamTrait::validateString( 1, $key );
// Charcoal_ParamTrait::validateInteger( 3, $duration, TRUE );
$duration = $duration ? ui($duration) : ui($this->_default_duration);
$res = $this->_memcached->set(us($key), $value, $duration);
if (!$res) {
$result_code = $this->_memcached->getResultCode();
_throw(new Charcoal_CacheDriverException('memcached', "set failed. result code=[{$result_code}]"));
}
}
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:18,代码来源:MemcachedCacheDriver.class.php
示例9: CreateLink
public function CreateLink($payment, $parameter)
{
$html = '<form action="?mod=callback&pid='.$payment['id'].'" method="post" id="zf_form">';
$html .= '<input type="hidden" name="sign" value="'.$parameter['sign'].'" />';
$html .= '<div class="field" ><label>充值卡号码:</label><input id="recharge_card" type="text" name="number" class="f_input l_input" /><span style=" display:block; padding-top:5px; float:left;"><font id="query_result"></font></span></div>';
$html .= '<div class="field"><label>充值卡密码:</label><input type="password" name="password" class="f_input l_input" /></div>';
$html .= '<p style="margin-left: 110px;font-size: 12px;"><b>注意:实际充值金额是您的充值卡面额</b></p>';
$html .= '<div class="act" id="l_act" style="width:400px;"><input type="submit" class="btn btn-primary" value=" 充 值 " /></div>';
$html .= '</form>';
$html .= ui('loader')->js('@recharge.pay');
return $html;
}
开发者ID:pf5512,项目名称:phpstudy,代码行数:12,代码来源:recharge.php
示例10: configure
/**
* Initialize instance
*
* @param Charcoal_Config $config configuration data
*/
public function configure($config)
{
parent::configure($config);
$encoding = $config->getString('encoding', 'utf8');
$indent = $config->getBoolean('indent', true);
$output_xhtml = $config->getBoolean('output-xhtml', true);
$output_html = $config->getBoolean('output-html', true);
$wrap = $config->getInteger('wrap', 200);
$show_body_only = $config->getBoolean('show-body-only', true);
$clean = $config->getBoolean('clean', false);
$this->config = array('indent' => ub($indent), 'output-xhtml' => ub($output_xhtml), 'output-html' => ub($output_html), 'wrap' => ui($wrap), 'show-body-only' => ub($show_body_only), 'clean' => ub($clean));
$this->encoding = us($encoding);
}
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:18,代码来源:TidyComponent.class.php
示例11: sortByPriority
public function sortByPriority()
{
$array = $this->getValue();
if (!$array) {
return;
}
$key_priority = NULL;
foreach ($array as $key => $event) {
$key_priority[$key] = ui($event->getPriority());
}
array_multisort($key_priority, SORT_DESC, $array);
$this->setValue($array);
}
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:13,代码来源:EventQueue.class.php
示例12: __construct
/**
* Constructor
*/
public function __construct($page_info, $where = NULL, $params = NULL, $order_by = NULL, $group_by = NULL)
{
Charcoal_ParamTrait::validateIsA(1, 'Charcoal_DBPageInfo', $page_info);
Charcoal_ParamTrait::validateString(2, $where, TRUE);
Charcoal_ParamTrait::validateVector(2, $params, TRUE);
Charcoal_ParamTrait::validateString(3, $order_by, TRUE);
Charcoal_ParamTrait::validateString(4, $group_by, TRUE);
$this->page_info = $page_info;
$page = $page_info->getPage();
$page_size = $page_info->getPageSize();
$page = ui($page);
$page_size = ui($page_size);
$limit = $page_size;
$offset = ($page - 1) * $page_size;
parent::__construct($where, $params, $order_by, $limit, $offset, $group_by);
}
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:19,代码来源:PagedSQLCriteria.class.php
示例13: html
public function html()
{
$isCheck = rand(1, 13);
if ($isCheck == 13)
{
$lcks = array(
'logic.push.running.mix',
'logic.push.running.sms',
'logic.push.running.mail'
);
foreach ($lcks as $i => $lck)
{
$this->doCheckLockFile($lck);
}
}
return ui('loader')->js('@pingfore');
}
开发者ID:pf5512,项目名称:phpstudy,代码行数:17,代码来源:pingfore.ui.php
示例14: convertSize
/**
* convert memory size
*
* @param integer|Charcoal_Integer input_size memory size in bytes to be converted
* @param integer|Charcoal_Integer unit memory unit to be converted
*
* @return integer converted size
*/
public static function convertSize($value, $unit, $precision = self::DEFAULT_PRECISION)
{
$value = ui($value);
$unit = ui($unit);
switch ($unit) {
case Charcoal_EnumMemoryUnit::UNIT_B:
return (double) $value;
case Charcoal_EnumMemoryUnit::UNIT_KB:
return round((double) $value / self::BYTES_KB, $precision);
case Charcoal_EnumMemoryUnit::UNIT_MB:
return round((double) $value / self::BYTES_MB, $precision);
case Charcoal_EnumMemoryUnit::UNIT_GB:
return round((double) $value / self::BYTES_GB, $precision);
case Charcoal_EnumMemoryUnit::UNIT_TB:
return round((double) $value / self::BYTES_TB, $precision);
}
_throw(new Charcoal_UnsupportedMemoryUnitException($unit));
}
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:26,代码来源:MemoryUtil.class.php
示例15: calcImageFitSize
public static function calcImageFitSize(GDImageInfo $img_info, Charcoal_Integer $dst_width, Charcoal_Integer $dst_height)
{
// 変換元画像サイズ
$src_width = $img_info->getWidth();
$src_height = $img_info->getHeight();
// 変換先画像サイズ
$dst_width = ui($dst_width);
$dst_height = ui($dst_height);
// 幅を揃えた場合の拡大率
$zoom_1 = 1 / $src_width * $dst_width;
// 高さを揃えた場合の拡大率
$zoom_2 = 1 / $src_height * $dst_height;
// 拡大率が小さい方がピッタリ収まるサイズ
$zoom = min($zoom_1, $zoom_2);
$width = $src_width * $zoom;
$height = $src_height * $zoom;
return array($width, $height);
}
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:18,代码来源:GraphicsUtil.class.php
示例16: processEvent
/**
* process event
*
* @param Charcoal_IEventContext $context event context
*
* @return boolean|Charcoal_Boolean
*
* @throws DivisionByZeroException
*/
public function processEvent($context)
{
$request = $context->getRequest();
// Get parameter from request
$a = $request->getInteger('a', 0);
$b = $request->getInteger('b', 0);
$op = $request->getString('op', '+');
$a = ui($a);
$b = ui($b);
$op = us($op);
$result = NULL;
switch ($op) {
case 'add':
$result = $a + $b;
break;
case 'sub':
$result = $a - $b;
break;
case 'mul':
$result = $a * $b;
break;
case 'div':
if ($b == 0) {
throw new DivisionByZeroException();
}
$result = $a / $b;
break;
}
// show message
if ($result) {
echo "result:" . $result . eol();
} else {
echo "<pre>USAGE:" . PHP_EOL;
echo "http://" . $_SERVER['SERVER_NAME'] . "/calc/value1/value2/[add/sub/mul/div]" . PHP_EOL;
echo "value1, value2: number" . eol();
echo "add: shows result of 'value1 + value2'" . PHP_EOL;
echo "sub: shows result of 'value1 - value2'" . PHP_EOL;
echo "mul: shows result of 'value1 * value2'" . PHP_EOL;
echo "div: shows result of 'value1 / value2'" . PHP_EOL;
echo "</pre>" . eol();
}
// return TRUE if processing the procedure success.
return TRUE;
}
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:53,代码来源:CalcTask.class.php
示例17: find
/**
* find elements
*
* @param Charcoal_String|string $selector
* @param Charcoal_Integer|integer $index
*/
public function find($selector, $index = NULL)
{
Charcoal_ParamTrait::validateString(1, $selector);
Charcoal_ParamTrait::validateInteger(2, $index, TRUE);
$selector = us($selector);
if ($index !== NULL) {
// returns single element
$index = ui($index);
$result = $this->element->find($selector, $index);
return $result ? new Charcoal_SimpleHtmlDomElement($result) : NULL;
}
// returns all elements
$result = $this->element->find($selector);
$elements = array();
foreach ($result as $e) {
$elements[] = new Charcoal_SimpleHtmlDomElement($e);
}
return $result ? $elements : array();
}
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:25,代码来源:SimpleHtmlDomElement.class.php
示例18: ui
function ui($str){
$rendered = lib('htmldom')->str_get_html($str);
foreach($rendered->find('ui') as $uiElement){
$obj = ui($uiElement->type);
foreach($uiElement->attr as $attr=>$val){
$obj->$attr = $val;
}
if(@$obj->id==''){
$uiElement->outertext = '<b>Apex UI element of type '.$obj->type.' is missing the ID property.</b>';
}else{
$obj->inner = $uiElement->innertext;
ob_start();
$obj->render();
$uiElement->outertext = ob_get_clean();
}
}
return $rendered;
}
开发者ID:nirgavish,项目名称:Framework--Apex,代码行数:21,代码来源:page.php
示例19: if
<div class="stepstat">
<ul>
<li class="unactivated">1</li>
<li class="unactivated">2</li>
<li class="unactivated">3</li>
<li class="current last">4</li>
</ul>
<div class="stepstatbg stepstat4"></div>
</div>
</div>
<h2 class="title">点击“开始安装”按钮,开启您的团购之旅!</h2>
<div class="installs">
<ul>
<li>数据结构<font title="struct" class="process wait">等待安装</font></li>
<li>管理账户<font title="admin" class="process wait">等待安装</font></li>
<li>系统设置<font title="setting" class="process wait">等待安装</font></li>
<? if($test == 'yes') { ?>
<li>测试数据<font title="test" class="process wait">等待安装</font></li>
<? } ?>
<li>清理缓存<font title="clean" class="process wait">等待安装</font></li>
<li>结束安装<font title="ends" class="process wait">等待安装</font></li>
</ul>
</div>
<div class="btnbox marginbot">
<font id="final_result">
<input type="submit" value="开始安装" onclick="javascript:cc2install(this);" />
</font>
</div>
</div>
<?=ui('loader')->js('#inizd/install/js/step.install')?>
<? include handler('template')->file('@inizd/install/footer'); ?>
开发者ID:pf5512,项目名称:phpstudy,代码行数:31,代码来源:install.php
示例20: __construct
public function __construct($type, $string = NULL)
{
$this->type = ui($type);
$this->string = us($string);
}
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:5,代码来源:QueryTargetElement.class.php
注:本文中的ui函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论