[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/include/Zend/Gdata/Contacts/ -> Query.php (source)

   1  <?php
   2  
   3  /**
   4   * https://github.com/prasad83/Zend-Gdata-Contacts
   5   * @author prasad
   6   * 
   7   * LICENSE
   8   *
   9   * This source file is subject to the new BSD license that is bundled
  10   * with this package in the file LICENSE.txt.
  11   * It is also available through the world-wide-web at this URL:
  12   * http://framework.zend.com/license/new-bsd
  13   * If you did not receive a copy of the license and are unable to
  14   * obtain it through the world-wide-web, please send an email
  15   * to [email protected] so we can send you a copy immediately.
  16   *
  17   * @category   Zend
  18   * @package    Zend_Gdata
  19   * @subpackage Contacts
  20   */
  21  
  22  /**
  23   * Zend_Gdata_Query
  24   */
  25  require_once ('Zend/Gdata/Query.php');
  26  
  27  class Zend_Gdata_Contacts_Query extends Zend_Gdata_Query {
  28      
  29      const CONTACTS_FEED_URI = 'https://www.google.com/m8/feeds/contacts';
  30  
  31      /**
  32       * The default URI used for feeds.
  33       */
  34      protected $_defaultFeedUri = self::CONTACTS_FEED_URI;
  35      protected $_user = 'default';
  36      protected $_projection = 'full';
  37      protected  $_contact;
  38  
  39  
  40      /**
  41       * @return string url
  42       */
  43      public function getQueryUrl()
  44      {
  45          if (isset($this->_url)) {
  46              $uri = $this->_url;
  47          } else {
  48              $uri = $this->_defaultFeedUri;
  49          }
  50          if ($this->getUser() != null) {
  51              $uri .= '/' . $this->getUser();
  52          }
  53          if ($this->getProjection() != null) {
  54              $uri .= '/' . $this->getProjection();
  55          }
  56          if ($this->getContact() != null) {
  57              $uri .= '/' . $this->getContact();
  58          }
  59          
  60          $uri .= $this->getQueryString();
  61          return $uri;
  62      }
  63      
  64          /**
  65       * @see $_projection
  66       * @param string $value
  67       * @return Zend_Gdata_Calendar_EventQuery Provides a fluent interface
  68       */
  69      public function setProjection($value)
  70      {
  71          $this->_projection = $value;
  72          return $this;
  73      }
  74  
  75      /**
  76       * @see $_user
  77       * @param string $value
  78       * @return Zend_Gdata_Calendar_EventQuery Provides a fluent interface
  79       */
  80      public function setUser($value)
  81      {
  82          $this->_user = $value;
  83          return $this;
  84      }
  85      
  86      public function setContact($value){
  87          $this->_contact = $value;
  88      }
  89      
  90      public function getContact(){
  91          echo $this->_contact;
  92          return $this->_contact;
  93      }
  94  
  95      /**
  96       * @see $_visibility
  97       * @param bool $value
  98       * @return Zend_Gdata_Calendar_EventQuery Provides a fluent interface
  99       */
 100      public function setVisibility($value)
 101      {
 102          $this->_visibility = $value;
 103          return $this;
 104      }
 105      
 106      
 107      /**
 108       * @see $_projection
 109       * @return string projection
 110       */
 111      public function getProjection()
 112      {
 113          return $this->_projection;
 114      }
 115  
 116      /**
 117       * @see $_user
 118       * @return string user
 119       */
 120      public function getUser()
 121      {
 122          return $this->_user;
 123      }
 124  
 125      /**
 126       * @see $_visibility
 127       * @return string visibility
 128       */
 129      public function getVisibility()
 130      {
 131          return $this->_visibility;
 132      }
 133      
 134      public function setShowDeleted($value){
 135          if ($value !== null) {
 136              $this->_params['showdeleted'] = $value;
 137          } else {
 138              unset($this->_params['showdeleted']);
 139          }
 140          return $this;
 141      }
 142       
 143      /**
 144       * @param string $value
 145       * @return Zend_Gdata_Calendar_EventQuery Provides a fluent interface
 146       */
 147      public function setOrderBy($value)
 148      {
 149          if ($value != null) {
 150              $this->_params['orderby'] = $value;
 151          } else {
 152              unset($this->_params['orderby']);
 153          }
 154          return $this;
 155      }
 156      
 157      
 158   
 159       /**
 160       * @return string sortorder
 161       */
 162      public function setSortOrder($value)
 163      {
 164          if ($value != null) {
 165              $this->_params['sortorder'] = $value;
 166          } else {
 167              unset($this->_params['sortorder']);
 168          }
 169          return $this;
 170      }
 171      
 172      
 173      /**
 174       * @return string orderby
 175       */
 176      public function getOrderBy()
 177      {
 178          if (array_key_exists('orderby', $this->_params)) {
 179              return $this->_params['orderby'];
 180          } else {
 181              return null;
 182          }
 183      }
 184  
 185      /**
 186       * @return string sortorder
 187       */
 188      public function getSortOrder()
 189      {
 190          if (array_key_exists('sortorder', $this->_params)) {
 191              return $this->_params['sortorder'];
 192          } else {
 193              return null;
 194          }
 195      }
 196  }


Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1