1
0
mirror of https://github.com/php/doc-tr.git synced 2026-03-24 07:12:18 +01:00
Files
archived-doc-tr/reference/com/com.xml
2024-06-14 17:02:42 +01:00

157 lines
3.8 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 14767af0f05dffa6fdb9b49e1a1f4e9ca7022a60 Maintainer: nilgun Status: ready -->
<reference xml:id="class.com" role="class" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<titleabbrev>com</titleabbrev>
<title>com sınıfı</title>
<partintro>
<!-- {{{ com intro -->
<section xml:id="com.intro">
&reftitle.intro;
<para>
OLE uyumlu COM nesnelerinin örneklenerek yöntem ve özelliklerine
erişilebilmesini sağlar.
</para>
</section>
<!-- }}} -->
<section xml:id="com.synopsis">
&reftitle.classsynopsis;
<!-- {{{ Synopsis -->
<classsynopsis class="class">
<ooclass>
<classname>com</classname>
</ooclass>
<ooclass>
<modifier>extends</modifier>
<classname>variant</classname>
</ooclass>
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.com')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role='com'])">
<xi:fallback />
</xi:include>
</classsynopsis>
<!-- }}} -->
</section>
<section xml:id="class.com.overloadedmethods">
<title>ırı Yüklenmiş Yöntemler</title>
<para>
Döndürülen nesne aşırı yüklenmiş bir nesnedir, yani PHP normal sınıflarda
olduğu gibi herhangi bir sabit yöntem görmez; bunun yerine, herhangi bir
özellik veya yöntem erişimi COM'a iletilir.
</para>
<para>
PHP, gönderimli bağımsız değişken kabul eden yöntemleri otomatik olarak algılar
ve değişkenlerini gönderimli iletilebilecek duruma kendisi getirir. Yani,
yöntem normal şekilde çağırılabilir; kodun buna uygun hale getirilmesi
için ek bir çabaya gerek yoktur.
</para>
</section>
<section xml:id="class.com.examples">
<title>com örnekleri</title>
<para>
<example xml:id="example.com1">
<title>- 1. com örneği</title>
<programlisting role="php">
<![CDATA[
<?php
// word uygulamasını başlat
$word = new com("word.application") or die("Word başlatılamadı");
echo "Word yüklendi, sürümü: {$word->Version}\n";
// Öne getir
$word->Visible = 1;
// boş bir belge aç
$word->Documents->Add();
// bir şeyler yaz
$word->Selection->TypeText("Bu bir denemedir...");
$word->Documents[1]->SaveAs("Gereksiz test.doc");
// uygulamayı kapat
$word->Quit();
// nesneyi serbest bırak
$word = null;
?>
]]>
</programlisting>
</example>
</para>
<para>
<example xml:id="example.com2">
<title>- 2. com örneği</title>
<programlisting role="php">
<![CDATA[
<?php
$conn = new com("ADODB.Connection") or die("ADO başlatılamadı");
$conn->Open("Provider=SQLOLEDB; Data Source=localhost;
Initial Catalog=database; User ID=user; Password=password");
$rs = $conn->Execute("SELECT * FROM birtablo"); // Recordset
$num_columns = $rs->Fields->Count();
echo $num_columns . "\n";
for ($i=0; $i < $num_columns; $i++) {
$fld[$i] = $rs->Fields($i);
}
$rowcount = 0;
while (!$rs->EOF) {
for ($i=0; $i < $num_columns; $i++) {
echo $fld[$i]->value . "\t";
}
echo "\n";
$rowcount++; // rowcount sayacı
$rs->MoveNext();
}
$rs->Close();
$conn->Close();
$rs = null;
$conn = null;
?>
]]>
</programlisting>
</example>
</para>
</section>
</partintro>
&reference.com.entities.com;
</reference>
<!-- 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
-->