Loading custom libraries

#7
[eluser]CroNiX[/eluser]
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";
}
and in your library, in
Code:
function __toString($url) {
    $location = array("url"=>"http://tinygeocoder.com/create-api.php?q=" . urlencode($url);
    ....
    return $coordinate;
}
Then you dont even need the setter.


Messages In This Thread
Loading custom libraries - by El Forum - 10-12-2010, 08:50 PM
Loading custom libraries - by El Forum - 10-12-2010, 11:16 PM
Loading custom libraries - by El Forum - 10-12-2010, 11:31 PM
Loading custom libraries - by El Forum - 10-12-2010, 11:48 PM
Loading custom libraries - by El Forum - 10-12-2010, 11:58 PM
Loading custom libraries - by El Forum - 10-13-2010, 12:14 AM
Loading custom libraries - by El Forum - 10-13-2010, 12:24 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.