first code

This commit is contained in:
Bryan Joshua Pedini 2020-12-30 12:28:39 +01:00
parent 2de26a845d
commit 52d78e01bb
1 changed files with 24 additions and 0 deletions

24
Object.php Normal file
View File

@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
class get_include_contents {
private string $file;
private string $content;
public function __construct(string $file) {
$this->file = $file;
}
public function parse():void {
if(is_file($this->file) !== TRUE) {
die("The requested file is not available");
}
ob_start();
include $this->file;
$this->content = ob_get_clean();
}
public function return():string {
return $this->content;
}
}