svn: /phpdoc/en/trunk/reference/reflection/ reflectionparameter/hastype.xml versions.xml
| From: | Thomas Punt | Date: | Thu, 20 Aug 2015 12:47:35 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/reflection/ reflectionparameter/hastype.xml versions.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-13630@lists.php.net to get a copy of this message | ||
tpunt Thu, 20 Aug 2015 12:47:35 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=337562
Log:
Document ReflectionParameter::hasType() method
Changed paths:
A phpdoc/en/trunk/reference/reflection/reflectionparameter/hastype.xml
U phpdoc/en/trunk/reference/reflection/versions.xml
Added: phpdoc/en/trunk/reference/reflection/reflectionparameter/hastype.xml
===================================================================
--- phpdoc/en/trunk/reference/reflection/reflectionparameter/hastype.xml
(rev 0)
+++ phpdoc/en/trunk/reference/reflection/reflectionparameter/hastype.xml 2015-08-20 12:47:35 UTC
(rev 337562)
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision$ -->
+
+<refentry xml:id="reflectionparameter.hastype" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
+ <refnamediv>
+ <refname>ReflectionParameter::hasType</refname>
+ <refpurpose>Checks if parameter has a type</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <modifier>public</modifier>
<type>bool</type><methodname>ReflectionParameter::hasType</methodname>
+ <void />
+ </methodsynopsis>
+ <para>
+ Checks if the parameter has a type associated with it.
+ </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ &no.function.parameters;
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ &true; if a type is specified, &false; otherwise.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><methodname>ReflectionParameter::hasType</methodname>
example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+function someFunction(string $param, $param2 = null) {}
+
+$reflectionFunc = new ReflectionFunction('someFunction');
+$reflectionParams = $reflectionFunc->getParameters();
+
+var_dump($reflectionParams[0]->hasType());
+var_dump($reflectionParams[1]->hasType());
+]]>
+ </programlisting>
+ &example.outputs.similar;
+ <screen>
+<![CDATA[
+bool(true)
+bool(false)
+]]>
+ </screen>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><methodname>ReflectionParameter::getType</methodname></member>
+ </simplelist>
+ </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
+-->
Modified: phpdoc/en/trunk/reference/reflection/versions.xml
===================================================================
--- phpdoc/en/trunk/reference/reflection/versions.xml 2015-08-20 11:34:03 UTC (rev 337561)
+++ phpdoc/en/trunk/reference/reflection/versions.xml 2015-08-20 12:47:35 UTC (rev 337562)
@@ -103,6 +103,7 @@
<function name='reflectionparameter::getdefaultvalue' from='PHP 5 >=
5.0.3'/>
<function name='reflectionparameter::canbepassedbyvalue' from='PHP >=
5.4.0'/>
<function name='reflectionparameter::isvariadic' from='PHP 5 >=
5.6.0'/>
+ <function name='reflectionparameter::hastype' from='PHP 7'/>
<function name='reflectionmethod' from='PHP 5'/>
<function name='reflectionmethod::__clone' from='PHP 5'/>