Changeset 8588

Show
Ignore:
Timestamp:
04/01/08 01:10:56 (8 months ago)
Author:
sasezaki
Message:

getVoiceメソッドを追加

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/php/Diggin_Service_Munoh/Munoh.php

    r8577 r8588  
    55 * $munoh = new Diggin_Service_Munoh(); 
    66 * var_dump($munoh->puchipuchi(array("action"=>"arai"))); 
     7 *  
     8 * $munoh = new Diggin_Service_Munoh(); 
     9 * echo ($munoh->getVoice()); 
     10 *  
    711 */ 
    812 
     
    4650     * puchipuchi! 
    4751     *  
    48      * @param $parms 
     52     * @param array 
    4953     * @return SimpleXMLIterator 
    5054     */ 
    51     public function puchipuchi($parms) { 
     55    public function puchipuchi(array $parms = null) { 
    5256        $response = $this->makeRequest($parms); 
    5357        return $this->_xmlResponseToSimpleXMLIterator($response); 
     
    6064     * @return mixed  decoded response from web service 
    6165     */ 
    62     public function makeRequest(array $parms = array()) 
     66    public function makeRequest(array $parms = null) 
    6367    { 
    6468        // if previous request was made less then 1 sec ago 
     
    8791         
    8892        $responseBody = $response->getBody(); 
    89          
     93                 
    9094        $dom = new DOMDocument() ; 
    9195 
     
    99103     
    100104        return $dom; 
     105    } 
     106     
     107    public function getVoice(array $parms = null){ 
     108        $xml = $this->puchipuchi($parms); 
     109 
     110        return (string) $xml->voice; 
    101111    } 
    102112