Services_Yahoo
[ class tree: Services_Yahoo ] [ index: Services_Yahoo ] [ all elements ]

Class: Services_Yahoo_Search_local

Source Location: /Services_Yahoo-0.1.0/Yahoo/Search/local.php

Class Overview

Services_Yahoo_Search_AbstractSearch
   |
   --Services_Yahoo_Search_local

Local search class


Author(s):

Version:

  • CVS: $Id: local.php,v 1.2 2005/04/14 11:29:14 mj Exp $

Copyright:

  • 2005 Martin Jansen

Methods


Inherited Variables

Inherited Methods

Class: Services_Yahoo_Search_AbstractSearch

Services_Yahoo_Search_AbstractSearch::setAdultOK()
Set that the results will include adult content
Services_Yahoo_Search_AbstractSearch::setAppID()
Set Application ID for the search
Services_Yahoo_Search_AbstractSearch::setFormat()
Set the format to search for
Services_Yahoo_Search_AbstractSearch::setQuery()
Set the query to search for
Services_Yahoo_Search_AbstractSearch::setResultNumber()
Set the number of results to return.
Services_Yahoo_Search_AbstractSearch::setStart()
Set the starting result position to return (1-based)
Services_Yahoo_Search_AbstractSearch::setType()
Set the kind of search to submit
Services_Yahoo_Search_AbstractSearch::submit()
Submits the search

Class Details

[line 41]
Local search class

This class implements an interface to Yahoo's Local search by using the Yahoo API.



[ Top ]


Method Detail

setCity   [line 77]

void setCity( string $city)

Set the city name
  • Access: public

Parameters:

string   $city     City name

[ Top ]

setLocation   [line 131]

void setLocation( string $text)

Set a location description

This free field lets users enter any of the following:

  • city, state
  • city, state, ZIP
  • ZIP
  • street, city, state
  • street, city, state, ZIP
  • street, ZIP
If location is specified, it will take priority over the individual fields in determining the location for the query. City, state and ZIP will be ignored.

  • Access: public

Parameters:

string   $text     Location description

[ Top ]

setRadius   [line 53]

void setRadius( string $radius)

Set how far (in miles) from the specified location to search for the query terms

The default radius varies according to the location given.

  • Access: public

Parameters:

string   $radius     Radius as a float number

[ Top ]

setState   [line 92]

void setState( string $state, string 1)

Set the United States state

Parameters:

string   1     State name
string   $state     State name. You can spell out the full state name or you can use the two-letter abbreviation.

[ Top ]

setStreet   [line 66]

void setStreet( string $street)

Set the street name

The number is optional.

  • Access: public

Parameters:

string   $street     Name of the street

[ Top ]

setZIP   [line 108]

void setZIP( string $code)

Set the ZIP code

The parameter can be a five-digit ZIP code, or the five-digit code plus four-digit extension. If this location contradicts the city and state specified, the ZIP code will be used for determining the location and the city and state will be ignored.

  • Access: public

Parameters:

string   $code     ZIP code as described

[ Top ]


Documentation generated on Mon, 06 Jun 2005 07:30:11 -0400 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.