Sophie

Sophie

distrib > Mandriva > 2008.1 > i586 > by-pkgid > 703d980c580707c382b4e43e25965bc5 > files > 758

php-manual-pt_BR-5.2.4-1mdv2008.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>DOMImplementation-&#62;hasFeature()</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="Manual do PHP"
HREF="index.html"><LINK
REL="UP"
TITLE="DOM Functions"
HREF="ref.dom.html"><LINK
REL="PREVIOUS"
TITLE="DOMImplementation->createDocumentType()"
HREF="function.dom-domimplementation-createdocumenttype.html"><LINK
REL="NEXT"
TITLE="DOMNamedNodeMap->getNamedItem()"
HREF="function.dom-domnamednodemap-getnameditem.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=UTF-8"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Manual do PHP</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.dom-domimplementation-createdocumenttype.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.dom-domnamednodemap-getnameditem.html"
ACCESSKEY="N"
>Próxima</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.dom-domimplementation-hasfeature"
></A
>DOMImplementation-&#62;hasFeature()</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN38364"
></A
><P
>    (no version information, might be only in CVS)</P
>DOMImplementation-&#62;hasFeature()&nbsp;--&nbsp;
   Test if the DOM implementation implements a specific feature
  </DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN38367"
></A
><H2
>Descrição</H2
>class <B
CLASS="classname"
>DOMImplementation</B
> { <BR
></BR
>bool <B
CLASS="methodname"
>hasFeature</B
> ( string feature, string version )<BR
></BR
>}<P
>&#13;   Test if the DOM implementation implements a specific 
   <CODE
CLASS="parameter"
>feature</CODE
>.
  </P
><P
>&#13;   You can find a list of all features in the <A
HREF="http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/introduction.html#ID-Conformance"
TARGET="_top"
>Conformance</A
> section of the DOM
   specification.
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN38385"
></A
><H2
>Parâmetros</H2
><P
>&#13;   <P
></P
><DIV
CLASS="variablelist"
><DL
><DT
><CODE
CLASS="parameter"
>feature</CODE
></DT
><DD
><P
>&#13;       The feature to test.
      </P
></DD
><DT
><CODE
CLASS="parameter"
>version</CODE
></DT
><DD
><P
>&#13;       The version number of the <CODE
CLASS="parameter"
>feature</CODE
> to test. In 
       level 2, this can be either <TT
CLASS="literal"
>2.0</TT
> or
       <TT
CLASS="literal"
>1.0</TT
>.
      </P
></DD
></DL
></DIV
>
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN38402"
></A
><H2
>Valores de retornado</H2
><P
>&#13;   Retorna <TT
CLASS="constant"
><B
>TRUE</B
></TT
> em caso de sucesso ou <TT
CLASS="constant"
><B
>FALSE</B
></TT
> em falhas.
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN38407"
></A
><H2
>Exemplos</H2
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN38409"
></A
><P
><B
>Exemplo 1. Testing your DOM Implementation</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><code><font color="#000000">
<font color="#0000BB">&lt;?php<br /><br />$features </font><font color="#007700">= array(<br />&nbsp;&nbsp;</font><font color="#DD0000">'Core'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&gt; </font><font color="#DD0000">'Core module'</font><font color="#007700">,<br />&nbsp;&nbsp;</font><font color="#DD0000">'XML'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&gt; </font><font color="#DD0000">'XML module'</font><font color="#007700">,<br />&nbsp;&nbsp;</font><font color="#DD0000">'HTML'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&gt; </font><font color="#DD0000">'HTML module'</font><font color="#007700">,<br />&nbsp;&nbsp;</font><font color="#DD0000">'Views'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&gt; </font><font color="#DD0000">'Views module'</font><font color="#007700">,<br />&nbsp;&nbsp;</font><font color="#DD0000">'Stylesheets'&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&gt; </font><font color="#DD0000">'Style Sheets module'</font><font color="#007700">,<br />&nbsp;&nbsp;</font><font color="#DD0000">'CSS'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&gt; </font><font color="#DD0000">'CSS module'</font><font color="#007700">,<br />&nbsp;&nbsp;</font><font color="#DD0000">'CSS2'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&gt; </font><font color="#DD0000">'CSS2 module'</font><font color="#007700">,<br />&nbsp;&nbsp;</font><font color="#DD0000">'Events'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&gt; </font><font color="#DD0000">'Events module'</font><font color="#007700">,<br />&nbsp;&nbsp;</font><font color="#DD0000">'UIEvents'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&gt; </font><font color="#DD0000">'User interface Events module'</font><font color="#007700">,<br />&nbsp;&nbsp;</font><font color="#DD0000">'MouseEvents'&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&gt; </font><font color="#DD0000">'Mouse Events module'</font><font color="#007700">,<br />&nbsp;&nbsp;</font><font color="#DD0000">'MutationEvents' </font><font color="#007700">=&gt; </font><font color="#DD0000">'Mutation Events module'</font><font color="#007700">,<br />&nbsp;&nbsp;</font><font color="#DD0000">'HTMLEvents'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&gt; </font><font color="#DD0000">'HTML Events module'</font><font color="#007700">,<br />&nbsp;&nbsp;</font><font color="#DD0000">'Range'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&gt; </font><font color="#DD0000">'Range module'</font><font color="#007700">,<br />&nbsp;&nbsp;</font><font color="#DD0000">'Traversal'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&gt; </font><font color="#DD0000">'Traversal module'<br /></font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />foreach (</font><font color="#0000BB">$features </font><font color="#007700">as </font><font color="#0000BB">$key </font><font color="#007700">=&gt; </font><font color="#0000BB">$name</font><font color="#007700">) {<br />&nbsp;&nbsp;if (</font><font color="#0000BB">DOMImplementation</font><font color="#007700">::</font><font color="#0000BB">hasFeature</font><font color="#007700">(</font><font color="#0000BB">$key</font><font color="#007700">, </font><font color="#DD0000">'2.0'</font><font color="#007700">)) {<br />&nbsp;&nbsp;&nbsp;&nbsp;echo </font><font color="#DD0000">"Has feature $name</font><font color="#007700">\n</font><font color="#DD0000">"</font><font color="#007700">;<br />&nbsp;&nbsp;} else {<br />&nbsp;&nbsp;&nbsp;&nbsp;echo </font><font color="#DD0000">"Missing feature $name</font><font color="#007700">\n</font><font color="#DD0000">"</font><font color="#007700">;<br />&nbsp;&nbsp;}<br />}<br /><br /></font><font color="#0000BB">?&gt;</font>
</font>
</code></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN38412"
></A
><H2
>Veja também</H2
><P
>&#13;   <P
></P
><TABLE
BORDER="0"
><TBODY
><TR
><TD
><A
HREF="function.dom-domnode-issupported.html"
>DOMNode-&#62;isSupported()</A
></TD
></TR
></TBODY
></TABLE
><P
></P
>
  </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.dom-domimplementation-createdocumenttype.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Principal</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.dom-domnamednodemap-getnameditem.html"
ACCESSKEY="N"
>Próxima</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>DOMImplementation-&#62;createDocumentType()</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.dom.html"
ACCESSKEY="U"
>Acima</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>DOMNamedNodeMap-&#62;getNamedItem()</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>