當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。