public function isFromRoute($routeName)
    {
        $session = $this->getSession();

        /** @noinspection PhpUndefinedFieldInspection */
        if ($session->data === null || !is_array($session->source)) {
            return null;
        }

        /** @noinspection PhpUndefinedFieldInspection */
        return $session->source['routeName'] === $routeName;
    }