Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Using $this when not in object context

You cannot call a method from a static function with php injection
$this->userService->getUser();

Call a static methode
UserClass::getUser();

Call a non-static methode
$user = new User;
$user->getUser();
 
PREVIOUS NEXT
Tagged: #Using #object #context
ADD COMMENT
Topic
Name
9+8 =