You dont have a function named assign(), but a method with this name. PHP is not Java and in PHP you have to make clear, if you want to call a function
assign()
or a method
$object->assign()
In your case the call to the function resides inside another method. $this always refers to the object, in which a method exists, itself.
$this->assign()