for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the NeedleProject\FileIo package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace NeedleProject\FileIo\Content;
* Class Content
* @package NeedleProject\FileIo\Content
* @author Adrian Tilita <[email protected]>
* @copyright 2017 Adrian Tilita
* @license https://opensource.org/licenses/MIT MIT Licence
class Content implements ContentInterface
{
* @var null|string
private $content = null;
* Content constructor.
* @param string $content
public function __construct(string $content)
$this->content = $content;
}
* @return string
public function get(): string
return $this->content;
* Return the content as an array
* @return array
* @throws \NeedleProject\FileIo\Exception\ContentException
public function getArray(): array
return [$this->content];
* @return mixed|\stdClass
public function getObject()
return (object)['content' => $this->content];