TYPO3 extBase get locallang labels in Controller

We can use the below code to get the locallang lables in our extension controllers.

$GLOBALS[‘TSFE’]->sL(‘LLL:EXT:myext/Resources/Private/Language/locallang.xlf:readmore’);

Or we can use

\TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate(‘my_label_key’,’myextName’);