Zend_Version.xml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <sect1 id="zend.version.reading">
  2. <title>Получение версии Zend Framework<!--Reading the Zend Framework Version--></title>
  3. <para>
  4. Константа класса <code>Zend_Version::VERSION</code> содержит строку,
  5. которая показывает номер текущей версии Zend Framework. Например,
  6. "0.9.0beta".
  7. <!--
  8. The class constant <code>Zend_Version::VERSION</code>
  9. contains a string that identifies the current version
  10. number of Zend Framework. For example, "0.9.0beta".
  11. -->
  12. </para>
  13. <para>
  14. Статический метод <code>Zend_Version::compareVersion($version)</code>
  15. основан на PHP-функции <ulink url="http://php.net/version_compare"><code>version_compare()</code></ulink>.
  16. Метод возвращает -1, если версия <code>$version</code>
  17. более поздняя, чем текущая версия Zend Framework; 0, если они
  18. одинаковые и +1, если версия более ранняя, чем текущая.
  19. <!--
  20. The static method <code>Zend_Version::compareVersion($version)</code>
  21. is based on the PHP function
  22. <ulink url="http://php.net/version_compare"><code>version_compare()</code></ulink>.
  23. The method returns -1 if the specified <code>$version</code>
  24. is older than the Zend Framework version, 0 if they are the same,
  25. and +1 if the specified <code>$version</code> is newer than the
  26. Zend Framework version.
  27. -->
  28. </para>
  29. <example id="zend.version.reading.example">
  30. <title>Пример использования метода compareVersion()<!--Example of compareVersion() method--></title>
  31. <programlisting role="php"><![CDATA[<?php
  32. // возвращает -1, 0 или 1
  33. $cmp = Zend_Version::compareVersion('1.0.0');
  34. ?>]]></programlisting>
  35. </example>
  36. </sect1>
  37. <!--
  38. vim:se ts=4 sw=4 et:
  39. -->