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

A type model for a Person 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 Node $name The person's name.
protected Node $uri The person's URL.
protected Node $url The person's URL.
protected Node $email The person's email address.
protected Node $avatar The person's avatar.

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.

getAvatar()

Returns the avatar URL of the Person.

getEmail()

Returns the email address of the Person.

getName()

Returns the name of the Person.

getUri()

Alias for getUrl().

getUrl()

Returns the URL of the Person.

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 getAvatar()

Returns the avatar URL of the Person.

Return Value

Node

Node getEmail()

Returns the email address of the Person.

Return Value

Node

Node getName()

Returns the name of the Person.

Return Value

Node

Node getUri()

Alias for getUrl().

Return Value

Node

Node getUrl()

Returns the URL of the Person.

Return Value

Node