cvs: pear /Services_Yahoo package.xml /Services_Yahoo/Yahoo ContentAnalysis.php Search.php /Services_Yahoo/Yahoo/Search termExtraction.php

From: Date: Mon, 18 Apr 2005 18:07:31 +0000
Subject: cvs: pear /Services_Yahoo package.xml /Services_Yahoo/Yahoo ContentAnalysis.php Search.php /Services_Yahoo/Yahoo/Search termExtraction.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-31288@lists.php.net to get a copy of this message
mj Mon Apr 18 14:07:31 2005 EDT Added files: /pear/Services_Yahoo/Yahoo ContentAnalysis.php Removed files: /pear/Services_Yahoo/Yahoo/Search termExtraction.php Modified files: /pear/Services_Yahoo package.xml /pear/Services_Yahoo/Yahoo Search.php Log: * Splitting the package up into two parts: Search for all search-related services and ContentAnalysis for term extraction and spelling suggestion. http://cvs.php.net/diff.php/pear/Services_Yahoo/package.xml?r1=1.3&r2=1.4&ty=u Index: pear/Services_Yahoo/package.xml diff -u pear/Services_Yahoo/package.xml:1.3 pear/Services_Yahoo/package.xml:1.4 --- pear/Services_Yahoo/package.xml:1.3 Thu Apr 14 07:43:05 2005 +++ pear/Services_Yahoo/package.xml Mon Apr 18 14:07:30 2005 @@ -32,6 +32,7 @@ <dir name="Yahoo"> <file role="php" name="Exception.php" /> <file role="php" name="Search.php" /> + <file role="php" name="ContentAnalysis.php" /> <dir name="Search" role="php"> <file name="AbstractSearch.php" /> <file name="image.php" /> @@ -40,7 +41,12 @@ <file name="Response.php" /> <file name="video.php" /> <file name="web.php" /> + </dir> + <dir name="ContentAnalysis" role="php"> + <file name="AbstractContentAnalysis.php" /> + <file name="Response.php" /> <file name="termExtraction.php" /> + <file name="spellingSuggestion.php" /> </dir> </dir> </dir> http://cvs.php.net/diff.php/pear/Services_Yahoo/Yahoo/Search.php?r1=1.2&r2=1.3&ty=u Index: pear/Services_Yahoo/Yahoo/Search.php diff -u pear/Services_Yahoo/Yahoo/Search.php:1.2 pear/Services_Yahoo/Yahoo/Search.php:1.3 --- pear/Services_Yahoo/Yahoo/Search.php:1.2 Thu Apr 14 07:43:05 2005 +++ pear/Services_Yahoo/Yahoo/Search.php Mon Apr 18 14:07:31 2005 @@ -17,7 +17,7 @@ * @author Martin Jansen <mj@php.net> * @copyright 2005 Martin Jansen * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Search.php,v 1.2 2005/04/14 11:43:05 mj Exp $ + * @version CVS: $Id: Search.php,v 1.3 2005/04/18 18:07:31 mj Exp $ * @link http://pear.php.net/package/Services_Yahoo */ @@ -34,7 +34,7 @@ * @author Martin Jansen <mj@php.net> * @copyright 2005 Martin Jansen * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Search.php,v 1.2 2005/04/14 11:43:05 mj Exp $ + * @version CVS: $Id: Search.php,v 1.3 2005/04/18 18:07:31 mj Exp $ */ class Services_Yahoo_Search { @@ -55,7 +55,6 @@ case "news" : case "video" : case "local" : - case "termExtraction" : require_once "Services/Yahoo/Search/" . $type . ".php"; $classname = "Services_Yahoo_Search_" . $type; return new $classname; http://cvs.php.net/co.php/pear/Services_Yahoo/Yahoo/ContentAnalysis.php?r=1.1&p=1 Index: pear/Services_Yahoo/Yahoo/ContentAnalysis.php +++ pear/Services_Yahoo/Yahoo/ContentAnalysis.php <?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /** * Content analysis dispatcher * * PHP version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: * http://www.php.net/license/3_0.txt. If you did not receive a copy of * the PHP License and are unable to obtain it through the web, please * send a note to license@php.net so we can mail you a copy immediately. * * @category Services * @package Services_Yahoo * @author Martin Jansen <mj@php.net> * @copyright 2005 Martin Jansen * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: ContentAnalysis.php,v 1.1 2005/04/18 18:07:31 mj Exp $ * @link http://pear.php.net/package/Services_Yahoo */ require_once "Services/Yahoo/Exception.php"; /** * Content analysis class * * This class provides a method to create a concrete instance of one * of the supported content analysis services. * * @category Services * @package Services_Yahoo * @author Martin Jansen <mj@php.net> * @copyright 2005 Martin Jansen * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: ContentAnalysis.php,v 1.1 2005/04/18 18:07:31 mj Exp $ */ class Services_Yahoo_ContentAnalysis { /** * Attempts to return a concrete instance of a content analysis class * * @access public * @param string Type of content analysis. Can be one of spellingSuggestion or termExtraction * @return object Concrete instance of a content analysis class based on the paramter * @throws Services_Yahoo_Exception */ public function factory($type) { switch ($type) { case "termExtraction" : case "spellingSuggestion" : require_once "Services/Yahoo/ContentAnalysis/" . $type . ".php"; $classname = "Services_Yahoo_ContentAnalysis_" . $type; return new $classname; default : throw new Services_Yahoo_Exception("Unknown content analysis type {$type}"); break; } } }

« previous php.pear.cvs (#31288) next »