Files
yaac/src/Data/File.php
peterbakker b7ff268e4e Improved http validation with exponential backoff
Added documentation
Simplified HTTP validation flow (no longer need challenge to get file contents)
Updated README.md
2020-03-18 19:31:57 +01:00

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;
}
}