Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 15, 2024 via composer

laminas/laminas-feed 2.22.0

provides functionality for creating and consuming RSS and Atom feeds
Package summary
Share
0
issues
1
license
3
BSD-3-Clause
Package created
1 Jan 2020
Version published
11 Oct 2023
Maintainers
1
Total deps
3
Direct deps
2
License
BSD-3-Clause

Issues

0
This package has no issues

Licenses

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
3 Packages, Including:
laminas/laminas-escaper@2.13.0
laminas/laminas-feed@2.22.0
laminas/laminas-stdlib@3.19.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

2
All Dependencies CSV
β“˜ This is a list of laminas/laminas-feed 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
laminas/laminas-escaper2.13.08.94 kBBSD-3-Clause
prod
laminas/laminas-stdlib3.19.049.04 kBBSD-3-Clause
prod

Visualizations

Frequently Asked Questions

What does laminas/laminas-feed do?

The laminas/laminas-feed is a resourceful PHP library that provides functionality for creating and consuming RSS and Atom feeds. It allows users to easily access elements of feeds including feed attributes, and entry attributes. The library also offers extensive support for modifying feed and entry structure using a natural syntax, which can then be transformed back into XML.

How do you use laminas/laminas-feed?

To use laminas/laminas-feed, you would need to install it first using Composer, the commonly used dependency manager in PHP. This can be done with the following command composer require laminas/laminas-feed.

Once installed, you can start using the library to read feeds. Here's a simple example of how you might utilize the functionality to read an RSS feed:

use Laminas\Feed\Reader\Reader;

$feed = Reader::import('https://example.com/rss-feed');

foreach ($feed as $entry) {
    echo $entry->getTitle() . "\n";
    echo $entry->getDescription() . "\n";
}

In the above code, an RSS feed from 'https://example.com/rss-feed' is being read, and the title and description of each entry in the feed is being printed out.

Similarly, here is how you might use this library to write a feed:

use Laminas\Feed\Writer\Feed;

$feed = new Feed;
$feed->setTitle('Feed Title');
$feed->setDescription('Feed Description');
$feed->setLink('https://example.com');

$entry = $feed->createEntry();
$entry->setTitle('Entry Title');
$entry->setDescription('Entry Description');
$entry->setLink('https://example.com/entry');
$feed->addEntry($entry);

echo $feed->export('rss');

In this code, a new feed is created with a title, a description, and a link. An entry is then created for the feed, also with a title, a description, and a link, which is then added to the feed. The feed is finally printed out as an RSS using the export method.

Where are the laminas/laminas-feed docs?

The documentation for the laminas/laminas-feed library can be found at https://docs.laminas.dev/laminas-feed/. This offers a depth of information about the package, including comprehensive instructions for both using and contributing to the library, in addition to answers to frequently asked questions and information about additional resources.