<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Constructs a ReflectionClass</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="class.reflectionclass.html">ReflectionClass</a></div> <div class="next" style="text-align: right; float: right;"><a href="reflectionclass.export.html">ReflectionClass::export</a></div> <div class="up"><a href="class.reflectionclass.html">ReflectionClass</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="reflectionclass.construct" class="refentry"> <div class="refnamediv"> <h1 class="refname">ReflectionClass::__construct</h1> <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">ReflectionClass::__construct</span> — <span class="dc-title">Constructs a ReflectionClass</span></p> </div> <div class="refsect1 description" id="refsect1-reflectionclass.construct-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="methodname"><strong>ReflectionClass::__construct</strong></span> ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$argument</code></span> )</div> <p class="para rdfs-comment"> Constructs a new <a href="class.reflectionclass.html" class="classname">ReflectionClass</a> object. </p> <div class="warning"><strong class="warning">Warning</strong><p class="simpara">This function is currently not documented; only its argument list is available. </p></div> </div> <div class="refsect1 parameters" id="refsect1-reflectionclass.construct-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">argument</code></em></span> <dd> <p class="para"> Either a <span class="type"><a href="language.types.string.html" class="type string">string</a></span> containing the name of the class to reflect, or an <span class="type"><a href="language.types.object.html" class="type object">object</a></span>. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-reflectionclass.construct-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> No value is returned. </p> </div> <div class="refsect1 examples" id="refsect1-reflectionclass.construct-examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example" id="example-5180"> <p><strong>Example #1 Basic usage ReflectionClass</strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br />Reflection</span><span style="color: #007700">::</span><span style="color: #0000BB">export</span><span style="color: #007700">(new </span><span style="color: #0000BB">ReflectionClass</span><span style="color: #007700">(</span><span style="color: #DD0000">'Exception'</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> <div class="example-contents"><p>The above example will output something similar to:</p></div> <div class="example-contents screen"> <div class="cdata"><pre> Class [ <internal:Core> class Exception ] { - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [7] { Property [ <default> protected $message ] Property [ <default> private $string ] Property [ <default> protected $code ] Property [ <default> protected $file ] Property [ <default> protected $line ] Property [ <default> private $trace ] Property [ <default> private $previous ] } - Methods [10] { Method [ <internal:Core> final private method __clone ] { } Method [ <internal:Core, ctor> public method __construct ] { - Parameters [3] { Parameter #0 [ <optional> $message ] Parameter #1 [ <optional> $code ] Parameter #2 [ <optional> $previous ] } } Method [ <internal:Core> final public method getMessage ] { } Method [ <internal:Core> final public method getCode ] { } Method [ <internal:Core> final public method getFile ] { } Method [ <internal:Core> final public method getLine ] { } Method [ <internal:Core> final public method getTrace ] { } Method [ <internal:Core> final public method getPrevious ] { } Method [ <internal:Core> final public method getTraceAsString ] { } Method [ <internal:Core> public method __toString ] { } } } </pre></div> </div> </div> </p> </div> <div class="refsect1 seealso" id="refsect1-reflectionclass.construct-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="methodname"><a href="reflectionobject.construct.html" class="methodname" rel="rdfs-seeAlso">ReflectionObject::__construct()</a> - Constructs a ReflectionObject</span></li> <li class="member"><a href="language.oop5.decon.html#language.oop5.decon.constructor" class="link">Constructors</a></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="class.reflectionclass.html">ReflectionClass</a></div> <div class="next" style="text-align: right; float: right;"><a href="reflectionclass.export.html">ReflectionClass::export</a></div> <div class="up"><a href="class.reflectionclass.html">ReflectionClass</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>