Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Rss Client Laravel Package

desarrolla2/rss-client

Deprecated RSS/Atom feed fetcher (will not be updated; migrate to FastFeed). Simple, fast RSS2.0/Atom1.0 client: add multiple feed URLs under a group name and fetch entries, with optional caching via desarrolla2/cache adapters.

View on GitHub
Deep Wiki
Context7

Custom logic for process RSS

Maybe you need your custom logic for feed process. In this case you need to create a custom processor that implements ProcessorInterface

<?php

use Desarrolla2\RSSClient\Parser\Processor\ProcessorInterface;

class CustomProcessor implements ProcessorInterface
{
    /**
     * [@var](https://github.com/var) array
     */
    protected $mediaTypes = array(
        'content',
        'keywords',
        'thumbnail',
        'category',
        'comments',
    );

    /**
     * [@param](https://github.com/param) NodeInterface $node
     * [@param](https://github.com/param) \DOMElement   $item
     *
     * [@return](https://github.com/return) mixed|void
     */
    public function execute(NodeInterface $node, \DOMElement $item)
    {
        foreach ($this->mediaTypes as $mediaType) {
            /* Implement getNodeValueByTagName yourself */
            $value = $this->getNodeValueByTagName($item, $mediaType);
            if ($value) {
                $node->setExtended(
                    $mediaType,
                    $value
                );

            }
        }
    }
}

And them push it on the top of processors stack.

<?php

use Desarrolla2\RSSClient\RSSClient;

$client = new RSSClient();
$client->pushProcessor( new CustomProcessor($client->getSanitizerHandler()));

Now you can continue normally.

<?php

$client->fetch();

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator