Feed
class Feed extends AbstractType implements BranchInterface, SetLoggerInterface (View source)
The top-most element in a feed.
Traits
Properties
protected string | $createFromFormat | The format that should be used when determining how to parse a date from a date string. | from DateTrait |
protected string | $outputTimezone | The preferred timezone to use for date output. | from DateTrait |
protected string | $namespaceAlias | The preferred namespace alias for a given XML namespace URI. Should be
the result of a call to SimplePie\Util\Ns . |
|
protected LoggerInterface | $logger | A PSR-3 logger. | from LoggerTrait |
protected object | $root | The root-most node in the feed. | from RootTrait |
Methods
Proxy method which forwards requests to an underlying handler.
Gets the standard, pre-formatted message for unresolvable method calls.
Allows the user to help the date parser by providing the format of the datestamp in the feed.
Set the preferred output timezone.
Retrieves nodes that are simple scalars, and there is only one allowed value.
Retrieves nodes that are complex types, and there is only one allowed value.
Retrieves nodes that are complex types, and there may be are more than one value.
Constructs a new instance of this class.
Finds the default namespace alias for the feed type.
Finds the common internal alias for a given method name.
Get the correct handler for a whitelisted method name.
Returns the Authors associated with this feed.
Returns the list of Categories/Tags/Topics associated with this feed.
Returns the list of Contributors associated with this feed.
Alias for getRights()
.
Returns the list of Entries/Items associated with this feed.
Returns the Generator associated with this feed.
Alias for getEntries()
.
Returns the language associated with this feed.
Returns the list of Links associated with this feed.
Alias for getPublished()
.
Returns the date that the feed was published.
Returns the sub-title associated with this feed.
Returns the summary associated with this feed.
Returns the date that the feed was updated.
Details
in AbstractType at line 27
__call(string $nodeName, array $args)
Proxy method which forwards requests to an underlying handler.
in AbstractType at line 52
protected string
getUnresolvableMessage(string $nodeName)
Gets the standard, pre-formatted message for unresolvable method calls.
DateTrait
setDateFormat(string $createFromFormat)
Allows the user to help the date parser by providing the format of the datestamp in the feed.
This will be passed into DateTime::createFromFormat()
at parse-time.
DateTrait
setOutputTimezone(string $timezone = 'UTC')
Set the preferred output timezone.
This calculation is performed on a best-effort basis and is not guaranteed. Factors which may affect the calculation include:
- the version of glibc/musl that your OS relies on
- the freshness of the timestamp data your OS relies on
- the format of the datestamp inside of the feed and PHP's ability to parse it
in DeepTypeTrait at line 40
protected Node
getScalarSingleValue(object $root, string $nodeName, string|null $namespaceAlias = null)
Retrieves nodes that are simple scalars, and there is only one allowed value.
in DeepTypeTrait at line 68
protected TypeInterface
getComplexSingleValue(object $root, string $nodeName, string $className, string|null $namespaceAlias = null)
Retrieves nodes that are complex types, and there is only one allowed value.
in DeepTypeTrait at line 96
protected iterable
getComplexMultipleValues(object $root, string $nodeName, string|null $namespaceAlias = null)
Retrieves nodes that are complex types, and there may be are more than one value.
in LoggerTrait at line 35
LoggerTrait
setLogger(LoggerInterface $logger)
Sets the PSR-3 logger.
in LoggerTrait at line 52
LoggerInterface
getLogger()
Retrieves the PSR-3 logger.
at line 74
__construct(string $namespaceAlias)
Constructs a new instance of this class.
at line 84
string
getDefaultNs()
Finds the default namespace alias for the feed type.
at line 96
string
getAlias(string $nodeName)
Finds the common internal alias for a given method name.
at line 146
Node
getHandler(string $nodeName, array $args = [])
Get the correct handler for a whitelisted method name.
at line 54
array
getAuthors(string $namespaceAlias)
Returns the Authors associated with this feed.
at line 54
array
getCategories(string $namespaceAlias)
Returns the list of Categories/Tags/Topics associated with this feed.
at line 54
array
getContributors(string $namespaceAlias)
Returns the list of Contributors associated with this feed.
at line 54
array
getEntries(string $namespaceAlias)
Returns the list of Entries/Items associated with this feed.
at line 54
Generator
getGenerator(string $namespaceAlias)
Returns the Generator associated with this feed.
at line 54
array
getItems(string $namespaceAlias)
Alias for getEntries()
.
at line 54
array
getLinks(string $namespaceAlias, string $relFilter)
Returns the list of Links associated with this feed.
at line 54
DateTime
getPublished(string $namespaceAlias)
Returns the date that the feed was published.
at line 54
Node
getRights(string $namespaceAlias)
Returns the copyright information associated with this feed.