protected function getFilename($collection)
    {
        $file = rtrim($this->storageDir, '/').'/'.$collection;

        if (!file_exists($file)) {
            file_put_contents($file, serialize([]));
            chmod($file, 0777);
        }

        return $file;
    }
protected function getFilename($collection)
    {
        $file = rtrim($this->storageDir, '/').'/'.$collection;

        if (!file_exists($file)) {
            file_put_contents($file, serialize([]));
            chmod($file, 0777);
        }

        return $file;
    }
protected function getFilename ( $ collection ) { $ file = rtrim ( $ this -> storageDir , '/' ) . '/' . $ collection ; if ( ! file_exists ( $ file ) ) { file_put_contents ( $ file , serialize ( [ ] ) ) ; chmod ( $ file , 0777 ) ; } return $ file ; }
Get the corresponding file path for a given collection

@param $collection
@return string
Get the corresponding file path for a given collection