Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Created by PhpStorm.
- * User: fahmihilmansyah
- * Date: 09/11/18
- * Time: 08.39
- */
- namespace App\Mylibs;
- use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
- use Symfony\Component\HttpFoundation\Request;
- class libapi extends AbstractController {
- public $authentic;
- public $methodType;
- public $contentData;
- public $clientIP;
- function __construct()
- {
- $request = new Request();
- // parent::__construct();
- $this->authentic = $request->headers->get('Authentication');
- $this->methodType = $request->getMethod();
- $this->contentData = $request->getContent();
- $this->clientIP = $request->getClientIps();
- $this->cekHeader();
- }
- function cekHeader(){
- $posts = $this->getDoctrine()->getManagers(Mitra::class)->findAll();
- print_r($posts);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement