如何改变goutte的guzzle属性?

<?php
require_once '/var/www/goutte.phar';
 use Goutte\Client; 


 $guzzle = parent::getClient(); //You'll want to pull the Guzzle client out of Goutte to inherit its defaults
$guzzle->setDefaultOption('verify', '/path/to/cacert.pem'); //Set the certificate at @mtdowling recommends
$client->setClient($guzzle); //Tell Goutte to use your modified Guzzle client 

$crawler = $client->request('GET', 'https://ocean.ac-guadeloupe.fr/publinet/resultats'); //Proceed as you were
var_dump($crawler);
?>

When i run the above code I get the error "Cannot access parent:: when no class scope is active". So how to access Guzzle properties from Goutte?

The start of the sample seems to assume you are writing an extension of the Goutte Client class. If you are just using the class, the snippet is more like:

$client = new Client();
$guzzle = $client->getClient(); //You'll want to pull the Guzzle client out of Goutte to inherit its defaults

$guzzle->setDefaultOption('verify', '/path/to/cacert.pem'); //Set the certificate at @mtdowling recommends
$client->setClient($guzzle); //Tell Goutte to use your modified Guzzle client 

$crawler = $client->request('GET', 'https://ocean.ac-guadeloupe.fr/publinet/resultats'); //Proceed as you were
var_dump($crawler);