<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="ffi.arraytype" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>FFI::arrayType</refname>
  <refpurpose>Dynamically constructs a new C array type</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis role="FFI">
   <modifier>public</modifier> <modifier>static</modifier> <type>FFI\CType</type><methodname>FFI::arrayType</methodname>
   <methodparam><type>FFI\CType</type><parameter>type</parameter></methodparam>
   <methodparam><type>array</type><parameter>dimensions</parameter></methodparam>
  </methodsynopsis>
  <para>
   Dynamically constructs a new C array type with elements of type defined by <parameter>type</parameter>,
   and dimensions specified by <parameter>dimensions</parameter>. In the following example <code>$t1</code>
   and <code>$t2</code> are equivalent array types:
   <informalexample>
    <programlisting role="php">
<![CDATA[
<?php
$t1 = FFI::type("int[2][3]");
$t2 = FFI::arrayType(FFI::type("int"), [2, 3]);
?>
]]>
    </programlisting>
   </informalexample>
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <variablelist>
   <varlistentry>
    <term><parameter>type</parameter></term>
    <listitem>
     <para>
      A valid C declaration as <type>string</type>, or an instance of <classname>FFI\CType</classname>
      which has already been created.
     </para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><parameter>dimensions</parameter></term>
    <listitem>
     <para>
      The dimensions of the type as <type>array</type>.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns the freshly created <classname>FFI\CType</classname> object.
  </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
-->
