<?php


namespace IZON\Admin\Web\Interceptors;

use \IZON\MVC\Interceptors\Interceptor;
use \IZON\MVC\HttpRequest;
use \IZON\MVC\ModelAndView;

use \IZON\Admin\Services\AdminService;

/**
 *  nacte max povolenou velikost upload souboru v MB pod identifikatorem fileUploadMaxSize a B pod identifikatorem fileUploadMaxSizeB
 */
class LoadMaxFileSizeInterceprtor {
    
    function __construct() {
    }
    
    public function afterCompletion(HttpRequest $request, $exception) {
        
    }

    public function postHandle(HttpRequest $request, ModelAndView $model) {
        $model->putParameter("fileUploadMaxSize", \IZON\MVC\getFileUploadMaxSize()/pow(1024, 2));
        $model->putParameter("fileUploadMaxSizeB", \IZON\MVC\getFileUploadMaxSize());
        return $model;
    }

    public function preHandle(HttpRequest $request) {
        
    }
}
