It gives the error: PHP Fatal error:  Call to undefined method Closure::set_title() for the line $entity1->set_title('foobar');