Skip to content

Commit

Permalink
Added contract for file class
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoboss committed Nov 11, 2021
1 parent f80b97d commit 3784992
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/Files/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
],
"require": {
"php": ">=8.1",
"elephox/http": "dev-main",
"elephox/support": "dev-main",
"jetbrains/phpstorm-attributes": "^1.0"
},
"autoload": {
Expand Down
27 changes: 27 additions & 0 deletions modules/Files/src/Contract/File.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);

namespace Elephox\Files\Contract;

use DateTime;
use Elephox\Http\Contract\MimeType;
use Elephox\Support\Contract\HasHash;

interface File extends HasHash
{
public function getPath(): string;

public function getName(): string;

public function getExtension(): string;

public function getSize(): int;

public function getMimeType(): ?MimeType;

public function getModifiedTime(): DateTime;

public function getCreatedTime(): DateTime;

public function getContents(): string;
}

0 comments on commit 3784992

Please sign in to comment.