Ben kendi sınıfı içinde bir yöntemi nasıl kullanılacağını anlamaya çalışıyorum. Örnek:
class demoClass
{
function demoFunction1()
{
//function code here
}
function demoFunction2()
{
//call previously declared method
demoFunction1();
}
}
Ben çalışıyor bulduk tek yolu ben yöntemi içinde sınıfının yeni intsnace oluşturun ve sonra onu aramak durumdur. Örnek:
class demoClass
{
function demoFunction1()
{
//function code here
}
function demoFunction2()
{
$thisClassInstance = new demoClass();
//call previously declared method
$thisClassInstance->demoFunction1();
}
}
but that does not feel right... or is that the way? any help?
teşekkürler