public function setTransition($transition)
    {
        if ($transition instanceof SlideTransition) {
            $this->transition = $transition;
        } elseif (is_array($transition)) {
            $this->transition = new SlideTransition($transition);
        } else {
            $this->transition = null;
            trigger_error('Argument must be an object of class SlideTransition. Data loss!', E_USER_WARNING);
        }

        return $this;
    }