2011-08-16 11:38:58 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2009-07-11 08:59:47 +00:00
|
|
|
<!-- $Revision$ -->
|
2007-12-24 12:30:24 +00:00
|
|
|
<refentry xml:id="arrayobject.construct" xmlns="http://docbook.org/ns/docbook">
|
2007-01-28 20:13:03 +00:00
|
|
|
<refnamediv>
|
|
|
|
<refname>ArrayObject::__construct</refname>
|
|
|
|
<refpurpose>Construct a new array object</refpurpose>
|
|
|
|
</refnamediv>
|
2008-03-20 01:25:04 +00:00
|
|
|
|
2007-12-24 12:30:24 +00:00
|
|
|
<refsect1 role="description">
|
2008-03-20 01:25:04 +00:00
|
|
|
&reftitle.description;
|
2007-12-24 12:30:24 +00:00
|
|
|
<constructorsynopsis>
|
2012-01-17 08:20:53 +00:00
|
|
|
<modifier>public</modifier> <methodname>ArrayObject::__construct</methodname>
|
2009-07-01 13:29:56 +00:00
|
|
|
<methodparam choice="opt"><type>mixed</type><parameter>input</parameter></methodparam>
|
2012-06-12 00:36:15 +00:00
|
|
|
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
|
|
|
|
<methodparam choice="opt"><type>string</type><parameter>iterator_class</parameter><initializer>"ArrayIterator"</initializer></methodparam>
|
2007-12-24 12:30:24 +00:00
|
|
|
</constructorsynopsis>
|
2007-01-28 20:13:03 +00:00
|
|
|
<para>
|
2008-03-20 01:25:04 +00:00
|
|
|
This constructs a new array <type>object</type>.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="parameters">
|
|
|
|
&reftitle.parameters;
|
|
|
|
<para>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>input</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The <parameter>input</parameter> parameter accepts an
|
2009-07-01 13:29:56 +00:00
|
|
|
<type>array</type> or an <type>Object</type>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>flags</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Flags to control the behaviour of the <classname>ArrayObject</classname> object.
|
2012-06-12 00:36:15 +00:00
|
|
|
See <methodname>ArrayObject::setFlags</methodname>.
|
2009-07-01 13:29:56 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>iterator_class</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Specify the class that will be used for iteration of the <classname>ArrayObject</classname> object.
|
2008-03-20 01:25:04 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
2007-01-28 20:13:03 +00:00
|
|
|
</para>
|
2008-03-20 01:25:04 +00:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="returnvalues">
|
|
|
|
&reftitle.returnvalues;
|
|
|
|
<para>
|
|
|
|
&return.void;
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="examples">
|
|
|
|
&reftitle.examples;
|
2007-01-28 20:13:03 +00:00
|
|
|
<para>
|
|
|
|
<example>
|
|
|
|
<title><function>ArrayObject::__construct</function> example</title>
|
|
|
|
<programlisting role="php">
|
2004-04-13 14:20:11 +00:00
|
|
|
<![CDATA[
|
|
|
|
<?php
|
|
|
|
$array = array('1' => 'one',
|
|
|
|
'2' => 'two',
|
|
|
|
'3' => 'three');
|
2004-02-24 10:51:40 +00:00
|
|
|
|
2004-04-13 14:20:11 +00:00
|
|
|
$arrayobject = new ArrayObject($array);
|
2004-02-24 10:51:40 +00:00
|
|
|
|
2004-04-13 14:20:11 +00:00
|
|
|
var_dump($arrayobject);
|
|
|
|
?>
|
|
|
|
]]>
|
2007-01-28 20:13:03 +00:00
|
|
|
</programlisting>
|
|
|
|
&example.outputs;
|
|
|
|
<screen>
|
2004-04-13 14:20:11 +00:00
|
|
|
<![CDATA[
|
|
|
|
object(ArrayObject)#1 (3) {
|
|
|
|
[1]=>
|
|
|
|
string(3) "one"
|
|
|
|
[2]=>
|
|
|
|
string(3) "two"
|
|
|
|
[3]=>
|
|
|
|
string(5) "three"
|
|
|
|
}
|
|
|
|
]]>
|
2007-01-28 20:13:03 +00:00
|
|
|
</screen>
|
|
|
|
</example>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2009-07-01 13:29:56 +00:00
|
|
|
|
|
|
|
<refsect1 role="seealso">
|
|
|
|
&reftitle.seealso;
|
|
|
|
<para>
|
|
|
|
<simplelist>
|
|
|
|
<member><methodname>ArrayObject::setflags</methodname></member>
|
|
|
|
</simplelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
2007-01-28 20:13:03 +00:00
|
|
|
</refentry>
|
2004-02-24 10:51:40 +00:00
|
|
|
|
|
|
|
<!-- 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
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2004-02-24 10:51:40 +00:00
|
|
|
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
|
|
|
|
-->
|