protected function readMetadata()
    {
        if ($this->metadata !== null) {
            return;
        }

        $line = fgets($this->getFileHandler());

        if (trim($line) !== '[') {
            throw new \InvalidArgumentException('Given file does not match expected pattern.');
        }

        $line = trim(fgets($this->getFileHandler()));
        $this->metadata = json_decode(rtrim($line, ','), true);
    }
protected function readMetadata()
    {
        if ($this->metadata !== null) {
            return;
        }

        $line = fgets($this->getFileHandler());

        if (trim($line) !== '[') {
            throw new \InvalidArgumentException('Given file does not match expected pattern.');
        }

        $line = trim(fgets($this->getFileHandler()));
        $this->metadata = json_decode(rtrim($line, ','), true);
    }
protected function readMetadata ( ) { if ( $ this -> metadata !== null ) { return ; } $ line = fgets ( $ this -> getFileHandler ( ) ) ; if ( trim ( $ line ) !== '[' ) { throw new \ InvalidArgumentException ( 'Given file does not match expected pattern.' ) ; } $ line = trim ( fgets ( $ this -> getFileHandler ( ) ) ) ; $ this -> metadata = json_decode ( rtrim ( $ line , ',' ) , true ) ; }
Reads metadata from file.

@throws \InvalidArgumentException
Reads metadata from file .