本文整理匯總了PHP中Publisher::setAddress方法的典型用法代碼示例。如果您正苦於以下問題:PHP Publisher::setAddress方法的具體用法?PHP Publisher::setAddress怎麽用?PHP Publisher::setAddress使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Publisher
的用法示例。
在下文中一共展示了Publisher::setAddress方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getAllPublisher
function getAllPublisher()
{
$key = 'publisher';
$collection = CacheManager::get($key, TRUE);
if ($collection) {
return $collection;
}
$collection = new Collection();
$this->connect();
$result = $this->conn->query("CALL sp_get_all_publisher()");
if ($result) {
//$row = $result->fetch_assoc();
while ($obj = $result->fetch_object()) {
$publisher = new Publisher();
$publisher->setId($obj->Publisher_id);
$publisher->setName($obj->Name);
$publisher->setAddress($obj->Address);
$publisher->setPhone($obj->Phone);
$collection->addItem($publisher, $obj->Publisher_id);
}
$result->close();
// for fetch_object()
}
//$result->free_result(); // for fetch_assoc()
$this->close();
CacheManager::set($key, $collection, TRUE);
return $collection;
}