WS, preparing for new doc style

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@227193 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mehdi Achour 2007-01-14 04:29:26 +00:00
parent c6a71455f4
commit 6e47fd8447
9 changed files with 455 additions and 455 deletions

View file

@ -1,49 +1,49 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.id3-get-frame-long-name">
<refnamediv>
<refname>id3_get_frame_long_name</refname>
<refpurpose>Get the long name of an ID3v2 frame</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>id3_get_frame_long_name</methodname>
<methodparam><type>string</type><parameter>frameId</parameter></methodparam>
</methodsynopsis>
<para>
<function>id3_get_frame_long_name</function> returns the long name for an
ID3v2 frame.
</para>
<para>
</para>
<para>
<example>
<title><function>id3_get_frame_long_name</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.2 $ -->
<refentry id="function.id3-get-frame-long-name">
<refnamediv>
<refname>id3_get_frame_long_name</refname>
<refpurpose>Get the long name of an ID3v2 frame</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>id3_get_frame_long_name</methodname>
<methodparam><type>string</type><parameter>frameId</parameter></methodparam>
</methodsynopsis>
<para>
<function>id3_get_frame_long_name</function> returns the long name for an
ID3v2 frame.
</para>
<para>
</para>
<para>
<example>
<title><function>id3_get_frame_long_name</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$longName = id3_get_frame_long_name("TOLY");
echo $longName;
?>
]]>
</programlisting>
<para>
This will output:
</para>
<screen>
</programlisting>
<para>
This will output:
</para>
<screen>
<![CDATA[
Original lyricist(s)/text writer(s)
]]>
</screen>
</example>
</para>
<para>
See also <function>id3_get_frame_short_name</function>.
</para>
</refsect1>
</refentry>
</screen>
</example>
</para>
<para>
See also <function>id3_get_frame_short_name</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,53 +1,53 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<refentry id="function.id3-get-frame-short-name">
<refnamediv>
<refname>id3_get_frame_short_name</refname>
<refpurpose>Get the short name of an ID3v2 frame</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>id3_get_frame_short_name</methodname>
<methodparam><type>string</type><parameter>frameId</parameter></methodparam>
</methodsynopsis>
<para>
<function>id3_get_frame_short_name</function> returns the short name for an
ID3v2 frame.
</para>
<para>
</para>
<para>
<example>
<title><function>id3_get_frame_short_name</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.3 $ -->
<refentry id="function.id3-get-frame-short-name">
<refnamediv>
<refname>id3_get_frame_short_name</refname>
<refpurpose>Get the short name of an ID3v2 frame</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>id3_get_frame_short_name</methodname>
<methodparam><type>string</type><parameter>frameId</parameter></methodparam>
</methodsynopsis>
<para>
<function>id3_get_frame_short_name</function> returns the short name for an
ID3v2 frame.
</para>
<para>
</para>
<para>
<example>
<title><function>id3_get_frame_short_name</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$shortName = id3_get_frame_short_name("TOLY");
echo $shortName;
?>
]]>
</programlisting>
<para>
This will output:
</para>
<screen>
</programlisting>
<para>
This will output:
</para>
<screen>
<![CDATA[
originalLyricist
]]>
</screen>
</example>
</para>
<para>
The values returned by <function>id3_get_short_name</function> are used in the
array returned by <function>id3_get_tag</function>.
</para>
<para>
See also <function>id3_get_frame_long_name</function>.
</para>
</refsect1>
</refentry>
</screen>
</example>
</para>
<para>
The values returned by <function>id3_get_short_name</function> are used in the
array returned by <function>id3_get_tag</function>.
</para>
<para>
See also <function>id3_get_frame_long_name</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,51 +1,51 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<refentry id="function.id3-get-genre-id">
<refnamediv>
<refname>id3_get_genre_id</refname>
<refpurpose>Get the id for a genre</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>id3_get_genre_id</methodname>
<methodparam><type>string</type><parameter>genre</parameter></methodparam>
</methodsynopsis>
<para>
<function>id3_get_genre_id</function> returns the id for a genre. If the
specified genre is not available in the genre list, <function>id3_get_genre_id</function>
will return &false;
</para>
<para>
In an ID3 tag, the genre is stored using a integer ranging from 0 to
147.
</para>
<para>
<example>
<title><function>id3_get_genre_id</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.5 $ -->
<refentry id="function.id3-get-genre-id">
<refnamediv>
<refname>id3_get_genre_id</refname>
<refpurpose>Get the id for a genre</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>id3_get_genre_id</methodname>
<methodparam><type>string</type><parameter>genre</parameter></methodparam>
</methodsynopsis>
<para>
<function>id3_get_genre_id</function> returns the id for a genre. If the
specified genre is not available in the genre list, <function>id3_get_genre_id</function>
will return &false;
</para>
<para>
In an ID3 tag, the genre is stored using a integer ranging from 0 to
147.
</para>
<para>
<example>
<title><function>id3_get_genre_id</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$id = id3_get_genre_id("Alternative");
echo $id;
?>
]]>
</programlisting>
<para>
This will output:
</para>
<screen>
</programlisting>
<para>
This will output:
</para>
<screen>
<![CDATA[
20
]]>
</screen>
</example>
</para>
<para>
See also <function>id3_get_genre_list</function> and <function>id3_get_genre_name</function>.
</para>
</refsect1>
</refentry>
</screen>
</example>
</para>
<para>
See also <function>id3_get_genre_list</function> and <function>id3_get_genre_name</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,41 +1,41 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<refentry id="function.id3-get-genre-list">
<refnamediv>
<refname>id3_get_genre_list</refname>
<refpurpose>Get all possible genre values</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>id3_get_genre_list</methodname>
<void />
</methodsynopsis>
<para>
<function>id3_get_genre_list</function> returns an array containing all
possible genres that may be stored in an ID3 tag. This list has been created
by Eric Kemp and later extended by WinAmp.
</para>
<para>
This function is useful to provide you users a list of genres from which
they may choose one. When updating the ID3 tag you will always have to
specify the genre as an integer ranging from 0 to 147.
</para>
<para>
<example>
<title><function>id3_get_genre_list</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.5 $ -->
<refentry id="function.id3-get-genre-list">
<refnamediv>
<refname>id3_get_genre_list</refname>
<refpurpose>Get all possible genre values</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>id3_get_genre_list</methodname>
<void />
</methodsynopsis>
<para>
<function>id3_get_genre_list</function> returns an array containing all
possible genres that may be stored in an ID3 tag. This list has been created
by Eric Kemp and later extended by WinAmp.
</para>
<para>
This function is useful to provide you users a list of genres from which
they may choose one. When updating the ID3 tag you will always have to
specify the genre as an integer ranging from 0 to 147.
</para>
<para>
<example>
<title><function>id3_get_genre_list</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$genres = id3_get_genre_list();
print_r($genres);
?>
]]>
</programlisting>
<para>
This will output:
</para>
<screen>
</programlisting>
<para>
This will output:
</para>
<screen>
<![CDATA[
Array
(
@ -189,14 +189,14 @@ Array
[147] => SynthPop
)
]]>
</screen>
</example>
</para>
<para>
See also <function>id3_get_genre_name</function> and <function>id3_get_genre_id</function>.
</para>
</refsect1>
</refentry>
</screen>
</example>
</para>
<para>
See also <function>id3_get_genre_name</function> and <function>id3_get_genre_id</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,49 +1,49 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<refentry id="function.id3-get-genre-name">
<refnamediv>
<refname>id3_get_genre_name</refname>
<refpurpose>Get the name for a genre id</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>id3_get_genre_name</methodname>
<methodparam><type>int</type><parameter>genre_id</parameter></methodparam>
</methodsynopsis>
<para>
<function>id3_get_genre_name</function> returns the name for a genre id.
</para>
<para>
In an ID3 tag, the genre is stored using a integer ranging from 0 to
147.
</para>
<para>
<example>
<title><function>id3_get_genre_name</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.4 $ -->
<refentry id="function.id3-get-genre-name">
<refnamediv>
<refname>id3_get_genre_name</refname>
<refpurpose>Get the name for a genre id</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>id3_get_genre_name</methodname>
<methodparam><type>int</type><parameter>genre_id</parameter></methodparam>
</methodsynopsis>
<para>
<function>id3_get_genre_name</function> returns the name for a genre id.
</para>
<para>
In an ID3 tag, the genre is stored using a integer ranging from 0 to
147.
</para>
<para>
<example>
<title><function>id3_get_genre_name</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$genre = id3_get_genre_name(20);
echo $genre;
?>
]]>
</programlisting>
<para>
This will output:
</para>
<screen>
</programlisting>
<para>
This will output:
</para>
<screen>
<![CDATA[
Alternative
]]>
</screen>
</example>
</para>
<para>
See also <function>id3_get_genre_list</function> and <function>id3_get_genre_id</function>.
</para>
</refsect1>
</refentry>
</screen>
</example>
</para>
<para>
See also <function>id3_get_genre_list</function> and <function>id3_get_genre_id</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,44 +1,44 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<refentry id="function.id3-get-tag">
<refnamediv>
<refname>id3_get_tag</refname>
<refpurpose>Get all information stored in an ID3 tag</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>id3_get_tag</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>version</parameter></methodparam>
</methodsynopsis>
<para>
<function>id3_get_tag</function> is used to get all information stored
in the id3 tag of the specified file.
</para>
<note>
<simpara>Instead of a filename you may also pass a valid stream resource.</simpara>
</note>
<para>
The optional <parameter>version</parameter> parameter allows you to
specify the version of the tag as MP3 files may contain both, version 1.x and
version 2.x tags.
</para>
<para>
<example>
<title><function>id3_get_tag</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.3 $ -->
<refentry id="function.id3-get-tag">
<refnamediv>
<refname>id3_get_tag</refname>
<refpurpose>Get all information stored in an ID3 tag</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>id3_get_tag</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>version</parameter></methodparam>
</methodsynopsis>
<para>
<function>id3_get_tag</function> is used to get all information stored
in the id3 tag of the specified file.
</para>
<note>
<simpara>Instead of a filename you may also pass a valid stream resource.</simpara>
</note>
<para>
The optional <parameter>version</parameter> parameter allows you to
specify the version of the tag as MP3 files may contain both, version 1.x and
version 2.x tags.
</para>
<para>
<example>
<title><function>id3_get_tag</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$tag = id3_get_tag( "path/to/example.mp3" );
print_r($tag);
?>
]]>
</programlisting>
<para>
This will output something like:
</para>
<screen>
</programlisting>
<para>
This will output something like:
</para>
<screen>
<![CDATA[
Array
(
@ -49,33 +49,33 @@ Array
[genre] => 19
)
]]>
</screen>
</example>
</para>
<para>
The key <literal>genre</literal> will contain an integer between 0 and 147. You may
use <function>id3_get_genre_name</function> to convert it to a human readable string.
</para>
<para>
Since version 0.2 <function>id3_get_tag</function> also supports ID3 tags of version 2.2, 2.3 and 2.4.
To extract information from these tags, pass one of the constants ID3_V2_2, ID3_V2_3 or ID3_V2_4 as the
second parameter.
</para>
<para>
<example>
<title><function>id3_get_tag</function> example</title>
<programlisting role="php">
</screen>
</example>
</para>
<para>
The key <literal>genre</literal> will contain an integer between 0 and 147. You may
use <function>id3_get_genre_name</function> to convert it to a human readable string.
</para>
<para>
Since version 0.2 <function>id3_get_tag</function> also supports ID3 tags of version 2.2, 2.3 and 2.4.
To extract information from these tags, pass one of the constants ID3_V2_2, ID3_V2_3 or ID3_V2_4 as the
second parameter.
</para>
<para>
<example>
<title><function>id3_get_tag</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$tag = id3_get_tag( "path/to/example2.mp3", ID3_V2_3 );
print_r($tag);
?>
]]>
</programlisting>
<para>
This will output something like:
</para>
<screen>
</programlisting>
<para>
This will output something like:
</para>
<screen>
<![CDATA[
Array
(
@ -90,18 +90,18 @@ Array
[year] => 2001
)
]]>
</screen>
</example>
</para>
<para>
ID3 v2.x tags can contain a lot more information about the MP3 file than ID3 v1.x tags.
</para>
<para>
See also <function>id3_set_tag</function>,
<function>id3_remove_tag</function> and <function>id3_get_version</function>.
</para>
</refsect1>
</refentry>
</screen>
</example>
</para>
<para>
ID3 v2.x tags can contain a lot more information about the MP3 file than ID3 v1.x tags.
</para>
<para>
See also <function>id3_set_tag</function>,
<function>id3_remove_tag</function> and <function>id3_get_version</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,29 +1,29 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.id3-get-version">
<refnamediv>
<refname>id3_get_version</refname>
<refpurpose>Get version of an ID3 tag</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>id3_get_version</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
<para>
<function>id3_get_version</function> retrieves the version(s) of the ID3 tag(s) in
the MP3 file. As a tag can contain ID3 v1.x and v2.x tags, the return value of this
function should be bitwise compared with the predefined constants <constant>ID3_V1_0</constant>,
<constant>ID3_V1_1</constant> and <constant>ID3_V2</constant>.
</para>
<note>
<simpara>Instead of a filename you may also pass a valid stream resource.</simpara>
</note>
<para>
<example>
<title><function>id3_get_version</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.2 $ -->
<refentry id="function.id3-get-version">
<refnamediv>
<refname>id3_get_version</refname>
<refpurpose>Get version of an ID3 tag</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>id3_get_version</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
<para>
<function>id3_get_version</function> retrieves the version(s) of the ID3 tag(s) in
the MP3 file. As a tag can contain ID3 v1.x and v2.x tags, the return value of this
function should be bitwise compared with the predefined constants <constant>ID3_V1_0</constant>,
<constant>ID3_V1_1</constant> and <constant>ID3_V2</constant>.
</para>
<note>
<simpara>Instead of a filename you may also pass a valid stream resource.</simpara>
</note>
<para>
<example>
<title><function>id3_get_version</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$version = id3_get_version( "path/to/example.mp3" );
@ -38,28 +38,28 @@ if ($version & ID3_V2) {
}
?>
]]>
</programlisting>
<para>
This will output something like:
</para>
<screen>
</programlisting>
<para>
This will output something like:
</para>
<screen>
<![CDATA[
Contains a 1.x tag
Contains a 1.1 tag
]]>
</screen>
</example>
</para>
<para>
If a file contains an ID3 v1.1 tag, it always contains
a 1.0 tag, as version 1.1 is just an extension of 1.0.
</para>
<para>
See also <function>id3_get_tag</function>, <function>id3_set_tag</function> and
<function>id3_remove_tag</function>.
</para>
</refsect1>
</refentry>
</screen>
</example>
</para>
<para>
If a file contains an ID3 v1.1 tag, it always contains
a 1.0 tag, as version 1.1 is just an extension of 1.0.
</para>
<para>
See also <function>id3_get_tag</function>, <function>id3_set_tag</function> and
<function>id3_remove_tag</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,34 +1,34 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<refentry id="function.id3-remove-tag">
<refnamediv>
<refname>id3_remove_tag</refname>
<refpurpose>Remove an existing ID3 tag</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>id3_remove_tag</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>version</parameter></methodparam>
</methodsynopsis>
<para>
<function>id3_remove_tag</function> is used to remove the information stored
of an ID3 tag. If no tag has been present, it will return &false; and leave the file
as it was.
</para>
<note>
<simpara>Instead of a filename you may also pass a valid stream resource.</simpara>
</note>
<para>
The optional <parameter>version</parameter> parameter allows you to
specify the version of the tag as MP3 files may contain both, version 1.x and
version 2.x tags.
</para>
<para>
<example>
<title><function>id3_remove_tag</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.3 $ -->
<refentry id="function.id3-remove-tag">
<refnamediv>
<refname>id3_remove_tag</refname>
<refpurpose>Remove an existing ID3 tag</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>id3_remove_tag</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>version</parameter></methodparam>
</methodsynopsis>
<para>
<function>id3_remove_tag</function> is used to remove the information stored
of an ID3 tag. If no tag has been present, it will return &false; and leave the file
as it was.
</para>
<note>
<simpara>Instead of a filename you may also pass a valid stream resource.</simpara>
</note>
<para>
The optional <parameter>version</parameter> parameter allows you to
specify the version of the tag as MP3 files may contain both, version 1.x and
version 2.x tags.
</para>
<para>
<example>
<title><function>id3_remove_tag</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$result = id3_remove_tag( "path/to/example.mp3", ID3_V1_0 );
@ -37,31 +37,31 @@ if ($result === true) {
}
?>
]]>
</programlisting>
<para>
If the file is writable and contained a 1.0 tag, this will output:
</para>
<screen>
</programlisting>
<para>
If the file is writable and contained a 1.0 tag, this will output:
</para>
<screen>
<![CDATA[
Tag succesfully removed
]]>
</screen>
</example>
</para>
<note>
<simpara>
Currently <function>id3_remove_tag</function> only supports
version 1.0 and 1.1. If you choose to remove a 1.0 tag and the file
contains a 1.1 tag, this tag will be removed, as v1.1 is only an
extension of 1.0.
</simpara>
</note>
<para>
See also <function>id3_get_tag</function>,
<function>id3_set_tag</function> and <function>id3_get_version</function>.
</para>
</refsect1>
</refentry>
</screen>
</example>
</para>
<note>
<simpara>
Currently <function>id3_remove_tag</function> only supports
version 1.0 and 1.1. If you choose to remove a 1.0 tag and the file
contains a 1.1 tag, this tag will be removed, as v1.1 is only an
extension of 1.0.
</simpara>
</note>
<para>
See also <function>id3_get_tag</function>,
<function>id3_set_tag</function> and <function>id3_get_version</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,34 +1,34 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<refentry id="function.id3-set-tag">
<refnamediv>
<refname>id3_set_tag</refname>
<refpurpose>Update information stored in an ID3 tag</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>id3_set_tag</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam><type>array</type><parameter>tag</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>version</parameter></methodparam>
</methodsynopsis>
<para>
<function>id3_set_tag</function> is used to change the information stored
of an ID3 tag. If no tag has been present, it will be added to the file.
</para>
<note>
<simpara>Instead of a filename you may also pass a valid stream resource.</simpara>
</note>
<para>
The optional <parameter>version</parameter> parameter allows you to
specify the version of the tag as MP3 files may contain both, version 1.x and
version 2.x tags.
</para>
<para>
<example>
<title><function>id3_set_tag</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.3 $ -->
<refentry id="function.id3-set-tag">
<refnamediv>
<refname>id3_set_tag</refname>
<refpurpose>Update information stored in an ID3 tag</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>id3_set_tag</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam><type>array</type><parameter>tag</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>version</parameter></methodparam>
</methodsynopsis>
<para>
<function>id3_set_tag</function> is used to change the information stored
of an ID3 tag. If no tag has been present, it will be added to the file.
</para>
<note>
<simpara>Instead of a filename you may also pass a valid stream resource.</simpara>
</note>
<para>
The optional <parameter>version</parameter> parameter allows you to
specify the version of the tag as MP3 files may contain both, version 1.x and
version 2.x tags.
</para>
<para>
<example>
<title><function>id3_set_tag</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$data = array(
@ -42,83 +42,83 @@ if ($result === true) {
}
?>
]]>
</programlisting>
<para>
If the file is writable, this will output:
</para>
<screen>
</programlisting>
<para>
If the file is writable, this will output:
</para>
<screen>
<![CDATA[
Tag succesfully updated
]]>
</screen>
</example>
</para>
<note>
<simpara>
Currently <function>id3_set_tag</function> only supports
version 1.0 and 1.1.
</simpara>
</note>
<para>
The following keys may be used in the associative array:
</para>
<para>
<table>
<title>Keys in the associative array</title>
<tgroup cols="3">
<thead>
<row>
<entry>key</entry>
<entry>possible value</entry>
<entry>available in version</entry>
</row>
</thead>
<tbody>
<row>
<entry>title</entry>
<entry>string with maximum of 30 characters</entry>
<entry>v1.0, v1.1</entry>
</row>
<row>
<entry>artist</entry>
<entry>string with maximum of 30 characters</entry>
<entry>v1.0, v1.1</entry>
</row>
<row>
<entry>album</entry>
<entry>string with maximum of 30 characters</entry>
<entry>v1.0, v1.1</entry>
</row>
<row>
<entry>year</entry>
<entry>4 digits</entry>
<entry>v1.0, v1.1</entry>
</row>
<row>
<entry>genre</entry>
<entry>integer value between 0 and 147</entry>
<entry>v1.0, v1.1</entry>
</row>
<row>
<entry>comment</entry>
<entry>string with maximum of 30 characters (28 in v1.1)</entry>
<entry>v1.0, v1.1</entry>
</row>
<row>
<entry>track</entry>
<entry>integer between 0 and 255</entry>
<entry>v1.1</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
<para>
See also <function>id3_get_tag</function>,
<function>id3_remove_tag</function> and <function>id3_get_version</function>.
</para>
</refsect1>
</refentry>
</screen>
</example>
</para>
<note>
<simpara>
Currently <function>id3_set_tag</function> only supports
version 1.0 and 1.1.
</simpara>
</note>
<para>
The following keys may be used in the associative array:
</para>
<para>
<table>
<title>Keys in the associative array</title>
<tgroup cols="3">
<thead>
<row>
<entry>key</entry>
<entry>possible value</entry>
<entry>available in version</entry>
</row>
</thead>
<tbody>
<row>
<entry>title</entry>
<entry>string with maximum of 30 characters</entry>
<entry>v1.0, v1.1</entry>
</row>
<row>
<entry>artist</entry>
<entry>string with maximum of 30 characters</entry>
<entry>v1.0, v1.1</entry>
</row>
<row>
<entry>album</entry>
<entry>string with maximum of 30 characters</entry>
<entry>v1.0, v1.1</entry>
</row>
<row>
<entry>year</entry>
<entry>4 digits</entry>
<entry>v1.0, v1.1</entry>
</row>
<row>
<entry>genre</entry>
<entry>integer value between 0 and 147</entry>
<entry>v1.0, v1.1</entry>
</row>
<row>
<entry>comment</entry>
<entry>string with maximum of 30 characters (28 in v1.1)</entry>
<entry>v1.0, v1.1</entry>
</row>
<row>
<entry>track</entry>
<entry>integer between 0 and 255</entry>
<entry>v1.1</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
<para>
See also <function>id3_get_tag</function>,
<function>id3_remove_tag</function> and <function>id3_get_version</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables: