/php/yaf-application.environ.html

https://bitbucket.org/stillzhl/manuals · HTML · 77 lines · 60 code · 17 blank · 0 comment · 0 complexity · 20dd6b6794fefb259a6b188226582e49 MD5 · raw file

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  5. <title>Retrive environ</title>
  6. </head>
  7. <body><div class="manualnavbar" style="text-align: center;">
  8. <div class="prev" style="text-align: left; float: left;"><a href="yaf-application.destruct.html">Yaf_Application::__destruct</a></div>
  9. <div class="next" style="text-align: right; float: right;"><a href="yaf-application.execute.html">Yaf_Application::execute</a></div>
  10. <div class="up"><a href="class.yaf-application.html">Yaf_Application</a></div>
  11. <div class="home"><a href="index.html">PHP Manual</a></div>
  12. </div><hr /><div id="yaf-application.environ" class="refentry">
  13. <div class="refnamediv">
  14. <h1 class="refname">Yaf_Application::environ</h1>
  15. <p class="verinfo">(Yaf &gt;=1.0.0)</p><p class="refpurpose"><span class="refname">Yaf_Application::environ</span> &mdash; <span class="dc-title">Retrive environ</span></p>
  16. </div>
  17. <div class="refsect1 description" id="refsect1-yaf-application.environ-description">
  18. <h3 class="title">说明</h3>
  19. <div class="methodsynopsis dc-description">
  20. <span class="modifier">public</span> <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>Yaf_Application::environ</strong></span>
  21. ( <span class="methodparam">void</span>
  22. )</div>
  23. <p class="para rdfs-comment">
  24. Retrive environ which was defined in yaf.environ which has a default value
  25. &quot;product&quot;.
  26. </p>
  27. </div>
  28. <div class="refsect1 parameters" id="refsect1-yaf-application.environ-parameters">
  29. <h3 class="title">参数</h3>
  30. <p class="para">此函数没有参数</p>
  31. </div>
  32. <div class="refsect1 returnvalues" id="refsect1-yaf-application.environ-returnvalues">
  33. <h3 class="title">返回值</h3>
  34. <p class="para">
  35. </p>
  36. </div>
  37. <div class="refsect1 examples" id="refsect1-yaf-application.environ-examples">
  38. <h3 class="title">范例</h3>
  39. <div class="example" id="example-3907">
  40. <p><strong>Example #1 <span class="function"><strong>Yaf_Application::environ()</strong></span>example</strong></p>
  41. <div class="example-contents">
  42. <div class="phpcode"><code><span style="color: #000000">
  43. <span style="color: #0000BB">&lt;?php<br />$config&nbsp;</span><span style="color: #007700">=&nbsp;array(<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"application"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"directory"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">realpath</span><span style="color: #007700">(</span><span style="color: #0000BB">dirname</span><span style="color: #007700">(</span><span style="color: #0000BB">__FILE__</span><span style="color: #007700">))&nbsp;.&nbsp;</span><span style="color: #DD0000">"/application"</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;),<br />);<br /><br /></span><span style="color: #FF8000">/**&nbsp;Yaf_Application&nbsp;*/<br /></span><span style="color: #0000BB">$application&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">Yaf_Application</span><span style="color: #007700">(</span><span style="color: #0000BB">$config</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$application</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">environ</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span>
  44. </span>
  45. </code></div>
  46. </div>
  47. <div class="example-contents"><p>以上例程的输出类似于</p></div>
  48. <div class="example-contents screen">
  49. <div class="cdata"><pre>
  50. product
  51. </pre></div>
  52. </div>
  53. </div>
  54. </div>
  55. </div><hr /><div class="manualnavbar" style="text-align: center;">
  56. <div class="prev" style="text-align: left; float: left;"><a href="yaf-application.destruct.html">Yaf_Application::__destruct</a></div>
  57. <div class="next" style="text-align: right; float: right;"><a href="yaf-application.execute.html">Yaf_Application::execute</a></div>
  58. <div class="up"><a href="class.yaf-application.html">Yaf_Application</a></div>
  59. <div class="home"><a href="index.html">PHP Manual</a></div>
  60. </div></body></html>