Advertisement
fahmihilmansyah

db

Nov 8th, 2018
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.87 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: fahmihilmansyah
  5.  * Date: 09/11/18
  6.  * Time: 08.39
  7.  */
  8. namespace App\Mylibs;
  9. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  10. use Symfony\Component\HttpFoundation\Request;
  11.  
  12. class libapi extends AbstractController {
  13.     public $authentic;
  14.     public $methodType;
  15.     public $contentData;
  16.     public $clientIP;
  17.     function __construct()
  18.     {
  19.         $request = new Request();
  20. //        parent::__construct();
  21.         $this->authentic = $request->headers->get('Authentication');
  22.         $this->methodType = $request->getMethod();
  23.         $this->contentData = $request->getContent();
  24.         $this->clientIP = $request->getClientIps();
  25.         $this->cekHeader();
  26.     }
  27.     function cekHeader(){
  28.         $posts = $this->getDoctrine()->getManagers(Mitra::class)->findAll();
  29.  
  30.         print_r($posts);
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement