<?php

/**
 * Fade in visual effect
 *
 * @version DR1.5-20070705
 */
class FadeInEffect implements IVisualEffect {



	protected $delay;



	public function __construct($delay = 30) {
		$this->delay = $delay;
	}



	public function run(View $view) {
		$response = ResponseContext::getInstance();
		$id = $view->getId();
		if (!$id) {
			$response->update($view);
			return;
		}
		try {
			$response->FadeInEffect->hideParentOf($id);
			$response->update($view);
			$response->FadeInEffect->start($id, $this->delay);
		} catch (Exception $e) {
			$response->update($view);
		}
	}



} // class FadeInEffect

?>