Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8123067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:03:04+00:00 2026-06-06T06:03:04+00:00

Need some quick advice I am trying to access a object array but I

  • 0

Need some quick advice I am trying to access a object array but I am struggling, please see the below array. It starts off an object I would normally user $result->_messages->token but it doesnt work I have trawled google and this site but cant access the token.

object(Zend_Auth_Result)#76 (3) {
["_code":protected] => int(1)
["_identity":protected] => string(9) "3232323233"
["_messages":protected] => array(2) {
    ["user"] => object(stdClass)#71 (13) {
      ["id"] => string(9) "232323332"
      ["name"] => string(14) "John Smith"
      ["first_name"] => string(5) "John"
      ["last_name"] => string(8) "Smith"
      ["link"] => string(41) "http://www.facebook.com/"
      ["username"] => string(17) "john.smith"
      ["location"] => object(stdClass)#68 (2) {
        ["id"] => string(0) ""
        ["name"] => NULL
      }     
      ["email"] => string(22) "john@doe.com"
      ["timezone"] => int(1)
      ["locale"] => string(5) "en_US"
      ["verified"] => bool(true)
      ["updated_time"] => string(24) "2012-06-21T13:57:12+0000" 
    }
    ["token"] => string(109) "AAAGIFdDivU4BAMoxyHT3bqY8eBGhnWo9YKM1szHZAnWgY10AIBgxz9LeNCeA2HV9Yhkp8uM5Aq0WR39ZBdcnOa4MxXVI22rnmFKNbYdQZDZD"
    }
}

Any advice any body?

Cheers

J

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T06:03:05+00:00Added an answer on June 6, 2026 at 6:03 am

    From the ZF Reference Guide on Naming Conventions:

    For instance variables that are declared with the “private” or “protected” modifier, the first character of the variable name must be a single underscore. This is the only acceptable application of an underscore in a variable name. Member variables declared “public” should never start with an underscore.

    So you cannot access _messages directly from outside the Zend_Auth_Result instance, because it is protected. You have to use the getter for that property.

    See the API Docs for Zend_Auth_Result

    $messages = $zendAuthResult->getMessages();
    $token = $messages['token'];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some (small amount) of data that I'll need quick access to on
Need some help please with this error : TypeError : 'unicode' object does not
----- PHP and mySQL ----- I have two quick questions need some advice. On
I need some quick code just to see what files are listed when I
I need some quick advice. I would like to simulate a cellular automata (from
I really need some quick tips here. I've got this VBScript script which sends
I am new to django and need some quick help. How will the following
I hope this is a quick question I hope. I need to write some
need some help here My problem is, my app starts with a single view,
Need some help, please. I have a line of horizontal thumbnails loaded as ONE

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.