Sujet : Hoa_File et Hoa_Stream
Hey,
J'ai voulu tester Hoa_Database. J'ai éffectuer la mise a jour du trunk hier soir (hummm belle mise a jour !) mais une erreur est apparue.
Fatal error: Cannot instantiate abstract class Hoa_File in C:\wamp\www\ivelo.fr\Framework\Module\Weather\Weather.php on line 133Voici mon bout de code
if (is_null($city_code))
throw new Hoathis_Weather_Exception('Argument 1: city_code could not be null', 0);
$this->city_code = $city_code;
$this->lang = $lang;
Hoa_Stream_Context::getInstance('google_weather', 'http')->addOptions(array(
'timeout' => 30
));
try {
$content = new Hoa_File(
sprintf(self::URL, urlencode($this->city_code), $this->lang),
Hoa_File::MODE_READ,
'google_weather'
);
}
catch ( Hoa_File_Exception $e ) {
throw new Hoathis_Weather_Exception(
$e->getFormattedMessage(),
$e->getCode()
);
}
$this->reponse = Hoa_Xml::parse(utf8_encode($content->readAll()), null);
if (!$this->reponse)
throw new Hoa_Weather_Exception('Parsing error', 1);
if (isset($xml->weather->problem_cause))
throw new Hoa_Weather_Exception('Service weather not found', 2);
$this->getCurrentCity();
$this->getCurrentConditions();
$this->getForecastConditions();
return $this->current_conditions;La ligne 133 est
$content = new Hoa_File(Comment puis je régler ça ?
Merci d'avance