コード例 #1
0
ファイル: CoreManager.php プロジェクト: tellaw/leadsfactory
 /**
  * @return int response inverted
  * @throws \Exception
  */
 public function isDomainAccepted()
 {
     $host = $this->container->get("request")->server->get('HTTP_HOST');
     $infos = CoreManager::getLicenceInfos();
     $domains = $infos["domains"];
     foreach ($domains as $domain) {
         if (strstr($host, $domain)) {
             return 0;
         }
     }
     return 1;
 }
コード例 #2
0
 /**
  * @Route("/licence", name="_security_licence")
  * @Secure(roles="ROLE_USER")
  * @Template()
  */
 public function licenceErrorAction()
 {
     $informations = CoreManager::getLicenceInfos();
     return $this->render('TellawLeadsFactoryBundle:Security:licenceDetail.html.twig', array('information' => $informations));
 }