class Category extends AbstractType implements NodeInterface, TypeInterface, SetLoggerInterface (View source)

A type model for a Category/Tag/Topic element.

Traits

Shared code for working with the logger.

Properties

protected LoggerInterface $logger A PSR-3 logger. from LoggerTrait
protected DOMNode $node The DOMNode element to parse.
protected string $term The category term.
protected string $scheme The category scheme URI.
protected string $label The category label.

Methods

__call(string $nodeName, array $args)

Proxy method which forwards requests to an underlying handler.

string
getUnresolvableMessage(string $nodeName)

Gets the standard, pre-formatted message for unresolvable method calls.

setLogger(LoggerInterface $logger)

Sets the PSR-3 logger.

getLogger()

Retrieves the PSR-3 logger.

__construct(DOMNode|null $node = null, LoggerInterface $logger = null)

Constructs a new instance of this class.

string
__toString()

Converts this object into a string representation.

DOMNode|null
getNode()

Gets the DOMNode element.

string
getAlias(string $nodeName)

Finds the common internal alias for a given method name.

getHandler(string $nodeName, array $args = [])

Get the correct handler for a whitelisted method name.

getLabel()

Returns the label of the Category.

getScheme()

Returns the scheme of the Category.

getTerm()

Returns the term of the Category.

Details

__call(string $nodeName, array $args)

Proxy method which forwards requests to an underlying handler.

Parameters

string $nodeName The name of the method being called.
array $args Any arguments passed into that method.

protected string getUnresolvableMessage(string $nodeName)

Gets the standard, pre-formatted message for unresolvable method calls.

Parameters

string $nodeName The short version of the call (without the get).

Return Value

string

LoggerTrait setLogger(LoggerInterface $logger)

Sets the PSR-3 logger.

Parameters

LoggerInterface $logger A PSR-3 compatible logger.

Return Value

LoggerTrait

LoggerInterface getLogger()

Retrieves the PSR-3 logger.

Return Value

LoggerInterface

__construct(DOMNode|null $node = null, LoggerInterface $logger = null)

Constructs a new instance of this class.

Parameters

DOMNode|null $node The DOMNode element to parse.
LoggerInterface $logger The PSR-3 logger.

string __toString()

Converts this object into a string representation.

Return Value

string

DOMNode|null getNode()

Gets the DOMNode element.

Return Value

DOMNode|null

string getAlias(string $nodeName)

Finds the common internal alias for a given method name.

Parameters

string $nodeName The name of the method being called.

Return Value

string

Node getHandler(string $nodeName, array $args = [])

Get the correct handler for a whitelisted method name.

Parameters

string $nodeName The name of the method being called.
array $args The parameters which are passed to the method.

Return Value

Node

Exceptions

SimplePieException

Node getLabel()

Returns the label of the Category.

Return Value

Node

Node getScheme()

Returns the scheme of the Category.

Return Value

Node

Node getTerm()

Returns the term of the Category.

Return Value

Node