Since inject will not work in extbase 6.0 for TYPO3 6.X
Need to use namespace
Example..
File used for service contain following code(ext name is registration,and vendor name is TYPO3)
registration/Classes/Service/UserService.php contain following code
namespace TYPO3\Registration\Service;
class UserService implements \TYPO3\CMS\Core\SingletonInterface {
public function addUser($args){
return 'service called';
}
}
Call this service from controller
/**
* @var \TYPO3\Registration\Service\UserService
* @inject
*/
protected $userService;
And from this object $userService , you can call the addUser Method of the Service