コード例 #1
0
ファイル: ParseController.php プロジェクト: Nek-/ZCodeBundle
 public function indexAction()
 {
     if ($this->get('request')->isXmlHttpRequest() && $this->get('request')->getMethod() == 'POST') {
         $text = $this->get('request')->get('text');
         $zcode = new Zcode();
         $rep = new Response($zcode->zcodeify($text));
         return $rep;
     } else {
         throw new NotFoundHttpException();
     }
 }
コード例 #2
0
ファイル: ZCodeExtension.php プロジェクト: Nek-/ZCodeBundle
 public function zcoderender($text)
 {
     $zcode = new Zcode();
     return $zcode->zcodeify($text);
 }