src/Phlexible/Bundle/UserBundle/Controller/StatusController.php
public function sessionAction(Request $request)
    {
        $output = '<pre>';
        $output .= 'Security session namespace:'.PHP_EOL;
        $output .= '<ul>';
        foreach ($request->getSession()->all() as $key => $value) {
            if (is_object($value)) {
                $o = get_class($value);
            } elseif (is_array($value)) {
                $o = 'array '.count($value);
            } else {
                $o = $value;
                if (@unserialize($o)) {
                    $o = unserialize($o);
                }
            }
            $output .= '<li>'.$key.': '.$o.'</li>';
        }
        $output .= '</ul>';

        return new Response($output);
    }
public function sessionAction(Request $request)
    {
        $output = '<pre>';
        $output .= 'Security session namespace:'.PHP_EOL;
        $output .= '<ul>';
        foreach ($request->getSession()->all() as $key => $value) {
            if (is_object($value)) {
                $o = get_class($value);
            } elseif (is_array($value)) {
                $o = 'array '.count($value);
            } else {
                $o = $value;
                if (@unserialize($o)) {
                    $o = unserialize($o);
                }
            }
            $output .= '<li>'.$key.': '.$o.'</li>';
        }
        $output .= '</ul>';

        return new Response($output);
    }
public function sessionAction ( Request $ request ) { $ output = '<pre>' ; $ output .= 'Security session namespace:' . PHP_EOL ; $ output .= '<ul>' ; foreach ( $ request -> getSession ( ) -> all ( ) as $ key => $ value ) { if ( is_object ( $ value ) ) { $ o = get_class ( $ value ) ; } elseif ( is_array ( $ value ) ) { $ o = 'array ' . count ( $ value ) ; } else { $ o = $ value ; if ( @ unserialize ( $ o ) ) { $ o = unserialize ( $ o ) ; } } $ output .= '<li>' . $ key . ': ' . $ o . '</li>' ; } $ output .= '</ul>' ; return new Response ( $ output ) ; }
Show session.

@param Request $request

@return Response
@Route("/session", name="phlexible_status_user_session")
Show session .