public function open()
    {
        $fileSystem = $this->createNew(FileSystem::class);

        $filepath = $this->getFilepath();

        $contents = $fileSystem->fileGetContents($filepath);

        $this->configData = json_decode($contents, true);

        if (isset($this->configData) == false) {
            throw new MalformedDataException('The contents of the file "'.$filepath.'" are not valid json');
        }
        $this->validateConfig($this->rules, $this->configData);
    }
public function open()
    {
        $fileSystem = $this->createNew(FileSystem::class);

        $filepath = $this->getFilepath();

        $contents = $fileSystem->fileGetContents($filepath);

        $this->configData = json_decode($contents, true);

        if (isset($this->configData) == false) {
            throw new MalformedDataException('The contents of the file "'.$filepath.'" are not valid json');
        }
        $this->validateConfig($this->rules, $this->configData);
    }
public function open ( ) { $ fileSystem = $ this -> createNew ( FileSystem :: class ) ; $ filepath = $ this -> getFilepath ( ) ; $ contents = $ fileSystem -> fileGetContents ( $ filepath ) ; $ this -> configData = json_decode ( $ contents , true ) ; if ( isset ( $ this -> configData ) == false ) { throw new MalformedDataException ( 'The contents of the file "' . $ filepath . '" are not valid json' ) ; } $ this -> validateConfig ( $ this -> rules , $ this -> configData ) ; }
Open the config file and populate the config data

@throws Mooti\Framework\Exception\MalformedDataException
Open the config file and populate the config data