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

A type model for an Image 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 $uri The image element's URL.
protected string $title The image element's title.
$link The image element's link.
protected int $width The image element's width, in pixels.
protected int $height The image element's height, in pixels.
protected string $description The image element's description.

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.

getDescription()

Returns the description of the Image.

getHeight()

Returns the height of the Image.

getLink()

Returns to where the Image should be linked.

getTitle()

Returns the title of the Image.

getUri()

Alias for getUrl().

getUrl()

Returns the URL of the Image.

getWidth()

Returns the width of the Image.

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

Returns the description of the Image.

Return Value

Node

Node getHeight()

Returns the height of the Image.

Return Value

Node

Returns to where the Image should be linked.

Return Value

Node

Node getTitle()

Returns the title of the Image.

Return Value

Node

Node getUri()

Alias for getUrl().

Return Value

Node

Node getUrl()

Returns the URL of the Image.

Return Value

Node

Node getWidth()

Returns the width of the Image.

Return Value

Node