public function store($localFile, $desiredName) { $xml = simplexml_load_string(parent::store($localFile, $desiredName)); if (isset($xml->error)) { throw new Exception('Couldn`t save file to ImageShack: ' . $xml->error); } return (string) $xml->links->image_link; }
public function store($localFile, $desiredName) { $result = json_decode(parent::store($localFile, $desiredName)); return $result['file_name']; }