* @copyright 2004 by http://wombat.exit0.net * @package wombatSite * @subpackage contentFetcher */ /** * content fetcher: Blogger * * @version 0.1.0 * @package wombatSite * @subpackage contentFetcher */ class wbContentFetcher_Blogger { /** * fetch content * * Parameter: * blog/id * * @access public * @return boolean $result true on success */ function fetchHtml( $param ) { list( $blog, $id ) = explode( '/', $param ); $conf =& wbFactory::singleton( 'patConfiguration' ); $conf->loadConfig( 'blogger.xml' ); $config = $conf->getConfigValue(); $ds = wbFactory::singleton( 'wbDatasource' ); $ds->setCallback( $this ); $entry = $ds->getEntry( $config[$blog]['table'], $id ); if( patErrorManager::isError( $entry ) ) { return $entry; } return $entry['title']; } /** * callback function * * @access public * @param string $table * @param array $data * @param int $id * @return boolean true */ function callForGetentries( $table, &$data, $id ) { $data['id'] = $id; return true; } /** * callback function * * @access public * @param string $table * @param array $data * @param int $id * @return boolean true */ function callForGetentry( $table, &$data, $id ) { $data['id'] = $id; return true; } /** * callback function * * @access public * @param string $table * @param array $data * @param int $id * @return boolean true */ function callForSave( $table, &$data, $id ) { return true; } } ?>