background image

27.     

function

 __unset

(

$property

){

28.         $method 

=

 

"unset{$property}"

;

29.         

if

 

(

method_exists

(

$this

,

 $method

)){

30.             

return

 $this

->

$method

();

31.         

}

32.     

}

33.    
34.     

function

 __call

(

$method

,

 $arg_array

){

35.         

if

 

(

substr

(

$method

,

0

,

3

)==

"get"

){

36.             $property 

=

 substr

(

$method

,

3

);

37.             $property 

strtolower

(

substr

(

$property

,

0

,

1

)).

substr

(

$property

,

1

);

38.             

return

 $this

->

$property

;

39.         

}

40.     

}