src/DataProvider/Home.php line 45

  1. <?php
  2. // api/src/DataProvider/BlogPostCollectionDataProvider.php
  3. namespace App\DataProvider;
  4. use Adldap\Adldap;
  5. use App\Common\Functions\Helpers;
  6. use App\Document\Auth\User;
  7. use App\Functions\Common\AppsLogin;
  8. use App\Functions\Common\AppsLogout;
  9. use App\Functions\Common\AuthProvider;
  10. use App\Functions\Common\Register;
  11. use App\Functions\Common\ResetPassword;
  12. use App\Functions\Common\UserValidations;
  13. use App\Functions\Common\Variables;
  14. use Doctrine\ODM\MongoDB\DocumentManager as MongoDBDocumentManager;
  15. use Lexik\Bundle\JWTAuthenticationBundle\Security\Http\Authentication\AuthenticationSuccessHandler;
  16. use Lexik\Bundle\JWTAuthenticationBundle\Services\JWTTokenManagerInterface;
  17. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  18. use Symfony\Bundle\SecurityBundle\Security;
  19. use Symfony\Component\HttpFoundation\JsonResponse;
  20. use Symfony\Component\HttpFoundation\Request;
  21. use Symfony\Component\HttpFoundation\Response;
  22. use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
  23. use Symfony\Component\Serializer\SerializerInterface;
  24. class Home extends AbstractController
  25. {
  26.     protected $headers = array('Content-Type''application/json');
  27.     public $validator;
  28.     public $dispatcher;
  29.     public $propertyAccessor;
  30.     private $options Variables::SERIALIZER_OPTIONS;
  31.     private $options_de Variables::DESERIALZER_OPTIONS;
  32.     public function getInfo(Request $request){
  33.         ob_start();
  34.         phpinfo();
  35.         $phpinfo ob_get_clean();
  36.         return new Response(
  37.             '<html><body>'.$phpinfo.'</body></html>'
  38.         );
  39.     }
  40.     public function home(Request $request){
  41.         return $this->render('home.html.twig');
  42.     }
  43. }