<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Containers - Zend Framework Manual</title>
</head>
<body>
<table width="100%">
<tr valign="top">
<td width="85%">
<table width="100%">
<tr>
<td width="25%" style="text-align: left;">
<a href="zend.navigation.pages.html">Pages</a>
</td>
<td width="50%" style="text-align: center;">
<div class="up"><span class="up"><a href="zend.navigation.html">Zend_Navigation</a></span><br />
<span class="home"><a href="manual.html">Programmer's Reference Guide</a></span></div>
</td>
<td width="25%" style="text-align: right;">
<div class="next" style="text-align: right; float: right;"><a href="zend.oauth.html">Zend_Oauth</a></div>
</td>
</tr>
</table>
<hr />
<div id="zend.navigation.containers" class="section"><div class="info"><h1 class="title">Containers</h1></div>
<p class="para">
Containers have methods for adding, retrieving, deleting and
iterating pages. Containers implement the
<a href="http://php.net/spl" class="link external">» SPL</a> interfaces
<span class="classname">RecursiveIterator</span> and
<span class="classname">Countable</span>, meaning that a container can
be iterated using the SPL
<span class="classname">RecursiveIteratorIterator</span> class.
</p>
<div class="section" id="zend.navigation.containers.creating" name="zend.navigation.containers.creating"><div class="info"><h1 class="title">Creating containers</h1></div>
<p class="para">
<span class="classname">Zend_Navigation_Container</span> is
abstract, and can not be instantiated directly. Use
<span class="classname">Zend_Navigation</span> if you want to
instantiate a container.
</p>
<p class="para">
<span class="classname">Zend_Navigation</span> can be constructed
entirely empty, or take an array or a
<span class="classname">Zend_Config</span> object with pages to put in the
container. Each page in the given array/config will eventually be
passed to the <span class="methodname">addPage()</span> method of the container class,
which means that each element in the array/config can be an array or
a config object, or a <span class="classname">Zend_Navigation_Page</span>
instance.
</p>
<div class="example"><div class="info"><p><b>Example #1 Creating a container using an array</b></p></div>
<div class="programlisting php"><div class="phpcode"><div class="php" style="font-family: monospace;"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/*</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * Create a container from an array</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> *</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * Each element in the array will be passed to</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * Zend_Navigation_Page::factory() when constructing.</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> */</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$container</span> = <span style="color: #000000; font-weight: bold;">new</span> Zend_Navigation<span style="color: #66cc66;">(</span><a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">(</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">(</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #ff0000;">'label'</span> => <span style="color: #ff0000;">'Page 1'</span>,</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #ff0000;">'id'</span> => <span style="color: #ff0000;">'home-link'</span>,</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #ff0000;">'uri'</span> => <span style="color: #ff0000;">'/'</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">)</span>,</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">(</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #ff0000;">'label'</span> => <span style="color: #ff0000;">'Zend'</span>,</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #ff0000;">'uri'</span> => <span style="color: #ff0000;">'http://www.zend
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
zend framework 1.11.6 (522个子文件)
zend.navigation.containers.html 226KB
zend.pdf.drawing.html 213KB
zend.ldap.api.html 175KB
learning.quickstart.create-model.html 172KB
zend.gdata.gapps.html 170KB
zend.gdata.photos.html 167KB
zend.openid.consumer.html 166KB
zend.mail.read.html 161KB
zend.translate.additional.html 156KB
zend.feed.reader.html 153KB
zend.test.phpunit.html 150KB
zend.locale.functions.html 144KB
zend.file.transfer.validators.html 142KB
zend.gdata.calendar.html 135KB
zend.service.livedocx.html 117KB
zend.application.available-resources.html 115KB
zend.service.twitter.html 115KB
zend.service.technorati.html 115KB
zendx.jquery.view.html 113KB
zend.controller.actionhelpers.html 110KB
zend.pdf.usage.html 107KB
zend.http.client.adapters.html 106KB
zend.test.phpunit.db.html 104KB
zend.codegenerator.examples.html 104KB
zend.navigation.pages.html 100KB
zend.db.table.relationships.html 98KB
zend.codegenerator.reference.html 97KB
zend.gdata.gbase.html 96KB
zend.amf.server.html 95KB
zend.gdata.youtube.html 95KB
zend.service.windowsazure.storage.table.html 93KB
zend.pdf.interactive-features.html 93KB
zend.tool.extending.html 91KB
zend.view.helpers.html 90KB
zend.gdata.health.html 89KB
zend.application.core-functionality.html 88KB
zend.cloud.documentservice.html 88KB
zend.openid.provider.html 88KB
doc-standard.file-formatting.html 86KB
learning.form.decorators.composite.html 84KB
zend.application.theory-of-operation.html 83KB
migration.17.html 81KB
zend.service.slideshare.html 80KB
zend.paginator.usage.html 79KB
zend.date.constants.html 78KB
learning.quickstart.create-project.html 78KB
zend.dojo.form.html 78KB
zend.form.forms.html 77KB
zend.locale.appendix.html 76KB
zend.service.simpy.html 76KB
zend.service.developergarden.html 75KB
zend.feed.pubsubhubbub.introduction.html 75KB
zend.feed.writer.html 75KB
zend.gdata.introduction.html 75KB
zend.json.server.html 75KB
zend.infocard.basics.html 73KB
zend.service.amazon.html 73KB
zend.service.delicious.html 72KB
zend.http.user-agent.html 70KB
zend.tool.framework.architecture.html 70KB
zend.locale.parsing.html 70KB
zend.http.client.advanced.html 66KB
zend.application.quick-start.html 66KB
zend.http.cookies.html 66KB
zend.db.profiler.html 66KB
zend.dojo.build-layers.html 66KB
zend.barcode.objects.html 62KB
zend.dojo.view.html 61KB
zend.translate.sourcecreation.html 61KB
learning.view.placeholders.standard.html 60KB
learning.form.decorators.layering.html 60KB
zend.form.elements.html 60KB
performance.view.html 58KB
zend.gdata.books.html 58KB
learning.form.decorators.individual.html 57KB
zend.tool.framework.writing-providers.html 57KB
zend.locale.date.datesandtimes.html 57KB
zend.log.factory.html 56KB
zendx.jquery.form.html 56KB
zend.search.lucene.best-practice.html 55KB
zend.locale.introduction.html 55KB
learning.form.decorators.simplest.html 54KB
zend.loader.autoloader.html 53KB
zend.cloud.storageservice.html 53KB
zend.service.amazon.s3.html 52KB
zend.date.overview.html 52KB
zend.oauth.introduction.html 52KB
zend.file.transfer.filters.html 50KB
zend.service.strikeiron.html 48KB
zend.service.windowsazure.storage.blob.html 48KB
zend.ldap.introduction.html 48KB
zend.db.table.definition.html 47KB
migration.19.html 47KB
zend.cache.cache.manager.html 47KB
zend.service.amazon.ec2.instance.html 47KB
zend.application.examples.html 46KB
zend.http.user-agent-device.html 46KB
zend.soap.server.html 46KB
learning.multiuser.authorization.html 46KB
zend.gdata.spreadsheets.html 45KB
共 522 条
- 1
- 2
- 3
- 4
- 5
- 6
ysh_2010
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页