00001 <?php 00002 /*************************************************************************** 00003 * Copyright (C) 2007 by Dmitry A. Lomash, Dmitry E. Demidov * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU Lesser General Public License as * 00007 * published by the Free Software Foundation; either version 3 of the * 00008 * License, or (at your option) any later version. * 00009 * * 00010 ***************************************************************************/ 00011 00015 final class AtomChannelWorker extends Singleton implements FeedChannelWorker 00016 { 00020 public static function me() 00021 { 00022 return Singleton::getInstance(__CLASS__); 00023 } 00024 00028 public function makeChannel(SimpleXMLElement $xmlFeed) 00029 { 00030 $feedChannel = FeedChannel::create((string) $xmlFeed->title); 00031 00032 if (isset($xmlFeed->link)) 00033 if (is_array($xmlFeed->link)) 00034 $feedChannel->setLink((string) $xmlFeed->link[0]); 00035 else 00036 $feedChannel->setLink((string) $xmlFeed->link); 00037 00038 return $feedChannel; 00039 } 00040 00041 public function toXml(FeedChannel $channel, $itemsXml) 00042 { 00043 throw new UnimplementedFeatureException('implement me!'); 00044 } 00045 } 00046 ?>