Назначение формата

This commit is contained in:
Podlesnov Phedor 2021-06-23 15:32:30 +03:00
parent 7b2827e96f
commit d24561c652

View file

@ -14,9 +14,9 @@ class Settings extends Collection
protected $file;
protected $format = 'php';
public function __construct ($file = null)
public function __construct ($file = null, $format = false)
{
$this->format = pathinfo($file, PATHINFO_EXTENSION);
$this->format = $format ? $format : pathinfo($file, PATHINFO_EXTENSION);
$this->file = $file;
}