mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-04-26 18:18:14 +02:00
90 lines
2.2 KiB
XML
90 lines
2.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 3eaa74fd7d5a3a6829fb12de89235970c8155dcf Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: yes -->
|
|
|
|
<refentry xml:id='domattr.isid' xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>DOMAttr::isId</refname>
|
|
<refpurpose>
|
|
Vérifie si l'attribut est un identifiant défini
|
|
</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>bool</type><methodname>DOMAttr::isId</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
Cette fonction vérifie si l'attribut est un identifiant défini.
|
|
</para>
|
|
<para>
|
|
En accord avec le standard DOM, ceci requiert une DTD qui définit
|
|
l'attribut ID qui est du type ID. Vous devez valider votre document avec la fonction
|
|
<xref linkend="domdocument.validate" />
|
|
ou la fonction <literal>DOMDocument::validateOnParse</literal> avant d'utiliser
|
|
cette fonction.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
&no.function.parameters;
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec DOMAttr::isId()</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
$doc = new DomDocument;
|
|
|
|
// Nous devons valider notre document avant de nous référer à l'ID
|
|
$doc->validateOnParse = true;
|
|
$doc->Load('book.xml');
|
|
|
|
// Nous récupérons l'attribut nommé id de l'élément chapter
|
|
$attr = $doc->getElementsByTagName('chapter')->item(0)->getAttributeNode('id');
|
|
|
|
var_dump($attr->isId()); // bool(true)
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</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
|
|
-->
|