No need to do this anymore.  You can just write:

  $assetsManager = AssetsManager::getInstance();