Compare commits
No commits in common. "master" and "1.0.0" have entirely different histories.
4 changed files with 8 additions and 39 deletions
23
CHANGELOG.md
23
CHANGELOG.md
|
@ -1,23 +0,0 @@
|
||||||
# Changelog
|
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
|
||||||
|
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
||||||
|
|
||||||
## [1.0.2] - 2023-08-13
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- Fixed issue in `\RssLib\Objects\RssFeed > Guid` where `guid` isn't correctly parsed if the "isPermaLink" attribute is missing.
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.1] - 2023-08-13
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- Fixed issue in `\RssLib\Objects > RssItem` where `category` isn't correctly parsed.
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.0] - 2023-08-13
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- First Release
|
|
|
@ -13,7 +13,7 @@
|
||||||
"description": "A library used to parse RSS feeds",
|
"description": "A library used to parse RSS feeds",
|
||||||
"company": "Nosial",
|
"company": "Nosial",
|
||||||
"copyright": "Copyright (c) 2022-2023 Nosial",
|
"copyright": "Copyright (c) 2022-2023 Nosial",
|
||||||
"version": "1.0.2",
|
"version": "1.0.0",
|
||||||
"uuid": "f24416e8-39f0-11ee-8dcf-f362baa8b68c"
|
"uuid": "f24416e8-39f0-11ee-8dcf-f362baa8b68c"
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
|
|
|
@ -22,18 +22,10 @@
|
||||||
/**
|
/**
|
||||||
* Public Constructor
|
* Public Constructor
|
||||||
*
|
*
|
||||||
* @param array|string $data
|
* @param array $data
|
||||||
*/
|
*/
|
||||||
public function __construct(array|string $data)
|
public function __construct(array $data)
|
||||||
{
|
{
|
||||||
if(is_string($data))
|
|
||||||
{
|
|
||||||
$data = [
|
|
||||||
'guid' => $data,
|
|
||||||
'guid_isPermalink' => false
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!array_key_exists('guid', $data))
|
if(!array_key_exists('guid', $data))
|
||||||
{
|
{
|
||||||
throw new InvalidArgumentException('Missing required key guid for guid');
|
throw new InvalidArgumentException('Missing required key guid for guid');
|
||||||
|
|
|
@ -86,15 +86,15 @@ namespace RssLib\Objects;
|
||||||
$this->author = (string)$data['author'];
|
$this->author = (string)$data['author'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(array_key_exists('category', $data))
|
if(array_key_exists('categories', $data))
|
||||||
{
|
{
|
||||||
if(is_string($data['category']))
|
if(is_string($data['categories']))
|
||||||
{
|
{
|
||||||
$this->categories = [$data['category']];
|
$this->categories = [$data['categories']];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->categories = (array)$data['category'];
|
$this->categories = (array)$data['categories'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ namespace RssLib\Objects;
|
||||||
'link' => $this->link,
|
'link' => $this->link,
|
||||||
'description' => $this->description,
|
'description' => $this->description,
|
||||||
'author' => $this->author,
|
'author' => $this->author,
|
||||||
'category' => $this->categories,
|
'categories' => $this->categories,
|
||||||
'comments' => $this->comments,
|
'comments' => $this->comments,
|
||||||
'enclosure' => $this->enclosure?->toArray(),
|
'enclosure' => $this->enclosure?->toArray(),
|
||||||
'guid' => $this->guid?->toArray(),
|
'guid' => $this->guid?->toArray(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue