public function putToJson($data)
    {
        $path = $this->getStoragePath();

        //check if the storage path is writable
        if (!is_writable($path)) {
            throw new \InvalidArgumentException('The storage_path option in your '.$this->getOption('name').' settings config is not writable');
        }

        file_put_contents($path.$this->getOption('name').'.json', json_encode($data));
    }
public function putToJson($data)
    {
        $path = $this->getStoragePath();

        //check if the storage path is writable
        if (!is_writable($path)) {
            throw new \InvalidArgumentException('The storage_path option in your '.$this->getOption('name').' settings config is not writable');
        }

        file_put_contents($path.$this->getOption('name').'.json', json_encode($data));
    }
public function putToJson ( $ data ) { $ path = $ this -> getStoragePath ( ) ; //check if the storage path is writable if ( ! is_writable ( $ path ) ) { throw new \ InvalidArgumentException ( 'The storage_path option in your ' . $ this -> getOption ( 'name' ) . ' settings config is not writable' ) ; } file_put_contents ( $ path . $ this -> getOption ( 'name' ) . '.json' , json_encode ( $ data ) ) ; }
Puts the data contents into the json file.

@param array $data
Puts the data contents into the json file .