Current file: /root/works/bitsis/oxokuatro/CRE/WSFW/wsfw_client.php
Legend: executed not executed dead code

  Coverage
  Classes Functions / Methods Lines
Total
100.00%100.00%
100.00% 1 / 1
100.00%100.00%
100.00% 2 / 2 CRAP
100.00%100.00%
100.00% 4 / 4
 
WSFW_Client
100.00%100.00%
100.00% 1 / 1
100.00%100.00%
100.00% 2 / 2
100.00%100.00%
100.00% 4 / 4
 __construct($params)
100.00%100.00%
100.00% 1 / 1 1
100.00%100.00%
100.00% 3 / 3
 call($method, $params)
100.00%100.00%
100.00% 1 / 1 1
100.00%100.00%
100.00% 1 / 1


       1                 : <?php                                                                                                    
       2                 : /**                                                                                                      
       3                 :  * wsfw_client Fitxer que defineix la clase client                                                       
       4                 :  * @package WSFW                                                                                         
       5                 :  */                                                                                                      
       6                 : ini_set("soap.wsdl_cache_enabled", "0");                                                                 
       7                 : include_once 'wsfw_protocol.php';                                                                        
       8                 : include_once 'lib/functions.php';                                                                        
       9                 :                                                                                                          
      10                 : /**                                                                                                      
      11                 :  * WSFW_Client realitza les connexions als WS i en retorna els resultats en l'estructura de dades de WSFW
      12                 :  * @var object $client Objecte protocol del WS                                                           
      13                 :  */                                                                                                      
      14                 : class WSFW_Client {                                                                                      
      15                 :                                                                                                          
      16                 :     private $client;                                                                                     
      17                 :                                                                                                          
      18                 :     /**                                                                                                  
      19                 :      * Constructor de Client, crea l'objecte protocol                                                    
      20                 :      * @param estructura $params Paràmetres del client (url i protocol)                                  
      21                 :      */                                                                                                  
      22                 :     public function  __construct($params) {                                                              
      23              10 :         $this->client = new $params["protocol"]();                                                       
      24              10 :         $this->client->initClient($params);                                                              
      25              10 :     }                                                                                                    
      26                 :                                                                                                          
      27                 :     /**                                                                                                  
      28                 :      * Crida a un mètode del WS mitjançant el protocol seleccionat                                       
      29                 :      * @param string $method Nom del mètode                                                              
      30                 :      * @param estructura $params Paràmetres de la crida                                                  
      31                 :      * @return estructura Retorna el resultat de la crida                                                
      32                 :      */                                                                                                  
      33                 :     public function call($method, $params) {                                                             
      34               9 :         return $this->client->call($method, $params);                                                    
      35                 :     }                                                                                                    
      36                 :                                                                                                          
      37                 : }                                                                                                        
      38                 :                                                                                                          
      39                 : ?>                                                                                                       

Generated by PHP_CodeCoverage 1.0.3 using PHP 5.3.3-7 and PHPUnit 3.5.5 at Tue Jan 25 2:17:13 CET 2011.