svn: /phpdoc/en/trunk/reference/reflection/ reflectionparameter/gettype.xml versions.xml

From: Date: Thu, 20 Aug 2015 13:26:51 +0000
Subject: svn: /phpdoc/en/trunk/reference/reflection/ reflectionparameter/gettype.xml versions.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-13631@lists.php.net to get a copy of this message
tpunt Thu, 20 Aug 2015 13:26:51 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=337564 Log: Document ReflectionParameter::getType() method Changed paths: A phpdoc/en/trunk/reference/reflection/reflectionparameter/gettype.xml U phpdoc/en/trunk/reference/reflection/versions.xml Added: phpdoc/en/trunk/reference/reflection/reflectionparameter/gettype.xml =================================================================== --- phpdoc/en/trunk/reference/reflection/reflectionparameter/gettype.xml (rev 0) +++ phpdoc/en/trunk/reference/reflection/reflectionparameter/gettype.xml 2015-08-20 13:26:51 UTC (rev 337564) @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision$ --> + +<refentry xml:id="reflectionparameter.gettype" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + <refnamediv> + <refname>ReflectionParameter::getType</refname> + <refpurpose>Gets a parameter's type</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <modifier>public</modifier> <type>ReflectionType</type><methodname>ReflectionParameter::getType</methodname> + <void /> + </methodsynopsis> + <para> + Gets the associated type of a parameter. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + &no.function.parameters; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns a <classname>ReflectionType</classname> object if a parameter type is + specified, &null; otherwise. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><methodname>ReflectionParameter::getType</methodname> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +function someFunction(int $param, $param2) {} + +$reflectionFunc = new ReflectionFunction('someFunction'); +$reflectionParams = $reflectionFunc->getParameters(); +$reflectionType1 = $reflectionParams[0]->getType(); +$reflectionType2 = $reflectionParams[1]->getType(); + +echo $reflectionType1; +var_dump($reflectionType2); +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ +int +null +]]> + </screen> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><methodname>ReflectionParameter::hasType</methodname></member> + <member><methodname>ReflectionType::__toString</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 13:22:07 UTC (rev 337563) +++ phpdoc/en/trunk/reference/reflection/versions.xml 2015-08-20 13:26:51 UTC (rev 337564) @@ -104,6 +104,7 @@ <function name='reflectionparameter::canbepassedbyvalue' from='PHP &gt;= 5.4.0'/> <function name='reflectionparameter::isvariadic' from='PHP 5 &gt;= 5.6.0'/> <function name='reflectionparameter::hastype' from='PHP 7'/> + <function name='reflectionparameter::gettype' from='PHP 7'/> <function name='reflectionmethod' from='PHP 5'/> <function name='reflectionmethod::__clone' from='PHP 5'/>

« previous php.doc.cvs (#13631) next »