<?php
/*
* This file is part of the pwp package.
* (c) 2009-2010 Victor Rad' <victor.v.rad[at]gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Initializing application
*
* @package filter
* @subpackage init
* @author Victor Rad'
*/
class initFilter extends sfFilter
{
public function execute ($filterChain)
{
// init scrollSet from cookie (true by default)
if (!isset($_COOKIE['scrollSet']) or $_COOKIE['scrollSet'] == 'true'){
$this->getContext()->set('scrollSet', true);
}
else{
$this->getContext()->set('scrollSet', false);
}
// execute next filter
$filterChain->execute();
}
}
?>