for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Pilipinews\Common;
/**
* Article
*
* @package Pilipinews
* @author Rougin Gutib <[email protected]>
*/
class Article
{
* @var string
protected $body = '';
protected $title = '';
protected $link = '';
* Initializes the article instance.
* @param string $title
* @param string $body
* @param string|null $link
public function __construct($title, $body, $link = null)
$this->body = $body;
$this->title = $title;
$this->link = $link;
}
* Returns the body content.
* @return string
public function body()
return $this->body;
* Returns the source link.
public function link()
return $this->link;
* Returns both title and body content.
public function post()
return mb_strtoupper($this->title, 'UTF-8') . "\n\n" . $this->body;
* Returns the title text.
public function title()
return $this->title;