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

Class: Services_Yahoo_Search_AbstractSearch

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

Class Overview


Abstract search class


Author(s):

Version:

  • CVS: $Id: AbstractSearch.php,v 1.11 2006/10/04 13:30:31 mj Exp $

Copyright:

  • 2005-2006 Martin Jansen

Variables

Methods


Child classes:

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

Inherited Variables

Inherited Methods


Class Details

[line 47]
Abstract search class

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



[ Top ]


Class Variables

$parameters = array("appid" => "PEAR_Services_Yahoo", "output" => "php")

[line 49]

  • Access: protected

Type:   mixed


[ Top ]



Method Detail

adultContentOK   [line 206]

Services_Yahoo_AbstractSearch adultContentOK( )

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.

  • Return: Object which contains the method
  • Access: public

[ Top ]

inFormat   [line 190]

Services_Yahoo_AbstractSearch inFormat( 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.

  • Return: Object which contains the method
  • Access: public

Parameters:

string   $format   —  Format of search

[ Top ]

searchFor   [line 62]

object Services_Yahoo_Response searchFor( $query)

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

Parameters:

   $query   — 

[ Top ]

startingAt   [line 169]

Services_Yahoo_AbstractSearch startingAt( 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.

  • Return: Object which contains the method
  • Access: public

Parameters:

int   $start   —  Starting position

[ Top ]

withAppID   [line 110]

Services_Yahoo_AbstractSearch withAppID( 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 ]

withResults   [line 148]

Services_Yahoo_AbstractSearch withResults( 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.

  • Return: Object which contains the method
  • Access: public

Parameters:

int   $count   —  Number of results

[ Top ]

withType   [line 131]

Services_Yahoo_AbstractSearch withType( 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.

  • Return: Object which contains the method
  • Access: public

Parameters:

string   $type   —  Kind of search

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:00:17 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.