mirror of
https://github.com/anikeen-com/yaac.git
synced 2026-03-13 13:46:10 +00:00
Added documentation Simplified HTTP validation flow (no longer need challenge to get file contents) Updated README.md
47 lines
780 B
PHP
47 lines
780 B
PHP
<?php
|
|
|
|
namespace Afosto\Acme\Data;
|
|
|
|
class File
|
|
{
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected $filename;
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected $contents;
|
|
|
|
/**
|
|
* File constructor.
|
|
* @param string $filename
|
|
* @param string $contents
|
|
*/
|
|
public function __construct(string $filename, string $contents)
|
|
{
|
|
$this->contents = $contents;
|
|
$this->filename = $filename;
|
|
}
|
|
|
|
/**
|
|
* Return the filename for HTTP validation
|
|
* @return string
|
|
*/
|
|
public function getFilename(): string
|
|
{
|
|
return $this->filename;
|
|
}
|
|
|
|
/**
|
|
* Return the file contents for HTTP validation
|
|
* @return string
|
|
*/
|
|
public function getContents(): string
|
|
{
|
|
return $this->contents;
|
|
}
|
|
}
|