Ejemplo n.º 1
0
 /**
  * Attach the PHP client sources
  * 
  * @param array $data The event data
  * @return boolean Response
  */
 public static function PdfAttachmentHook($data)
 {
     $temp =& $data['param'];
     $cnt =& $data['cnt'];
     $server = $data['server'];
     if (self::$EnableJson) {
         if (!$server->ForceNotOutputJsonPhp) {
             $cnt++;
             $temp['attachment_' . $cnt] = $server->Name . '.jsonclient.php:' . self::$UseServer->GetJsonPhpUri();
         }
         if (self::$AttachJsInPdf && !$server->ForceNotOutputJsonJs) {
             $cnt++;
             $temp['attachment_' . $cnt] = $server->Name . '.jsonclient.js:' . self::$UseServer->GetJsonJsUri();
             if (self::IsJsPackerAvailable()) {
                 $cnt++;
                 $temp['attachment_' . $cnt] = $server->Name . '.jsonclient.min.js:' . self::$UseServer->GetJsonJsUri() . '&min';
             }
         }
     }
     if (self::$EnableRpc && !$server->ForceNotOutputRpcPhp) {
         $cnt++;
         $temp['attachment_' . $cnt] = $server->Name . '.xmlrpcclient.php:' . self::$UseServer->GetRpcPhpUri();
     }
     if (self::$EnableHttp && !$server->ForceNotOutputHttpPhp) {
         $cnt++;
         $temp['attachment_' . $cnt] = $server->Name . '.httpclient.php:' . self::$UseServer->GetHttpPhpUri();
     }
     if (self::$EnableRest && !$server->ForceNotOutputRestPhp) {
         $cnt++;
         $temp['attachment_' . $cnt] = $server->Name . '.restclient.php:' . self::$UseServer->GetRestPhpUri();
     }
     return true;
 }