Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [ZendFramework]Pobranie wartości przy pomocy Zend_Rest_Client
rugby
post
Post #1





Grupa: Zarejestrowani
Postów: 61
Pomógł: 1
Dołączył: 21.05.2009

Ostrzeżenie: (0%)
-----


Korzystam z Zend_Rest_Client w wersji 1.9, łączę się z pewnym REST API i chcę pobrać jedną wartość.

Robię to tak:
  1. require_once 'Zend/Rest/Client.php';
  2. $client = new Zend_Rest_Client('http://...');
  3. $result = $client->get();
  4. print_r($result);


Otrzymuję taki wynik:
Kod
Zend_Rest_Client_Result Object
(
    [_sxml:protected] => SimpleXMLElement Object
        (
            [dog] => SimpleXMLElement Object
                (
                    [dogName] => Nazwa
                    [id] => 1
                    [dogUrl] => http://...
                )
        )

)


Interesuje mnie wartość dogName. Niestety jak piszę: $result->dogName() to nic nie otrzymuję. Proszę o pomoc.


--------------------
Juvenia Kraków Rugby Klub
Pobierz Google Chrome!
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 02:43