PHP Classes

File: examples/ornek.php

Recommend this page to a friend!
  Classes of berkay karata?   PHP-DS   examples/ornek.php   Download  
File: examples/ornek.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP-DS
Translate text in PHP code to different languages
Author: By
Last change:
Date: 6 years ago
Size: 1,479 bytes
 

Contents

Class file image Download
<?php
#PHP_DS SINIFINI ÇA?IRALIM
$PHP_DS_LANGUAGE="TR";
include(
"../PHP-DS/PHP_DS.php");
#PHP_DS NESNES?N? OLU?TURALIM
$x = new PHP_DS_SUPPORTED("example-lang/TR.PHP");



//----------------------------------------------------------------------------------------------------
// Ayarlar?m?z? yapal?m
//----------------------------------------------------------------------------------------------------
#S?n?f ?smi De?i?tirme
$x->s?n?f ="s?n?f_ismi";
#Anahtar Tipi
$x->kullan?m="nesne";
#Fonksiyon varsay?lan? belirteçi
$x->fonksiyon_v="Bir_Fonksiyon";
#De?i?ken varsay?lan? belirteçi
$x->de?i?ken_v="Bir_De?i?ken";
//----------------------------------------------------------------------------------------------------
// Kodumuzu olu?turmaya ba?layal?m :)
//----------------------------------------------------------------------------------------------------
$x->kod='
class s?n?f_ismi
{
public $Bir_De?i?ken1="bu de?i?ken bo?";
public function Bir_Fonksiyon1()
{
  echo $this->Bir_De?i?ken1;
}
public function Bir_Fonksiyon2()
{
  echo "Merhaba<br>";
}
}
'
;

//----------------------------------------------------------------------------------------------------
// Ve kodumuzu kullanal?m
//----------------------------------------------------------------------------------------------------
$x->ekle();
$y = new örnek;
$y->Tan?t?m="Ben PHP-DS. PHP s?n?flar? için bir dil deste?i paketiyim.";
$y->Merhaba_de();
$y->Tan?t();