mirror of
https://github.com/php/doc-tr.git
synced 2026-03-29 10:42:14 +02:00
git-svn-id: https://svn.php.net/repository/phpdoc/tr/trunk@288842 c90b9560-bf6c-de11-be94-00142212c4b1
152 lines
3.5 KiB
XML
152 lines
3.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- $Revision$ -->
|
||
<!-- EN-Revision: af4410a7e15898c3dbe83d6ea38246745ed9c6fb Maintainer: nilgun Status: ready -->
|
||
<refentry xml:id="reflectionfunction.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||
<refnamediv>
|
||
<refname>ReflectionFunction::__construct</refname>
|
||
<refpurpose>Bir <classname>ReflectionFunction</classname> nesnesi oluşturur
|
||
</refpurpose>
|
||
</refnamediv>
|
||
|
||
<refsect1 role="description">
|
||
&reftitle.description;
|
||
<methodsynopsis>
|
||
<methodname>ReflectionFunction::__construct</methodname>
|
||
<methodparam><type>string</type><parameter>isim</parameter></methodparam>
|
||
</methodsynopsis>
|
||
<para>
|
||
Bir <classname>ReflectionFunction</classname> nesnesi oluşturur.
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="parameters">
|
||
&reftitle.parameters;
|
||
<para>
|
||
<variablelist>
|
||
<varlistentry>
|
||
<term><parameter>name</parameter></term>
|
||
<listitem>
|
||
<para>
|
||
Yansıtılılacak işlevin ismi.
|
||
</para>
|
||
</listitem>
|
||
</varlistentry>
|
||
</variablelist>
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="returnvalues">
|
||
&reftitle.returnvalues;
|
||
<para>
|
||
&return.void;
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="errors">
|
||
&reftitle.errors;
|
||
<para>
|
||
<parameter>isim</parameter> değiştirgesi geçerli bir işlev ismi içermiyorsa
|
||
bir <classname>ReflectionException</classname> nesnesi döner.
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="examples">
|
||
&reftitle.examples;
|
||
<para>
|
||
<example>
|
||
<title>- <methodname>ReflectionFunction::__construct</methodname> örneği
|
||
</title>
|
||
<programlisting role="php">
|
||
<![CDATA[
|
||
<?php
|
||
/**
|
||
* Basit bir sayaç
|
||
*
|
||
* @return int
|
||
*/
|
||
function sayaç()
|
||
{
|
||
static $c = 0;
|
||
return ++$c;
|
||
}
|
||
|
||
// Bir ReflectionFunction örneği oluşturalım
|
||
$func = new ReflectionFunction('sayaç');
|
||
|
||
// Temel bilgileri basalım
|
||
printf(
|
||
"===> %s '%s' işlevi\n".
|
||
" %s dosyasının\n".
|
||
" %d. satırından %d. satırına kadar tanımlanmış\n",
|
||
$func->isInternal() ? 'Yerleşik' : 'Kullanıcı tanımlı',
|
||
$func->getName(),
|
||
$func->getFileName(),
|
||
$func->getStartLine(),
|
||
$func->getEndline()
|
||
);
|
||
|
||
// Belgelendirici açıklamaları basalım
|
||
printf("---> Belgeleme:\n %s\n", var_export($func->getDocComment(), 1));
|
||
|
||
// Varsa duruk değişkenleri basalım
|
||
if ($statics = $func->getStaticVariables())
|
||
{
|
||
printf("---> Duruk değişkenler: %s\n", var_export($statics, 1));
|
||
}
|
||
?>
|
||
]]>
|
||
</programlisting>
|
||
&example.outputs.similar;
|
||
<screen>
|
||
<![CDATA[
|
||
===> Kullanıcı tanımlı 'sayaç' işlevi
|
||
/home/Nilgun/dnm.php dosyasının
|
||
7. satırından 11. satırına kadar tanımlanmış
|
||
---> Belgeleme:
|
||
'/**
|
||
* Basit bir sayaç
|
||
*
|
||
* @return int
|
||
*/'
|
||
---> Duruk değişkenler: array (
|
||
'c' => 0,
|
||
)
|
||
]]>
|
||
</screen>
|
||
</example>
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="seealso">
|
||
&reftitle.seealso;
|
||
<para>
|
||
<simplelist>
|
||
<member><methodname>ReflectionMethod::__construct</methodname></member>
|
||
<member><xref linkend="language.oop5.decon" /></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
|
||
-->
|