public function read(string $filename = null, string $data = null): Interfaces\Yaml
    {
        try {
            $yaml = !empty($data)
                ? Import::fromData($data)
                : Import::fromFile($filename);

            $this->set($yaml);

        } catch (YamlException $e) {
            !$this->_strict ?: die();
        }

        return $this;
    }
public function read(string $filename = null, string $data = null): Interfaces\Yaml
    {
        try {
            $yaml = !empty($data)
                ? Import::fromData($data)
                : Import::fromFile($filename);

            $this->set($yaml);

        } catch (YamlException $e) {
            !$this->_strict ?: die();
        }

        return $this;
    }
public function read ( string $ filename = null , string $ data = null ) : Interfaces \ Yaml { try { $ yaml = ! empty ( $ data ) ? Import :: fromData ( $ data ) : Import :: fromFile ( $ filename ) ; $ this -> set ( $ yaml ) ; } catch ( YamlException $ e ) { ! $ this -> _strict ? : die ( ) ; } return $ this ; }
Read Yaml from file

@param   string|null $filename - File or URL with Yaml inside
@param   string|null $data - Plain Yaml
@return  Yaml
Read Yaml from file