<?php
/**
 * Created by PhpStorm.
 * User: Игорь
 * Date: 23.01.2017
 * Time: 00:18
 */

namespace PTEST\C;
use PFRM\Controller;
use PFRM\View as View;
use PTEST\M\CAPTCHAModel as Model;


class CAPTCHAController extends Controller{

  public function indexAction() {
    $view = new View('CAPTCHA');
    $view->setHTTPHeader('Content-Type: image/png');
    $view->setHTTPHeader('Cache-Control: max-age=0, no-cache, no-store');
    $view->setHTTPHeader('Pragma: no-cache');
    $model = new Model();
    $view->image = $model->getImage();
    $view->render();
  }
}