public static function build($request) { $ip_address = \Whathood\Util::getRemoteIp($request); $user = new WhathoodUser(array('ip_address' => $ip_address)); return $user; }
public function whatsMyIpAction() { $remote_ip = \Whathood\Util::getRemoteIp($this->getRequest()); return new ViewModel(array('remoteIp' => $remote_ip)); }