| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!-- Reviewed: no -->
- <!-- EN-Revision: 24249 -->
- <sect1 id="zend.version.reading">
- <title>Zend Framework のバージョンの取得</title>
- <para>
- <classname>Zend_Version</classname> が提供するクラス定数
- <constant>Zend_Version::VERSION</constant> には、
- インストールされている Zend Framework のバージョン番号を表す文字列が含まれます。
- <constant>Zend_Version::VERSION</constant> は、たとえば "1.7.4" のようになります。
- </para>
- <para>
- 静的メソッド <methodname>Zend_Version::compareVersion($version)</methodname>
- は、<acronym>PHP</acronym> の関数 <ulink
- url="http://php.net/version_compare"><methodname>version_compare()</methodname></ulink>
- に基づいたものです。このメソッドは、指定したバージョンが
- Zend Framework のバージョンより古い場合に -1、
- 同じ場合に 0、そして指定したバージョンのほうが
- Zend Framework のバージョンより新しい場合に +1 を返します。
- </para>
- <example id="zend.version.reading.example">
- <title>compareVersion() メソッドの例</title>
- <programlisting language="php"><![CDATA[
- // -1、0 あるいは 1 を返します
- $cmp = Zend_Version::compareVersion('2.0.0');
- ]]></programlisting>
- </example>
- <!-- TODO : to be translated -->
- <para>
- The static method <methodname>Zend_Version::getLatest()</methodname> provides the version
- number of the last stable release available for download on the site
- <ulink url="http://framework.zend.com/download/latest">Zend Framework</ulink>.
- </para>
- <example id="zend.version.latest.example">
- <title>getLatest() メソッドの例</title>
- <programlisting language="php"><![CDATA[
- // 1.11.0 またはそれ以降のバージョンを返します
- echo Zend_Version::getLatest();
- ]]></programlisting>
- </example>
- </sect1>
- <!--
- vim:se ts=4 sw=4 et:
- -->
|