[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/lib/zend/Zend/Service/DeveloperGarden/ -> IpLocation.php (source)

   1  <?php
   2  /**
   3   * Zend Framework
   4   *
   5   * LICENSE
   6   *
   7   * This source file is subject to the new BSD license that is bundled
   8   * with this package in the file LICENSE.txt.
   9   * It is also available through the world-wide-web at this URL:
  10   * http://framework.zend.com/license/new-bsd
  11   * If you did not receive a copy of the license and are unable to
  12   * obtain it through the world-wide-web, please send an email
  13   * to [email protected] so we can send you a copy immediately.
  14   *
  15   * @category   Zend
  16   * @package    Zend_Service
  17   * @subpackage DeveloperGarden
  18   * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  19   * @license    http://framework.zend.com/license/new-bsd     New BSD License
  20   * @version    $Id$
  21   */
  22  
  23  /**
  24   * @see Zend_Service_DeveloperGarden_Client_ClientAbstract
  25   */
  26  require_once 'Zend/Service/DeveloperGarden/Client/ClientAbstract.php';
  27  
  28  /**
  29   * @see Zend_Service_DeveloperGarden_Response_IpLocation_LocateIPResponseType
  30   */
  31  require_once 'Zend/Service/DeveloperGarden/Response/IpLocation/LocateIPResponseType.php';
  32  
  33  /**
  34   * @see Zend_Service_DeveloperGarden_Response_IpLocation_LocateIPResponse
  35   */
  36  require_once 'Zend/Service/DeveloperGarden/Response/IpLocation/LocateIPResponse.php';
  37  
  38  /**
  39   * @see Zend_Service_DeveloperGarden_Response_IpLocation_IPAddressLocationType
  40   */
  41  require_once 'Zend/Service/DeveloperGarden/Response/IpLocation/IPAddressLocationType.php';
  42  
  43  /**
  44   * @see Zend_Service_DeveloperGarden_Response_IpLocation_RegionType
  45   */
  46  require_once 'Zend/Service/DeveloperGarden/Response/IpLocation/RegionType.php';
  47  
  48  /**
  49   * @see Zend_Service_DeveloperGarden_Response_IpLocation_GeoCoordinatesType
  50   */
  51  require_once 'Zend/Service/DeveloperGarden/Response/IpLocation/GeoCoordinatesType.php';
  52  
  53  /**
  54   * @see Zend_Service_DeveloperGarden_Response_IpLocation_CityType
  55   */
  56  require_once 'Zend/Service/DeveloperGarden/Response/IpLocation/CityType.php';
  57  
  58  /**
  59   * @see Zend_Service_DeveloperGarden_Request_IpLocation_LocateIPRequest
  60   */
  61  require_once 'Zend/Service/DeveloperGarden/Request/IpLocation/LocateIPRequest.php';
  62  
  63  /**
  64   * @category   Zend
  65   * @package    Zend_Service
  66   * @subpackage DeveloperGarden
  67   * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  68   * @author     Marco Kaiser
  69   * @license    http://framework.zend.com/license/new-bsd     New BSD License
  70   */
  71  class Zend_Service_DeveloperGarden_IpLocation 
  72      extends Zend_Service_DeveloperGarden_Client_ClientAbstract
  73  {
  74      /**
  75       * wsdl file
  76       *
  77       * @var string
  78       */
  79      protected $_wsdlFile = 'https://gateway.developer.telekom.com/p3gw-mod-odg-iplocation/services/IPLocation?wsdl';
  80  
  81      /**
  82       * wsdl file local
  83       *
  84       * @var string
  85       */
  86      protected $_wsdlFileLocal = 'Wsdl/IPLocation.wsdl';
  87  
  88      /**
  89       * Response, Request Classmapping
  90       *
  91       * @var array
  92       *
  93       */
  94      protected $_classMap = array(
  95          'LocateIPResponseType'  => 'Zend_Service_DeveloperGarden_Response_IpLocation_LocateIPResponseType',
  96          'IPAddressLocationType' => 'Zend_Service_DeveloperGarden_Response_IpLocation_IPAddressLocationType',
  97          'RegionType'            => 'Zend_Service_DeveloperGarden_Response_IpLocation_RegionType',
  98          'GeoCoordinatesType'    => 'Zend_Service_DeveloperGarden_Response_IpLocation_GeoCoordinatesType',
  99          'CityType'              => 'Zend_Service_DeveloperGarden_Response_IpLocation_CityType',
 100      );
 101  
 102      /**
 103       * locate the given Ip address or array of addresses
 104       *
 105       * @param Zend_Service_DeveloperGarden_IpLocation_IpAddress|string $ip
 106       * @return Zend_Service_DeveloperGarden_Response_IpLocation_LocateIPResponse
 107       */
 108      public function locateIP($ip)
 109      {
 110          $request = new Zend_Service_DeveloperGarden_Request_IpLocation_LocateIPRequest(
 111              $this->getEnvironment(),
 112              $ip
 113          );
 114  
 115          $result = $this->getSoapClient()->locateIP($request);
 116  
 117          $response = new Zend_Service_DeveloperGarden_Response_IpLocation_LocateIPResponse($result);
 118          return $response->parse();
 119      }
 120  }


Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1