Back to FeedEntry class

Method setAuthor

public \Joomla\CMS\Feed\FeedEntry
setAuthor
(mixed $name, mixed $email, mixed $uri = null, mixed $type = null)
Shortcut method to set the author for the feed entry object.
Parameters
  • string $name The full name of the person to set.
  • string $email The email address of the person to set.
  • string $uri The optional URI for the person to set.
  • string $type The optional type of person to set.
Returns
  • \Joomla\CMS\Feed\FeedEntry
Since
  • 3.1.4
Class: FeedEntry
Project: Joomla

Method setAuthor - Source code

/**
 * Shortcut method to set the author for the feed entry object.
 *
 * @param   string  $name   The full name of the person to set.
 * @param   string  $email  The email address of the person to set.
 * @param   string  $uri    The optional URI for the person to set.
 * @param   string  $type   The optional type of person to set.
 *
 * @return  FeedEntry
 *
 * @since   3.1.4
 */
public function setAuthor($name, $email, $uri = null, $type = null)
{
    $author = new FeedPerson($name, $email, $uri, $type);
    $this->properties['author'] = $author;
    return $this;
}