<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="intlchar.getpropertyenum" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>IntlChar::getPropertyEnum</refname>
  <refpurpose>Get the property constant value for a given property name</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis role="IntlChar">
   <modifier>public</modifier> <modifier>static</modifier> <type>int</type><methodname>IntlChar::getPropertyEnum</methodname>
   <methodparam><type>string</type><parameter>alias</parameter></methodparam>
  </methodsynopsis>
  <para>
   Returns the property constant value for a given property name, as specified in the Unicode database file PropertyAliases.txt.
   Short, long, and any other variants are recognized.
  </para>
  <para>
   In addition, this function maps the synthetic names "gcm" / "General_Category_Mask" to the property
   <constant>IntlChar::PROPERTY_GENERAL_CATEGORY_MASK</constant>. These names are not in PropertyAliases.txt.
  </para>
  <para>
   This function complements <function>IntlChar::getPropertyName</function>.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <variablelist>
   <varlistentry>
    <term><parameter>alias</parameter></term>
    <listitem>
     <para>
      The property name to be matched. The name is compared using "loose matching" as described in PropertyAliases.txt.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns an <literal>IntlChar::PROPERTY_</literal> constant value,
   or <constant>IntlChar::PROPERTY_INVALID_CODE</constant> if the given name does not match any property.
  </para>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <example>
   <title>&intl.property.example;</title>
   <programlisting role="php">
    <![CDATA[
<?php
var_dump(IntlChar::getPropertyEnum('Bidi_Class') === IntlChar::PROPERTY_BIDI_CLASS);
var_dump(IntlChar::getPropertyEnum('script') === IntlChar::PROPERTY_SCRIPT);
var_dump(IntlChar::getPropertyEnum('IDEOGRAPHIC') === IntlChar::PROPERTY_IDEOGRAPHIC);
var_dump(IntlChar::getPropertyEnum('Some made-up string') === IntlChar::PROPERTY_INVALID_CODE);
?>
]]>
   </programlisting>
   &example.outputs;
   <screen>
    <![CDATA[
bool(true)
bool(true)
bool(true)
bool(true)
]]>
   </screen>
  </example>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>IntlChar::getPropertyName</function></member>
   </simplelist>
  </para>
 </refsect1>

</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
