当前位置: 首页>>代码示例>>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;未经允许,请勿转载。