當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Store::read方法代碼示例

本文整理匯總了PHP中Store::read方法的典型用法代碼示例。如果您正苦於以下問題:PHP Store::read方法的具體用法?PHP Store::read怎麽用?PHP Store::read使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Store的用法示例。


在下文中一共展示了Store::read方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Construct state.
  *
  * @param Store $store
  *            Store to load/save data from/to.
  * @param bool $mutable
  *            Whether state is mutable (true) or read-only (false).
  * @throws AccessException If state could not be read.
  */
 public function __construct(Store $store, $mutable = true)
 {
     parent::__construct();
     $this->store = $store;
     try {
         $this->store->open($mutable);
         $this->data = $this->store->read();
     } catch (AccessException $e) {
         throw new AccessException('Could not read state: ' . $e->getMessage(), null, $e);
     }
 }
開發者ID:jivoo,項目名稱:core,代碼行數:20,代碼來源:State.php

示例2: __construct

 /**
  * Construct state.
  * @param Store $store Store to load/save data from/to.
  * @throws AccessException If state could not be read.
  */
 public function __construct(Store $store)
 {
     parent::__construct();
     $this->store = $store;
     try {
         $this->store->open(true);
         $this->data = $this->store->read();
     } catch (AccessException $e) {
         throw new AccessException(tr('Could not open session: %1', $e->getMessage()), null, $e);
     }
 }
開發者ID:jivoo,項目名稱:jivoo,代碼行數:16,代碼來源:Session.php

示例3: reload

 /**
  * Reload configuration document from store.
  */
 public function reload()
 {
     if ($this->root !== $this) {
         $this->root->reload();
         return;
     }
     if (!isset($this->store)) {
         return;
     }
     if (!$this->store->touch()) {
         return;
     }
     try {
         $this->store->open(false);
         $this->data = $this->store->read();
     } catch (StoreException $e) {
     }
     $this->store->close();
 }
開發者ID:jivoo,項目名稱:jivoo,代碼行數:22,代碼來源:Config.php

示例4: reload

 /**
  * Reload configuration document from store.
  * @throws AccessException If file could not be read.
  */
 public function reload()
 {
     if ($this->root !== $this) {
         $this->root->reload();
         return;
     }
     if (!isset($this->store)) {
         return;
     }
     if (!$this->store->touch()) {
         return;
     }
     try {
         $this->store->open(false);
         $this->data = $this->store->read();
     } catch (AccessException $e) {
         throw new AccessException('Could not read configration: ' . $e->getMessage(), null, $e);
     }
     $this->store->close();
 }
開發者ID:jivoo,項目名稱:core,代碼行數:24,代碼來源:Config.php

示例5: isset

<?php 
if (!Forms::checkPermission(FORM_LOT_NEW)) {
    return;
}
require_once 'inc/class.item.php';
require_once 'inc/class.store.php';
$db = Database::getInstance();
$itemid = isset($_GET['item']) && is_numeric($_GET['item']) ? $_GET['item'] : "";
$storeid = isset($_GET['store']) && is_numeric($_GET['store']) ? $_GET['store'] : "";
$item = new Item();
$store = new Store();
if ($itemid) {
    $item->read($itemid);
}
if ($storeid) {
    $store->read($storeid);
}
include 'inc/widget/error.php';
?>

<form action="" method="post">
	<table class="form">
	<tr>
		<td class="label">Nombre:</td>
		<td>
			<?php 
if ($itemid) {
    echo "<input type='hidden' name='itemid' value='{$itemid}'/><span>{$item->name}, {$item->type}</span>";
} else {
    $items = Item::getAll("name", "");
    echo "<select name='itemid' id='items'>";
開發者ID:BackupTheBerlios,項目名稱:rinventory-svn,代碼行數:31,代碼來源:lot_new.php

示例6: Lot

<p class="form-title">Detalle de Lote</p>
<?php 
if (!Forms::checkPermission(FORM_LOT_EDIT)) {
    return;
}
require_once 'inc/class.item.php';
require_once 'inc/class.store.php';
require_once 'inc/class.lot.php';
require_once 'inc/class.formatter.php';
$lot = new Lot();
$item = new Item();
$store = new Store();
$lotid = isset($_GET['lot']) && is_numeric($_GET['lot']) ? $_GET['lot'] : 0;
if ($lot->read($lotid)) {
    $item->read($lot->itemid);
    $store->read($lot->storeid);
}
include 'inc/widget/error.php';
?>
<form method="post">
	<table class="form">
	<tr>
		<td class="label">Lote Nro.:</td>
		<td><?php 
echo $lot->id;
?>
</td>
	</tr>
	<tr>
		<td class="label">Producto:</td>
		<td><?php 
開發者ID:BackupTheBerlios,項目名稱:rinventory-svn,代碼行數:31,代碼來源:lot_edit.php

示例7: isset

if (!Forms::checkPermission(FORM_USER_DETAIL)) {
    return;
}
require 'inc/class.store.php';
require 'inc/class.user.php';
require_once 'inc/class.log.php';
$userid = isset($_GET['user']) && is_numeric($_GET['user']) ? $_GET['user'] : -1;
$user = new User();
$store = new Store();
if (!$user->read($userid)) {
    $log = Log::getInstance();
    $log->addError("Informaci&oacute;n de Usuario no disponible");
} else {
    if ($user->storeid) {
        $store->read($user->storeid);
    }
}
?>
<p class="form-title">Informaci&oacute;n de Usuario</p>
	<?php 
include 'inc/widget/error.php';
?>
	<table class="form">
	<tbody>
	<tr>
		<td class="label">Nombre:</td>
		<td><?php 
echo $user->firstname;
?>
</td>
開發者ID:BackupTheBerlios,項目名稱:rinventory-svn,代碼行數:30,代碼來源:user_detail.php

示例8: isset

<p class="form-title">Almacen</p>
<?php 
require 'inc/class.store.php';
require_once 'inc/class.log.php';
$storeid = isset($_GET['store']) ? $_GET['store'] : "";
$log = Log::getInstance();
$store = new Store();
if ($storeid != "new" && (!$storeid || !$store->read($storeid))) {
    $log->addError("");
}
include 'inc/widget/error.php';
if (isset($_POST['storeid']) && isset($_POST['page']) && !$log->isError()) {
    include 'inc/widget/success.php';
}
?>
<form action="" method="post" enctype="multipart/form-data">
	<table class="form">
	<tbody>
	<tr>
		<td class="label">Nombre:</td>
		<td><input name="name" type="text" id="name" value="<?php 
echo $store->name;
?>
" size="60"> <span class="mandatory">*</span></td>
	</tr>
	<tr>
		<td class="label">Nombre de Contacto:</td>
		<td><input name="contact" type="text" id="contact" value="<?php 
echo $store->contact;
?>
" size="60"> <span class="mandatory">*</span></td>
開發者ID:BackupTheBerlios,項目名稱:rinventory-svn,代碼行數:31,代碼來源:store_edit.php

示例9: isset

<p class="form-title">Almacen</p>
<?php 
require 'inc/class.store.php';
require_once 'inc/class.log.php';
$storeid = isset($_GET['store']) ? $_GET['store'] : "";
$log = Log::getInstance();
$store = new Store();
if (!$storeid || !$store->read($storeid)) {
    $log->addError(INFORMATION_UNAVAILABLE);
}
include 'inc/widget/error.php';
?>

<table class="form">
<tbody>
<tr>
	<td class="label">Nombre:</td>
	<td><?php 
echo $store->name;
?>
</td>
</tr>
<tr>
	<td class="label">Nombre de Contacto:</td>
	<td><?php 
echo $store->contact;
?>
</td>
</tr>
<tr>
	<td class="label">Tel&eacute;fono:</td>
開發者ID:BackupTheBerlios,項目名稱:rinventory-svn,代碼行數:31,代碼來源:store_detail.php


注:本文中的Store::read方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。