[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/vtlib/Vtiger/Feed/ -> Parser.php (source)

   1  <?php
   2  /*+***********************************************************************************
   3   * The contents of this file are subject to the vtiger CRM Public License Version 1.0
   4   * ("License"); You may not use this file except in compliance with the License
   5   * The Original Code is:  vtiger CRM Open Source
   6   * The Initial Developer of the Original Code is vtiger.
   7   * Portions created by vtiger are Copyright (C) vtiger.
   8   * All Rights Reserved.
   9   *************************************************************************************/
  10  require_once ('vtlib/thirdparty/parser/feed/simplepie.inc');
  11  
  12  /**
  13   * Extends SimplePie (feed parser library for Rss, Atom, etc)
  14   * @package vtlib
  15   */
  16  class Vtiger_Feed_Parser extends SimplePie {
  17      var $vt_cachelocation = 'test/vtlib/feedcache';
  18      var $vt_fetchdone = false;
  19  
  20      /**
  21       * Parse the feed url.
  22       * @param String Feed url (RSS, ATOM etc)
  23       * @param Integer Timeout value (to try connecting to url)
  24       */
  25  	function vt_dofetch($url, $timeout=10) {
  26          $this->set_timeout($timeout);
  27          $this->set_feed_url($url);
  28          $this->enable_order_by_date(false);
  29          $this->enable_cache(false);
  30          $this->init();
  31          $this->vt_fetchdone = true;
  32      }
  33  
  34      /**
  35       * Parse the content as feed.
  36       * @param String Feed content
  37       */
  38  	function vt_doparse($content) {
  39          $this->set_raw_data($content);
  40          $this->init();
  41          $this->vt_fetchdone = true;
  42      }
  43  }
  44  ?>


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