10-13-2010, 12:24 AM
[eluser]CroNiX[/eluser]
although personally I would add the urlencode and everything else to the __toSting method and just pass $showLocation to that.
and in your library, in
Then you dont even need the setter.
although personally I would add the urlencode and everything else to the __toSting method and just pass $showLocation to that.
Code:
foreach($this->address as $showLocation){
$coord = $this->remoteconnector->__toString($showLocation); //get the string contents of the remote file
echo $showLocation." | ".$coord."\n";
}
Code:
function __toString($url) {
$location = array("url"=>"http://tinygeocoder.com/create-api.php?q=" . urlencode($url);
....
return $coordinate;
}