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


PHP symbol函数代码示例

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


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

示例1: displayAsSymbol

/**
 *
 *
 * @param string $displayAs
 * @return string
 */
function displayAsSymbol($displayAs)
{
    switch (strtolower($displayAs)) {
        case 'heading':
            return symbol('heading');
        case 'categories':
            return symbol('nested');
        case 'flat':
            return symbol('flat');
        case 'discussions':
        default:
            return symbol('discussions');
    }
}
开发者ID:vanilla,项目名称:vanilla,代码行数:20,代码来源:category-settings-functions.php

示例2: parseArguments

 static function parseArguments($source = null, $fpos = 0)
 {
     $parser = new ArgumentLexer($source, $fpos);
     $result = array();
     $current_buffer =& $result;
     $filter_buffer = array();
     $tokens = $parser->parse();
     foreach ($tokens as $token) {
         list($token, $data) = $token;
         if ($token == 'filter_start') {
             $filter_buffer = array();
             $current_buffer =& $filter_buffer;
         } elseif ($token == 'filter_end') {
             if (count($filter_buffer)) {
                 $i = count($result) - 1;
                 if (is_array($result[$i])) {
                     $result[$i]['filters'][] = $filter_buffer;
                 } else {
                     $result[$i] = array(0 => $result[$i], 'filters' => array($filter_buffer));
                 }
             }
             $current_buffer =& $result;
         } elseif ($token == 'boolean') {
             $current_buffer[] = $data === 'true' ? true : false;
         } elseif ($token == 'name') {
             $current_buffer[] = symbol($data);
         } elseif ($token == 'number' || $token == 'string') {
             $current_buffer[] = $data;
         } elseif ($token == 'named_argument') {
             $last = $current_buffer[count($current_buffer) - 1];
             if (!is_array($last)) {
                 $current_buffer[] = array();
             }
             $namedArgs =& $current_buffer[count($current_buffer) - 1];
             list($name, $value) = array_map('trim', explode(':', $data, 2));
             # if argument value is variable mark it
             $value = self::parseArguments($value);
             $namedArgs[$name] = $value[0];
         } elseif ($token == 'operator') {
             $current_buffer[] = array('operator' => $data);
         }
     }
     return $result;
 }
开发者ID:rlaager,项目名称:h2o-php,代码行数:44,代码来源:parser.php

示例3: compile_call

function compile_call($expr, &$oob)
{
    static $php_forms = array("print", "array");
    $name = array_shift($expr);
    $oob["macros"] = is_array($oob["macros"]) ? $oob["macros"] : array();
    if (array_key_exists(symbol_str($name), $oob["macros"])) {
        array_unshift($expr, $oob["macros"][$name . ""]);
        return compile(call_user_func_array("call", $expr), $oob);
    }
    $buf = ",";
    foreach ($expr as $e) {
        $buf .= compile(is_symbol($e) ? array(symbol("env"), $e) : $e, $oob) . ",";
    }
    $buf = substr($buf, 0, -1);
    $buf = $buf == "," ? "" : $buf;
    if (function_exists($name . "") or in_array($name . "", $php_forms)) {
        return "" . $name . "(" . substr($buf, 1, strlen($buf)) . ")";
    }
    return "call(" . compile($name, $oob) . $buf . ")";
}
开发者ID:hiredman,项目名称:php.lisp,代码行数:20,代码来源:compiler.php

示例4: render

 function render($context, $stream)
 {
     if ($this->argument) {
         $object = $context->resolve(symbol($this->argument));
     } else {
         $object = $context->scopes[0];
     }
     $output = "<pre>" . print_r($object, true) . "</pre>";
     $stream->write($output);
 }
开发者ID:nesicus,项目名称:mephit,代码行数:10,代码来源:tags.php

示例5: symbol_bool

        echo symbol_bool($profile->is_disp_regist);
        ?>
</td>
	<td><?php 
        echo symbol_bool($profile->is_disp_config);
        ?>
</td>
	<td><?php 
        echo symbol_bool($profile->is_disp_search);
        ?>
</td>
	<td><?php 
        if (in_array($profile->form_type, Site_Profile::get_form_types_having_profile_options())) {
            echo Html::anchor('admin/profile/options/' . $profile->id, term('site.list'));
        } else {
            echo symbol('noValue');
        }
        ?>
</td>
</tr>
<?php 
    }
    ?>
</table>
<?php 
} else {
    echo term('profile', 'site.item');
    ?>
がありません。
<?php 
}
开发者ID:uzura8,项目名称:flockbird,代码行数:31,代码来源:list.php

示例6: markupText

 /**
  * Apply markup rules on plain text.
  *
  * @param TextFormat $markup  Markup rules applied on marked-up text.
  * @param string     $text    Marked-up text on which rules are applied.
  *
  * @return string  HTML code computed from marked-up text.
  */
 private static function markupText($markup, $text)
 {
     return symbol(smile($markup->format($text), false));
 }
开发者ID:ratbird,项目名称:hope,代码行数:12,代码来源:Markup.class.php

示例7: macro_expand

 static function macro_expand($form)
 {
     if (is_array($form)) {
         $output = array();
         foreach ($form as $part) {
             if (is_array($part)) {
                 array_push($output, self::macro_expand($part));
             } else {
                 array_push($output, $part);
             }
         }
         $op = $output[0];
         if (is_symbol($op) and substr($op . "", -1) == "." and $op . "" != ".") {
             $output[0] = symbol(substr($op, 0, strlen($op) - 1));
             $op = symbol("new");
             array_unshift($output, $op);
         }
         if (is_symbol($op) and $op->macro) {
             $op = Lisp::eval1($op);
             array_shift($output);
             $output = Lisp::apply1($op, $output);
             $output = self::macro_expand($output);
         }
         return $output;
     } else {
         return $form;
     }
 }
开发者ID:hiredman,项目名称:php.lisp,代码行数:28,代码来源:reader.php

示例8: parseArguments

 static function parseArguments($source = null, $fpos = 0)
 {
     $parser = new ArgumentLexer($source, $fpos);
     $result = array();
     $current_buffer =& $result;
     $filter_buffer = array();
     foreach ($parser->parse() as $token) {
         list($token, $data) = $token;
         if ($token == 'filter_start') {
             $filter_buffer = array();
             $current_buffer =& $filter_buffer;
         } elseif ($token == 'filter_end') {
             if (count($filter_buffer)) {
                 $result[] = $filter_buffer;
             }
             $current_buffer =& $result;
         } elseif ($token == 'name') {
             $current_buffer[] = symbol($data);
         } elseif ($token == 'number' || $token == 'string') {
             $current_buffer[] = $data;
         } elseif ($token == 'named_argument') {
             $last = $current_buffer[count($current_buffer) - 1];
             if (!is_array($last)) {
                 $current_buffer[] = array();
             }
             $namedArgs =& $current_buffer[count($current_buffer) - 1];
             list($name, $value) = array_map('trim', explode(':', $data, 2));
             $namedArgs[$name] = $value;
         } elseif ($token == 'operator') {
             $current_buffer[] = array('operator' => $data);
         }
     }
     return $result;
 }
开发者ID:bouchra012,项目名称:PMB,代码行数:34,代码来源:parser.php

示例9: render

 public function render($context, $stream)
 {
     if ($this->argument) {
         $object = $context->resolve(symbol($this->argument));
     } else {
         $object = $context->scopes[0];
     }
     $output = '<pre>' . htmlspecialchars(print_r($object, true)) . '</pre>';
     $stream->write($output);
 }
开发者ID:tonjoo,项目名称:tiga-framework,代码行数:10,代码来源:tags.php

示例10: symbol_bool

function symbol_bool($bool)
{
    return $bool ? symbol('bool.true') : symbol('bool.false');
}
开发者ID:uzura8,项目名称:flockbird,代码行数:4,代码来源:site_util.php

示例11: mysqli_fetch_array

        $Result1 = mysqli_fetch_array($strSQL1);
        echo $Result1['question'];
        ?>
</td>
	<td><?php 
        echo $Result['answer'];
        ?>
</td>
	<td><?php 
        echo $Result['c_answer'];
        ?>
</td>
   
    
	<td> <div align="center">  <span class='<?php 
        symbol($Result['mark']);
        ?>
' aria-hidden="true"></span> </div></td>
  </tr>
  <?php 
    }
    ?>
  </tbody>
</table>



<div class="footer-copyright" align="center">
	<div class="container">
		<div class="span 12">
				
开发者ID:sudhinsr,项目名称:entrance_mate,代码行数:30,代码来源:result.php

示例12: symbol

        } else {
            ?>
	<td class="small"><?php 
            echo symbol('noValue');
            ?>
</td>
<?php 
        }
        ?>

	<td><?php 
        echo Html::anchor('admin/member/' . $member->id, $member->name);
        ?>
</td>
	<td><?php 
        echo isset($member->sex) && strlen($member->sex) ? \Site_Form::get_form_options4config('term.member.sex.options', $member->sex) : symbol('noValue');
        ?>
</td>
	<td class="fs12"><?php 
        echo site_get_time($member->created_at, 'relative', 'Y/m/d H:i');
        ?>
</td>
	<td class="fs12"><?php 
        echo site_get_time($member->last_login, 'relative', 'Y/m/d H:i');
        ?>
</td>
</tr>
<?php 
    }
    ?>
</table>
开发者ID:uzura8,项目名称:flockbird,代码行数:31,代码来源:list.php


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