Previous Next

Zend_Service_Yahoo

Introduction

Zend_Service_Yahoo is a simple API for using many of the Yahoo! REST APIs. Zend_Service_Yahoo allows you to search Yahoo! Web search, Yahoo! News, Yahoo! Local, Yahoo! Images. In order to use the Yahoo! REST API, you must have a Yahoo! Application ID. To obtain an Application ID, please complete and submit the » Application ID Request Form.

Searching the Web with Yahoo!

Zend_Service_Yahoo enables you to search the Web with Yahoo! using the webSearch() method, which accepts a string query parameter and an optional second parameter as an array of search options. For full details and an option list, please visit the » Yahoo! Web Search Documentation. The webSearch() method returns a Zend_Service_Yahoo_WebResultSet object.

Ejemplo #1 Searching the Web with Yahoo!

$yahoo = new Zend_Service_Yahoo("YAHOO_APPLICATION_ID");
$results = $yahoo->webSearch('PHP');
foreach ($results as $result) {
    echo $result->Title .'
'; }

Finding Images with Yahoo!

You can search for Images with Yahoo using Zend_Service_Yahoo's imageSearch() method. This method accepts a string query parameter and an optional array of search options, as for the webSearch() method. For full details and an option list, please visit the » Yahoo! Image Search Documentation.

Ejemplo #2 Finding Images with Yahoo!

$yahoo = new Zend_Service_Yahoo("YAHOO_APPLICATION_ID");
$results = $yahoo->imageSearch('PHP');
foreach ($results as $result) {
    echo $result->Title .'
'; }

Finding videos with Yahoo!

You can search for videos with Yahoo using Zend_Service_Yahoo's videoSearch() method. For full details and an option list, please visit the » Yahoo! Video Search Documentation.

Ejemplo #3 Finding videos with Yahoo!

$yahoo = new Zend_Service_Yahoo("YAHOO_APPLICATION_ID");
$results = $yahoo->videoSearch('PHP');
foreach ($results as $result) {
    echo $result->Title .'
'; }

Finding Local Businesses and Services with Yahoo!

You can search for local businesses and services with Yahoo! by using the localSearch() method. For full details, please see the » Yahoo! Local Search Documentation.

Ejemplo #4 Finding Local Businesses and Services with Yahoo!

$yahoo = new Zend_Service_Yahoo("YAHOO_APPLICATION_ID");
$results = $yahoo->localSearch('Apple Computers', array('zip' => '95014'));
foreach ($results as $result) {
    echo $result->Title .'
'; }

Searching Yahoo! News

Searching Yahoo! News is simple; just use the newsSearch() method, as in the following example. For full details, please see the » Yahoo! News Search Documentation.

Ejemplo #5 Searching Yahoo! News

$yahoo = new Zend_Service_Yahoo("YAHOO_APPLICATION_ID");
$results = $yahoo->newsSearch('PHP');
foreach ($results as $result) {
    echo $result->Title .'
'; }

Searching Yahoo! Site Explorer Inbound Links

Searching Yahoo! Site Explorer Inbound Links is simple; just use the inlinkDataSearch() method, as in the following example. For full details, please see the » Yahoo! Site Explorer Inbound Links Documentation.

Ejemplo #6 Searching Yahoo! Site Explorer Inbound Links

$yahoo = new Zend_Service_Yahoo("YAHOO_APPLICATION_ID");
$results = $yahoo->inlinkDataSearch('http://framework.zend.com/');
foreach ($results as $result) {
    echo $result->Title .'
'; }

Searching Yahoo! Site Explorer's PageData

Searching Yahoo! Site Explorer's PageData is simple; just use the pageDataSearch() method, as in the following example. For full details, please see the » Yahoo! Site Explorer PageData Documentation.

Ejemplo #7 Searching Yahoo! Site Explorer's PageData

$yahoo = new Zend_Service_Yahoo("YAHOO_APPLICATION_ID");
$results = $yahoo->pageDataSearch('http://framework.zend.com/');
foreach ($results as $result) {
    echo $result->Title .'
'; }

Zend_Service_Yahoo Classes

The following classes are all returned by the various Yahoo! searches. Each search type returns a type-specific result set which can be easily iterated, with each result being contained in a type result object. All result set classes implement the SeekableIterator interface, allowing for easy iteration and seeking to a specific result.

Zend_Service_Yahoo_ResultSet

Each of the search specific result sets is extended from this base class.

Each of the specific result sets returns a search specific Zend_Service_Yahoo_Result objects.

Zend_Service_Yahoo_ResultSet::totalResults()

int totalResults ( void )

Returns the number of results returned for the search.

Properties

Zend_Service_Yahoo_ResultSet
Name Type Description
totalResultsAvailable int Total number of results found.
totalResultsReturned int Number of results in the current result set
firstResultPosition int Position of the first result in this set relative to the total number of results.

Back to Class List

Zend_Service_Yahoo_WebResultSet

Zend_Service_Yahoo_WebResultSet represents a Yahoo! Web Search result set.

Nota:

Zend_Service_Yahoo_WebResultSet extends Zend_Service_Yahoo_ResultSet

Back to Class List

Zend_Service_Yahoo_ImageResultSet

Zend_Service_Yahoo_ImageResultSet represents a Yahoo! Image Search result set.

Nota:

Zend_Service_Yahoo_ImageResultSet extends Zend_Service_Yahoo_ResultSet

Back to Class List

Zend_Service_Yahoo_VideoResultSet

Zend_Service_Yahoo_VideoResultSet represents a Yahoo! Video Search result set.

Nota:

Zend_Service_Yahoo_VideoResultSet extends Zend_Service_Yahoo_ResultSet

Back to Class List

Zend_Service_Yahoo_LocalResultSet

Zend_Service_Yahoo_LocalResultSet represents a Yahoo! Local Search result set.

Zend_Service_Yahoo_LocalResultSet Properties
Name Type Description
resultSetMapURL string The URL of a webpage containing a map graphic with all returned results plotted on it.

Nota:

Zend_Service_Yahoo_LocalResultSet extends Zend_Service_Yahoo_ResultSet

Back to Class List

Zend_Service_Yahoo_NewsResultSet

Zend_Service_Yahoo_NewsResultSet represents a Yahoo! News Search result set.

Nota:

Zend_Service_Yahoo_NewsResultSet extends Zend_Service_Yahoo_ResultSet

Back to Class List

Zend_Service_Yahoo_InlinkDataResultSet

Zend_Service_Yahoo_InlinkDataResultSet represents a Yahoo! Inbound Link Search result set.

Nota:

Zend_Service_Yahoo_InlinkDataResultSet extends Zend_Service_Yahoo_ResultSet

Back to Class List

Zend_Service_Yahoo_PageDataResultSet

Zend_Service_Yahoo_PageDataResultSet represents a Yahoo! PageData Search result set.

Nota:

Zend_Service_Yahoo_PageDataResultSet extends Zend_Service_Yahoo_ResultSet

Back to Class List

Zend_Service_Yahoo_Result

Each of the search specific results is extended from this base class.

Properties

Zend_Service_Yahoo_Result Properties
Name Type Description
Title string Title of the Result item
Url string The URL of the result item
ClickUrl string The URL for linking to the result item

Back to Class List

Zend_Service_Yahoo_WebResult

Each Web Search result is returned as a Zend_Service_Yahoo_WebResult object.

Properties

Zend_Service_Yahoo_WebResult Properties
Name Type Description
Summary string Result summary
MimeType string Result MIME type
ModificationDate string The last modification date of the result as a UNIX timestamp.
CacheUrl string Yahoo! web cache URL for the result, if it exists.
CacheSize int The size of the Cache entry

Back to Class List

Zend_Service_Yahoo_ImageResult

Each Image Search result is returned as a Zend_Service_Yahoo_ImageResult object.

Properties

Zend_Service_Yahoo_ImageResult Properties
Name Type Description
Summary string Result summary
RefererUrl string The URL of the page which contains the image
FileSize int The size of the image file in bytes
FileFormat string The format of the image (bmp, gif, jpeg, png, etc.)
Height int The height of the image
Width int The width of the image
Thumbnail Zend_Service_Yahoo_Image Image thumbnail

Back to Class List

Zend_Service_Yahoo_VideoResult

Each Video Search result is returned as a Zend_Service_Yahoo_VideoResult object.

Properties

Zend_Service_Yahoo_VideoResult Properties
Name Type Description
Summary string Result summary
RefererUrl string The URL of the page which contains the video
FileSize int The size of the video file in bytes
FileFormat string The format of the video (avi, flash, mpeg, msmedia, quicktime, realmedia, etc.)
Height int The height of the video in pixels
Width int The width of the video in pixels
Duration int The length of the video in seconds
Channels int Number of audio channels in the video
Streaming boolean Whether the video is streaming or not
Thumbnail Zend_Service_Yahoo_Image Image thumbnail

Back to Class List

Zend_Service_Yahoo_LocalResult

Each Local Search result is returned as a Zend_Service_Yahoo_LocalResult object.

Properties

Zend_Service_Yahoo_LocalResult Properties
Name Type Description
Address string Street Address of the result
City string City in which the result resides in
State string State in which the result resides in
Phone string Phone number for the result
Rating int User submitted rating for the result
Distance float The distance to the result from your specified location
MapUrl string A URL of a map for the result
BusinessUrl string The URL for the business website, if known
BusinessClickUrl string The URL for linking to the business website, if known

Back to Class List

Zend_Service_Yahoo_NewsResult

Each News Search result is returned as a Zend_Service_Yahoo_NewsResult object.

Properties

Zend_Service_Yahoo_NewsResult Properties
Name Type Description
Summary string Result summary
NewsSource string The company who distributed the article
NewsSourceUrl string The URL for the company who distributed the article
Language string The language the article is in
PublishDate string The date the article was published as a UNIX timestamp
ModificationDate string The date the article was last modified as a UNIX timestamp
Thumbnail Zend_Service_Yahoo_Image Image Thumbnail for the article, if it exists

Back to Class List

Zend_Service_Yahoo_InlinkDataResult

Each Inbound Link Search result is returned as a Zend_Service_Yahoo_InlinkDatabResult object.

Back to Class List

Zend_Service_Yahoo_PageDataResult

Each Page Data Search result is returned as a Zend_Service_Yahoo_PageDatabResult object.

Back to Class List

Zend_Service_Yahoo_Image

All images returned either by the Yahoo! Image Search or the Yahoo! News Search are represented by Zend_Service_Yahoo_Image objects

Properties

Zend_Service_Yahoo_Image Properties
Name Type Description
Url string Image URL
Width int Image Width
Height int Image Height

Back to Class List

Previous Next
Introducción a Zend Framework
Descripción general
Instalación
Aprendiendo Zend Framework
Inicio Rápido con Zend Framework
Zend Framework & MVC Introduction
Create Your Project
Create A Layout
Create a Model and Database Table
Create A Form
Congratulations!
Autocarga o Carga automática en Zend Framework
Introduction
Goals and Design
Basic Autoloader Usage
Resource Autoloading
Conclusion
Plugins en Zend Framework
Introduction
Using Plugins
Conclusion
Primeros pasos con Zend_Layout
Introduction
Using Zend_Layout
Zend_Layout: Conclusions
Introducción a Zend_View Placeholders
Introduction
Basic Placeholder Usage
Standard Placeholders
View Placeholders: Conclusion
Comprensión y uso de Zend Form Decorators
Introduction
Decorator Basics
Layering Decorators
Rendering Individual Decorators
Creating and Rendering Composite Elements
Conclusion
Primeros pasos con Zend_Session, Zend_Auth, and Zend_Acl
Building Multi-User Applications With Zend Framework
Managing User Sessions In ZF
Authenticating Users in Zend Framework
Building an Authorization System in Zend Framework
Primeros pasos con Zend_Search_Lucene
Zend_Search_Lucene Introduction
Lucene Index Structure
Index Opening and Creation
Indexing
Searching
Supported queries
Search result pagination
Primeros pasos con Zend_Paginator
Introduction
Simple Examples
Pagination Control and ScrollingStyles
Putting it all Together
Referencia de Zend Framework
Zend_Acl
Introducción
Perfeccionamiento de los controles de acceso
Uso Avanzado
Zend_Amf
Introducción
Zend_Amf_Server
Zend_Application
Introducción
Inicio rápido con Zend_Application
Teoría de Operación
Ejemplos
Funcionalidad Básica
Plugins de Recursos Disponibles
Zend_Auth
Introducción
Tabla de base de datos de autenticación
Autenticación "Digest"
Adaptador de Autenticación HTTP
LDAP Authentication
Autenticación con Open ID
Zend_Barcode
Introduction
Barcode creation using Zend_Barcode class
Zend_Barcode Objects
Zend_Barcode Renderers
Zend_Cache
Introducción
The Theory of Caching
Zend_Cache Frontends
Zend_Cache Backends
The Cache Manager
Zend_Captcha
Introducción
Captcha Operation
CAPTCHA Adapters
Zend_CodeGenerator
Introducción
Ejemplos de Zend_CodeGenerator
Referencias de Zend_CodeGenerator
Zend_Config
Introducción
Aspectos Teóricos
Zend_Config_Ini
Zend_Config_Xml
Zend_Config_Writer
Zend_Config_Writer
Zend_Console_Getopt
Introduction
Declaring Getopt Rules
Fetching Options and Arguments
Configuring Zend_Console_Getopt
Zend_Controller
Inicio rápido a Zend_Controller
Conceptos Básicos de Zend_Controller
El Front Controller
La solicitud del Objeto
El Router Standard
El Despachador
Controladores de Acción
Action Helpers
The Response Object
Plugins
Using a Conventional Modular Directory Structure
Excepciones MVC
Zend_Currency
Introduction to Zend_Currency
Using Zend_Currency
Options for currencies
What makes a currency?
Where is the currency?
How does the currency look like?
How much is my currency?
Calculating with currencies
Exchanging currencies
Additional informations on Zend_Currency
Zend_Date
Introducción
Theory of Operation
Basic Methods
Zend_Date API Overview
Creation of Dates
Constants for General Date Functions
Working Examples
Zend_Db
Zend_Db_Adapter
Zend_Db_Statement
Zend_Db_Profiler
Zend_Db_Select
Zend_Db_Table
Zend_Db_Table_Row
Zend_Db_Table_Rowset
Zend_Db_Table Relationships
Zend_Db_Table_Definition
Zend_Debug
Mostrar información de variables(Dumping Variables)
Zend_Dojo
Introducción
Zend_Dojo_Data: Envolturas de dojo.data
Ayudantes de Dojo View
Elementos y Decoradores de Dojo Form
Zend_Dojo build layer support
Zend_Dom
Introducción
Zend_Dom_Query
Zend_Exception
Uso de Excepciones
Basic usage
Previous Exceptions
Zend_Feed
Introduction
Importing Feeds
Retrieving Feeds from Web Pages
Consuming an RSS Feed
Consuming an Atom Feed
Consuming a Single Atom Entry
Modifying Feed and Entry structures
Custom Feed and Entry Classes
Zend_Feed_Reader
Zend_Feed_Writer
Zend_Feed_Pubsubhubbub
Zend_File
Zend_File_Transfer
Validators for Zend_File_Transfer
Filters for Zend_File_Transfer
Zend_Filter
Introducción
Standard Filter Classes
Filter Chains
Writing Filters
Zend_Filter_Input
Zend_Filter_Inflector
Zend_Form
Zend_Form
Inicio rápido a Zend_Form
Creando elementos de formulario usando Zend_Form_Element
Creando formularios usando Zend_Form
Creando un personalizado marcado de formulario usando Zend_Form_Decorator
Elementos Enviados en el Formulario Estandard de Zend Framework
Decoradores de Formulario (Form Decorartors) estándar contenidos en Zend Framework
Internacionalización de Zend_Form
Uso avanzado de Zend_Form
Zend_Gdata
Introduction
Authenticating with AuthSub
Using the Book Search Data API
Authenticating with ClientLogin
Using Google Calendar
Using Google Documents List Data API
Using Google Health
Using Google Spreadsheets
Using Google Apps Provisioning
Using Google Base
Using Picasa Web Albums
Using the YouTube Data API
Catching Gdata Exceptions
Zend_Http
Introduction
Zend_Http_Client - Advanced Usage
Zend_Http_Client - Connection Adapters
Zend_Http_Cookie and Zend_Http_CookieJar
Zend_Http_Response
Zend_InfoCard
Introduction
Zend_Json
Introducción
Uso Básico
Uso Avanzado de Zend_Json
Conversión de XML a JSON
Zend_Json_Server - servidor JSON-RPC
Zend_Layout
Introducción
Zend_Layout Quick Start
Zend_Layout Configuration Options
Zend_Layout Advanced Usage
Zend_Ldap
Introduction
API overview
Usage Scenarios
Tools
Object oriented access to the LDAP tree using Zend_Ldap_Node
Getting information from the LDAP server
Serializing LDAP data to and from LDIF
Zend_Loader
Cargando archivos y clases dinámicamente
The Autoloader
Resource Autoloaders
Loading Plugins
Zend_Locale
Introduction
Using Zend_Locale
Normalization and Localization
Working with Dates and Times
Supported locales
Zend_Log
Overview
Writers
Formatters
Filters
Using the Factory to Create a Log
Zend_Mail
Introduction
Sending via SMTP
Sending Multiple Mails per SMTP Connection
Using Different Transports
HTML E-Mail
Attachments
Adding Recipients
Controlling the MIME Boundary
Additional Headers
Character Sets
Encoding
SMTP Authentication
Securing SMTP Transport
Reading Mail Messages
Zend_Markup
Introduction
Getting Started With Zend_Markup
Zend_Markup Parsers
Zend_Markup Renderers
Zend_Measure
Introduction
Creation of Measurements
Outputting measurements
Manipulating Measurements
Types of measurements
Zend_Memory
Overview
Memory Manager
Memory Objects
Zend_Mime
Zend_Mime
Zend_Mime_Message
Zend_Mime_Part
Zend_Navigation
Introduction
Pages
Containers
Zend_Oauth
Introduction to OAuth
Zend_OpenId
Introduction
Zend_OpenId_Consumer Basics
Zend_OpenId_Provider
Zend_Paginator
Introduction
Usage
Configuration
Advanced usage
Zend_Pdf
Introducción
Creando y Cargando Documentos PDF
Guardar Cambios a Documentos PDF
Trabajando con Páginas
Dibujo
Interactive Features
Información del Documento y Metadatos
Ejemplo de Uso del módulo Zend_Pdf
Zend_ProgressBar
Zend_ProgressBar
Zend_Queue
Introduction
Example usage
Framework
Adapters
Customizing Zend_Queue
Stomp
Zend_Reflection
Introduction
Zend_Reflection Examples
Zend_Reflection Reference
Zend_Registry
Using the Registry
Zend_Rest
Introduction
Zend_Rest_Client
Zend_Rest_Server
Zend_Search_Lucene
Overview
Building Indexes
Searching an Index
Query Language
Query Construction API
Character Set
Extensibility
Interoperating with Java Lucene
Advanced
Best Practices
Zend_Serializer
Introduction
Zend_Serializer_Adapter
Zend_Server
Introduction
Zend_Server_Reflection
Zend_Service
Introduction
Zend_Service_Akismet
Zend_Service_Amazon
Zend_Service_Amazon_Ec2
Zend_Service_Amazon_Ec2: Instances
Zend_Service_Amazon_Ec2: Windows Instances
Zend_Service_Amazon_Ec2: Reserved Instances
Zend_Service_Amazon_Ec2: CloudWatch Monitoring
Zend_Service_Amazon_Ec2: Amazon Machine Images (AMI)
Zend_Service_Amazon_Ec2: Elastic Block Storage (EBS)
Zend_Service_Amazon_Ec2: Elastic IP Addresses
Zend_Service_Amazon_Ec2: Keypairs
Zend_Service_Amazon_Ec2: Regions and Availability Zones
Zend_Service_Amazon_Ec2: Security Groups
Zend_Service_Amazon_S3
Zend_Service_Amazon_Sqs
Zend_Service_Audioscrobbler
Zend_Service_Delicious
Zend_Service_DeveloperGarden
Zend_Service_Flickr
Zend_Service_LiveDocx
Zend_Service_Nirvanix
Zend_Service_ReCaptcha
Zend_Service_Simpy
Zend_Service_SlideShare
Zend_Service_StrikeIron
Zend_Service_StrikeIron: Bundled Services
Zend_Service_StrikeIron: Advanced Uses
Zend_Service_Technorati
Zend_Service_Twitter
Zend_Service_WindowsAzure
Zend_Service_Yahoo
Zend_Session
Introduction
Basic Usage
Advanced Usage
Global Session Management
Zend_Session_SaveHandler_DbTable
Zend_Soap
Zend_Soap_Server
Zend_Soap_Client
WSDL Accessor
AutoDiscovery
Zend_Tag
Introduction
Zend_Tag_Cloud
Zend_Test
Introducción
Zend_Test_PHPUnit
Zend_Test_PHPUnit_Db
Zend_Text
Zend_Text_Figlet
Zend_Text_Table
Zend_TimeSync
Introduction
Working with Zend_TimeSync
Zend_Tool
Using Zend_Tool On The Command Line
Extending Zend_Tool
Zend_Tool_Framework
Introduction
Usando la herramienta CLI
Architecture
Creando Proveedores para usar con Zend_Tool_Framework
Shipped System Providers
Extending and Configuring Zend_Tool_Framework
Zend_Tool_Project
Introduction
Create A Project
Zend_Tool Project Providers
Zend_Tool_Project Internos
Zend_Translate
Introduction
Adapters for Zend_Translate
Using Translation Adapters
Creating source files
Additional features for translation
Plural notations for Translation
Zend_Uri
Zend_Uri
Zend_Validate
Introducción
Clases de Validación Estándar
Cadenas de Validadores
Escribiendo Validadores
Validation Messages
Zend_Version
Obteniendo la versión de Zend Framework Version
Zend_View
Introduction
Controller Scripts
View Scripts
View Helpers
Zend_View_Abstract
Zend_Wildfire
Zend_Wildfire
Zend_XmlRpc
Introducción
Zend_XmlRpc_Client
Zend_XmlRpc_Server
ZendX_Console_Process_Unix
ZendX_Console_Process_Unix
ZendX_JQuery
Introduction
ZendX_JQuery View Helpers
ZendX_JQuery Form Elements and Decorators
Requisitos de Zend Framework
Versión de PHP
Extensiones de PHP
Componentes de Zend Framework
Dependencias de Zend Framework
Notas de Migración de Zend Framework
Zend Framework 1.10
Zend Framework 1.9
Zend Framework 1.8
Zend Framework 1.7
Zend Framework 1.6
Zend Framework 1.5
Zend Framework 1.0
Zend Framework 0.9
Zend Framework 0.8
Zend Framework 0.6
Estándares de codificación de Zend Framework para PHP
Introducción
Formato de archivos PHP
Convenciones de Nombres
Estilo de código
Zend Framework Documentation Standard
Overview
Documentation File Formatting
Recommendations
Recommended Project Structure for Zend Framework MVC Applications
Overview
Recommended Project Directory Structure
Module Structure
Rewrite Configuration Guide
Guía de Rendimiento de Zend Framework
Introduction
Class Loading
Zend_Db Performance
Internationalization (i18n) and Localization (l10n)
View Rendering
Copyright Information