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


PHP State::set方法代码示例

本文整理汇总了PHP中State::set方法的典型用法代码示例。如果您正苦于以下问题:PHP State::set方法的具体用法?PHP State::set怎么用?PHP State::set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在State的用法示例。


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

示例1: get

 /**
  * Returns the state with the given id. If no such state exists, a new
  * state is returned.
  */
 function get($_id)
 {
     $_id = 'x';
     $state = new State();
     $state->id = $_id;
     if (!is_readable($this->_filename_of($_id))) {
         return $state;
     }
     $pairs = parse_ini_file($this->_filename_of($_id));
     foreach ($pairs as $key => $value) {
         $state->set($key, $value);
     }
     return $state;
 }
开发者ID:useada,项目名称:freech-1,代码行数:18,代码来源:statedb.class.php

示例2: reset

 static function reset()
 {
     State::set('notifications', array());
 }
开发者ID:Air-Craft,项目名称:air-craft-www,代码行数:4,代码来源:Notifier.php

示例3: State

"><?php 
    echo $row['name'];
    ?>
 </option>
                                                    <?php 
}
?>
                                                </select>
                                            </div>
                                        </td>
                                    </tr>
                                    <?php 
$id = Request::get("id");
if (is_numeric($id) && $id > 0) {
    $stateObj = new State();
    $stateObj->set("state_id", $id);
    $result = $stateObj->getName();
    if (count($result)) {
        $row = $result[0];
        $state_id = $row['id'];
        $country_id = $row['country_id'];
        $state_name = $row['name'];
        $state_status = $row['active'];
    }
}
?>
                                    <tr>
                                        <td><label class="control-label" for="selectError">State</label></td>
                                        <td><div class="input-group" style="width: 50%">
                                                <span class="input-group-addon"></span>
                                                <input type="text" name="state_name" value="<?php 
开发者ID:sonaljain888,项目名称:legal-lawyer1,代码行数:31,代码来源:add_state.php

示例4: set_errors

 /**
  * Set the state with the given errors.
  * 
  * @param array $errors
  */
 private function set_errors($errors)
 {
     if (count($errors) == 0) {
         return;
     }
     $errors_array = array();
     foreach ($this->config->get_sections() as $section) {
         foreach ($section->get_fields() as $component) {
             if ($component instanceof \Amarkal\UI\ValidatableComponentInterface && $errors[$component->get_name()]) {
                 $errors_array[] = array('section' => $section->get_slug(), 'message' => $errors[$component->get_name()]);
             }
         }
     }
     State::set('errors', $errors_array);
 }
开发者ID:Air-Craft,项目名称:air-craft-www,代码行数:20,代码来源:OptionsPage.php

示例5:

<?php

State::set('title', 'Total Lucha Libre Latina');
require_once 'app/partials/header/header.php';
require_once 'app/partials/nav/nav.php';
?>

<link rel="stylesheet" href="app/modules/home/home.css">
<script src="app/modules/home/home.js"></script> 

<div class="section-home">


	<!-- <section class="banner flat">
		<div class="carousel slide" id="myCarousel" data-ride="carousel">
			<ol class="carousel-indicators">
				<li data-target="#myCarousel" data-slide-to="0" class="active"></li> 
				<li data-target="#myCarousel" data-slide-to="1" class="active"></li> 
				<li data-target="#myCarousel" data-slide-to="2" class="active"></li> 
			</ol>
			<div class="carousel-inner" role="listbox">
				<div class="item">
					<div class="container">
						<div class="row">
							<div class="col-lg-12">
								Item 0
							</div> 
						</div> 
					</div> 
				</div> 
				<div class="item">
开发者ID:samueleishion,项目名称:TLLL,代码行数:31,代码来源:home.php

示例6:

<?php

State::set('title', 'Hegel.js 404');
require_once 'app/partials/header/header.php';
require_once 'app/partials/nav/nav.php';
?>

<div class="container">
	<div class="row">
		<div class="col-sm-12 text-center">
			<h1>404</h1>
		</div> 
	</div> 
</div> 

<?php 
require_once 'app/partials/footer/footer.php';
开发者ID:samueleishion,项目名称:TLLL,代码行数:17,代码来源:404.php


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