for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace LoteriaApi;
class Config
{
private $apiPath;
private $directory;
private $filename;
private $ext;
public function setApiPath($apiPath)
$this->apiPath = $apiPath;
return $this;
}
public function setDirectory($directory)
$this->directory = $directory;
public function setFileName($filename)
$this->filename = $filename;
public function setExt($ext)
$this->ext = $ext;
public function getData()
$file = $this->apiPath .
$this->directory . DS .
$this->filename . '.' .
$this->ext;
if (!is_file($file)) {
throw new \Exception('File does not exist');
return parse_ini_file($file, true);