private function _logAnalytics($app, $subject)
    {
        if($app->getConfiguration()->logAnalytics() == true) {
            $clientIP = (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && !empty($_SERVER['HTTP_X_FORWARDED_FOR'])) ?
                $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
            $analyticsData = array();
            $principalVals = array_values($subject->getPrincipal());
            if(count($principalVals) > 0)
                $analyticsData['user'] = $principalVals[0];
            $analyticsData['time'] = time();
            $analyticsData['session'] = session_id();
            $analyticsData['page'] = 'login'; 
            $analyticsData['UA'] = $_SERVER['HTTP_USER_AGENT'];
            $analyticsData['ip'] = $clientIP;
            $GLOBALS['routeLogger']->info(json_encode($analyticsData));
        }
    }
private function _logAnalytics($app, $subject)
    {
        if($app->getConfiguration()->logAnalytics() == true) {
            $clientIP = (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && !empty($_SERVER['HTTP_X_FORWARDED_FOR'])) ?
                $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
            $analyticsData = array();
            $principalVals = array_values($subject->getPrincipal());
            if(count($principalVals) > 0)
                $analyticsData['user'] = $principalVals[0];
            $analyticsData['time'] = time();
            $analyticsData['session'] = session_id();
            $analyticsData['page'] = 'login'; 
            $analyticsData['UA'] = $_SERVER['HTTP_USER_AGENT'];
            $analyticsData['ip'] = $clientIP;
            $GLOBALS['routeLogger']->info(json_encode($analyticsData));
        }
    }
private function _logAnalytics ( $ app , $ subject ) { if ( $ app -> getConfiguration ( ) -> logAnalytics ( ) == true ) { $ clientIP = ( isset ( $ _SERVER [ 'HTTP_X_FORWARDED_FOR' ] ) && ! empty ( $ _SERVER [ 'HTTP_X_FORWARDED_FOR' ] ) ) ? $ _SERVER [ 'HTTP_X_FORWARDED_FOR' ] : $ _SERVER [ 'REMOTE_ADDR' ] ; $ analyticsData = array ( ) ; $ principalVals = array_values ( $ subject -> getPrincipal ( ) ) ; if ( count ( $ principalVals ) > 0 ) $ analyticsData [ 'user' ] = $ principalVals [ 0 ] ; $ analyticsData [ 'time' ] = time ( ) ; $ analyticsData [ 'session' ] = session_id ( ) ; $ analyticsData [ 'page' ] = 'login' ; $ analyticsData [ 'UA' ] = $ _SERVER [ 'HTTP_USER_AGENT' ] ; $ analyticsData [ 'ip' ] = $ clientIP ; $ GLOBALS [ 'routeLogger' ] -> info ( json_encode ( $ analyticsData ) ) ; } }
Log Analytics using the route logger

@param mixed $app
@access private
@return void
Log Analytics using the route logger