PHP OOP ile sorun [kapalı]

0 Cevap php

Ben aşağıdaki kodu var:

class the_class {
  private the_field;

  function the_class() {
    the_field = new other_class(); //has other_method()
  }

  function method() {
    $this->the_field->other_method(); //This doesn't seem to work
  }
}

Is there anything wrong with the syntax here? The method call always seems to return true, as if there is something wrong with the method call. Or is the method call all right and I should debug the other_method() itself?

TIA, Peter

0 Cevap