Logo Search packages:      
Sourcecode: nagvis version File versions  Download package

NagVisMap::readHoverUrl ( &$  obj  ) 

Reads the given hover url form an object and forms it to a readable format for the hover box

Parameters:
Array $obj Array with object informations
Returns:
String Code for the hover box
Author:
Lars Michelsen <lars@vertical-visions.de>

Definition at line 389 of file NagVisMap.php.

                                   {
            if (DEBUG&&DEBUGLEVEL&1) debug('Start method NagVisMap::readHoverUrl(&$obj)');
            /* FIXME: Context is supported in php >= 5.0
            * $http_opts = array(
            *      'http'=>array(
            *      'method'=>"GET",
            *      'header'=>"Accept-language: en\r\n" .
            *                "Authorization: Basic ".base64_encode("user:pw"),
            *      'request_fulluri'=>true  ,
            *      'proxy'=>"tcp://proxy.url.de"
            *   )
            * );
            * $context = stream_context_create($http_opts);
            * $content = file_get_contents($obj['hover_url'],FALSE,$context);
            */
            if(!$content = @file_get_contents($obj['hover_url'])) {
                  $FRONTEND = new GlobalPage($this->MAINCFG,Array('languageRoot'=>'nagvis:global'));
                  $FRONTEND->messageToUser('WARNING','couldNotGetHoverUrl','URL~'.$obj['hover_url']);
            }
            
            if (DEBUG&&DEBUGLEVEL&1) debug('End method NagVisMap::readHoverUrl(): HTML');
            return str_replace('"','\\\'',str_replace('\'','\\\'',str_replace("\t",'',str_replace("\n",'',str_replace("\r\n",'',$content)))));
      }


Generated by  Doxygen 1.6.0   Back to index