<?php

namespace Velis\Mvc\Controller;

use Velis\Exception;

/**
 * Access exception
 * @author Olek Procki <olo@velis.pl>
 */
class AccessException extends Exception
{
    /**
     * @var bool
     */
    protected $_silent = false;


    /**
     * Check if message should be displayed in Flash Messenger
     * @return bool
     */
    public function isSilent()
    {
        return $this->_silent;
    }


    /**
     * Set silent mode
     * @param boolean $silent
     * @return AccessException
     */
    public function silent($silent)
    {
        $this->_silent = $silent;

        return $this;
    }
}
