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

Class: Services_Yahoo_Search_AbstractSearch

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

Class Overview


Abstract search class


Author(s):

Version:

  • CVS: $Id: AbstractSearch.php,v 1.2 2005/03/22 11:53:41 mj Exp $

Copyright:

  • 2005 Martin Jansen

Methods


Child classes:

Services_Yahoo_Search_image
Image search class
Services_Yahoo_Search_local
Local search class
Services_Yahoo_Search_news
News search class
Services_Yahoo_Search_video
Video search class
Services_Yahoo_Search_web
Web search class

Inherited Variables

Inherited Methods


Class Details

[line 41]
Abstract search class

This abstract class serves as the base class for all different types of searches that available through Services_Yahoo.



[ Top ]


Method Detail

setAdultOK   [line 185]

void setAdultOK( )

Set that the results will include adult content

Even if not all searches support this parameter, it is common enough to be part of the abstract base class.

  • Access: public

[ Top ]

setAppID   [line 93]

void setAppID( string $id)

Set Application ID for the search

An Application ID is a string that uniquely identifies your application. Think of it as like a User-Agent string. If you have multiple applications, you should use a different ID for each one. You can register your ID and make sure nobody is already using your ID on Yahoo's Application ID registration page.

The ID defaults to "PEAR_Services_Yahoo", but you are free to change it to whatever you want. Please note that the access to the Yahoo API is not limited via the Application ID but via the IP address of the host where the package is used.


Parameters:

string   $id     Application ID

[ Top ]

setFormat   [line 172]

void setFormat( string $format)

Set the format to search for

The allowed values of the parameter depend on the search type. If unsure, please consult Yahoo's documentation at http://developer.yahoo.net/.

Even if not all searches support this parameter, it is common enough to be part of the abstract base class.

  • Access: public

Parameters:

string   $format     Format of search

[ Top ]

setQuery   [line 104]

void setQuery( string $query)

Set the query to search for
  • Access: public

Parameters:

string   $query     Query to search for

[ Top ]

setResultNumber   [line 136]

void setResultNumber( int $count)

Set the number of results to return.

Even if not all searches support this parameter, it is common enough to be part of the abstract base class.

  • Access: public

Parameters:

int   $count     Number of results

[ Top ]

setStart   [line 154]

void setStart( int $start)

Set the starting result position to return (1-based)

Even if not all searches support this parameter, it is common enough to be part of the abstract base class.

  • Access: public

Parameters:

int   $start     Starting position

[ Top ]

setType   [line 122]

void setType( string $type)

Set the kind of search to submit

The allowed values of the parameter depend on the search type. If unsure, please consult Yahoo's documentation at http://developer.yahoo.net/.

Even if not all searches support this parameter, it is common enough to be part of the abstract base class.

  • Access: public

Parameters:

string   $type     Kind of search

[ Top ]

submit   [line 56]

object Services_Yahoo_Response submit( )

Submits the search

This method submits the search and handles the response. It returns an instance of Services_Yahoo_Result which may be used to further make use of the result.

  • Return: Search result
  • Throws: Services_Yahoo_Exception
  • Access: public

[ Top ]


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