mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-15 21:41:06 +00:00
20 lines
451 B
PHP
20 lines
451 B
PHP
<?php
|
|
|
|
namespace Wallabag\CoreBundle\Controller;
|
|
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController as BaseAbstractController;
|
|
use Wallabag\CoreBundle\Entity\User;
|
|
|
|
abstract class AbstractController extends BaseAbstractController
|
|
{
|
|
/**
|
|
* @return User|null
|
|
*/
|
|
protected function getUser()
|
|
{
|
|
$user = parent::getUser();
|
|
\assert(null === $user || $user instanceof User);
|
|
|
|
return $user;
|
|
}
|
|
}
|