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 8501231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:09:09+00:00 2026-06-11T01:09:09+00:00

I’ve searched everywhere, IPB forums, google, everywhere. I couldn’t find any documentation from IPB/IP.Nexus

  • 0

I’ve searched everywhere, IPB forums, google, everywhere.

I couldn’t find any documentation from IPB/IP.Nexus forums because they don’t have any, it’s encrypted with Zend.

What I was trying to do was retrieve the item, “quantity” from an private Object Array within the function it’s passed to.

This is the php file.

<?php 
class custom_actions_ibeconomy
{
        /**
         * Item Purchased (run before onPurchaseGenerated)
         *
         * @param       array   The member purchasing
         * @param       array   Package data (combined array with row from nexus_packages and nexus_packages_*, depending on the package type)
         * @param       invoice Invoice Model
         * @return      void
         */
        public function onPaid( $member, $package, $invoice )
        {

        }

        /**
         * Purchase record generated (run after onPaid)
         *
         * @param       array   The member purchasing
         * @param       array   Package data (combined array with row from nexus_packages and nexus_packages_*, depending on the package type)
         * @param       invoice Invoice Model
         * @param       array   Row from nexus_purchases [since Nexus 1.5]
         * @return      void
         */
        public function onPurchaseGenerated( $member, $package, $invoice, $purchase )
        {
        #What package have we purchased here?
        switch($package['p_id']) {
                        case 3: // 500 HLcoins
                                $value = 500;
                                break;
                        case 4: // 1000 HLcoins
                                $value = 1000;
                                break;

                        default: //Neither? 0 HLcoins.
                                $value = 0;
                                break;;
                }       
        #Find current members HLcoins?           
        $amount = $this->$invoice->quantity * $value;

        #execute points
        ipsRegistry::DB()->update( 'pfields_content', 'eco_points=eco_points+'.$amount, 'member_id=' . $member['member_id'] , true, true );   
        }

        /**
         * Purchase Renewed, but was still active anyway
         *
         * @param       array   The member renewing
         * @param       array   Package data (combined array with row from nexus_packages and nexus_packages_*, depending on the package type)
         * @param       invoice Invoice Model
         * @param       array   The row from nexus_purchases [since Nexus 1.5]
         * @return      void
         */
        public function onRenew( $member, $package, $invoice, $purchase )
        {

        }        

        /**
         * Purchase Renewed after had expired
         *
         * @param       array                   The member renewing
         * @param       array                   Package data (combined array with row from nexus_packages and nexus_packages_*, depending on the package type)
         * @param       invoice|null    Invoice Model [May not be set if manually reactivating]
         * @param       array                   The row from nexus_purchases [since Nexus 1.5]
         * @return      void
         */
        public function onReactivate( $member, $package, $invoice, $purchase )
        {

        }

        /**
         * Purchase Expired
         *
         * @param       array                   The member the purchase belongs to
         * @param       array                   Package data (combined array with row from nexus_packages and nexus_packages_*, depending on the package type)
         * @param       invoice|null    Will usually be null. If the purchase is expiring because the invoice which previously renewed it is now being marked unpaid, the invoice object will be passed.
         * @param       array                   The row from nexus_purchases [since Nexus 1.5]
         * @return      void
         */
        public function onExpire( $member, $package, $invoice, $purchase )
        {

        }

        /**
         * Purchase Cancelled or Deleted
         *
         * @param       array                   The member the purchase belongs to
         * @param       array                   Package data (combined array with row from nexus_packages and nexus_packages_*, depending on the package type)
         * @param       invoice|null    Will usually be null. If the purchase is being cancelled because the invoice which was used to purchase it it is now being marked unpaid, the invoice object will be passed.
         * @param       array                   The row from nexus_purchases [since Nexus 1.5]
         * @return      void
         */
        public function onCancel( $member, $package, $invoice, $purchase )
        {

        }

        /**
         * Purchase is transferred to another member
         *
         * @param       array           Old owner
         * @param       array           Package data (combined array with row from nexus_packages and nexus_packages_*, depending on the package type)
         * @param       array           The row from nexus_purchases
         * @param       customer        New owner
         * @return      void
         */
        public function onTransfer( $oldOwner, $package, $purchase, $newOwner )
        {

        }

        /**
         * Purchase is upgraded/downgraded
         *
         * @param       array           The member the purchase belongs to
         * @param       array           Old package data (combined array with row from nexus_packages and nexus_packages_*, depending on the package type)
         * @param       array           The row from nexus_purchases
         * @param       package         New package object
         * @return      void
         */
        public function onchange( $member, $oldPackage, $purchase, $newPackage )
        {

        }

        /**
         * Purchases' parent purchase is changed
         *
         * @param       array                   The member the purchase belongs to
         * @param       array                   Package data (combined array with row from nexus_packages and nexus_packages_*, depending on the package type)
         * @param       array                   The row from nexus_purchases
         * @param       array|null        The previous parent (may be null if had no parent previously)
         * @param       array|null        The new parent (may be null if was previously associated and now not)
         * @return      void
         */
        public function onAssociate( $member, $package, $purchase, $oldParent, $newParent )
        {

        }

}
?>

However it returns nothing.

I’ve printed the array out and it’s listed as private, but its within the function so I should be able to retrieve it, I just don’t know how and I need your help.

invoice Object
(
    [data:private] => Array
    (
    [i_status] => pend
    [i_title] => 500 HLCoins , 500 HLCoins x8
    [i_member] => 1
    [i_items] => Array
        (
            [0] => Array
            (
    [act] => new
    [app] => nexus
    [type] => product
    [cost] => 0
    [tax] => 0
    [renew_term] => 0
    [renew_units] =>
    [renew_cost] => 0
    [quantity] => 1
    [physical] =>
    [shipping] => Array
        (
            )
        [weight] => 0
        [itemName] => 500 HLCoins
        [itemID] => 3
        [cfields] => Array
(
)
[extra] =>
[opt_id] => 0
[associated] =>
[assocBought] =>
[groupRenewals] => 0
[methods] => Array
(
)
[k] => 0
[_tax] => 0
)
[1] => Array
(
[act] => new
[app] => nexus
[type] => product
[cost] => 0
[tax] => 0
[renew_term] => 0
[renew_units] =>
[renew_cost] => 0
[quantity] => 8
[physical] =>
[shipping] => Array
(
)
[weight] => 0
[itemName] => 500 HLCoins
[itemID] => 3
[cfields] => Array
(
)
[opt_id] => 0
[groupRenewals] => 0
[methods] => Array
(
)
[_tax] => 0
)
)
[i_total] => 0
[i_date] => 1347217384
[i_return_uri] =>
[i_paid] => 0
[i_status_extra] => a:1:{s:4:"type";s:4:"zero";}
[i_discount] => 0
[i_temp] =>
[i_ordersteps] => 0
[i_noreminder] => 1
[i_renewal_ids] => Array
(
)
[i_po] =>
[i_notes] =>
[i_shipaddress] =>
[i_id] => 229
)
[customer:private] => customer Object
(
[data] => Array
(
[member_id] => 1
[name] => Administrator
[member_group_id] => 4
[email] => honlegends@gmail.com
[joined] => 1346519183
[ip_address] => 108.251.14.208
[posts] => 19
[title] => Administrator
[allow_admin_mails] => 0
[time_offset] => -8
[skin] => 5
[warn_level] => 0
[warn_lastwarn] => 0
[language] => 1
[last_post] => 1347048210
[restrict_post] =>
[view_sigs] => 1
[view_img] => 1
[bday_day] => 0
[bday_month] => 0
[bday_year] => 0
[msg_count_new] => 0
[msg_count_total] => 1
[msg_count_reset] => 0
[msg_show_notification] => 1
[misc] =>
[last_visit] => 1347174074
[last_activity] => 1347217377
[dst_in_use] => 1
[coppa_user] => 0
[mod_posts] =>
[auto_track] =>
[temp_ban] => 0
[login_anonymous] => 0&1
[ignored_users] => a:0:{}
[mgroup_others] => 7
[org_perm_id] => ,,,,,8,
[member_login_key] => 341ebfc939f1c5acb5dbe8b9a6819b21
[member_login_key_expire] => 1347820877
[has_blog] =>
[blogs_recache] =>
[has_gallery] => 0
[members_auto_dst] => 1
[members_display_name] => PAPA_bert
[members_seo_name] => papa-bert
[members_created_remote] => 0
[members_cache] => a:7:{s:11:"report_temp";a:0:{}s:19:"report_last_updated";i:1347139096;s:10:"report_num";s:1:"0";s:13:"msgAlertReset";i:1346520781;s:13:"notifications";a:19:{s:13:"report_center";a:1:{s:8:"selected";a:1:{i:0;s:5:"email";}}s:11:"new_comment";a:1:{s:8:"selected";a:1:{i:0;s:5:"email";}}s:11:"post_quoted";a:1:{s:8:"selected";a:0:{}}s:9:"new_likes";a:1:{s:8:"selected";a:1:{i:0;s:6:"inline";}}s:15:"followed_topics";a:1:{s:8:"selected";a:1:{i:0;s:5:"email";}}s:15:"followed_forums";a:1:{s:8:"selected";a:1:{i:0;s:5:"email";}}s:22:"followed_topics_digest";a:1:{s:8:"selected";a:1:{i:0;s:5:"email";}}s:22:"followed_forums_digest";a:1:{s:8:"selected";a:1:{i:0;s:5:"email";}}s:15:"profile_comment";a:1:{s:8:"selected";a:1:{i:0;s:6:"inline";}}s:14:"friend_request";a:1:{s:8:"selected";a:1:{i:0;s:6:"inline";}}s:22:"friend_request_approve";a:1:{s:8:"selected";a:1:{i:0;s:6:"inline";}}s:19:"new_private_message";a:1:{s:8:"selected";a:1:{i:0;s:5:"email";}}s:21:"reply_private_message";a:1:{s:8:"selected";a:1:{i:0;s:5:"email";}}s:22:"invite_private_message";a:1:{s:8:"selected";a:1:{i:0;s:5:"email";}}s:17:"reply_your_status";a:1:{s:8:"selected";a:0:{}}s:16:"reply_any_status";a:1:{s:8:"selected";a:0:{}}s:20:"friend_status_update";a:1:{s:8:"selected";a:0:{}}s:7:"warning";a:1:{s:8:"selected";a:1:{i:0;s:5:"email";}}s:12:"warning_mods";a:1:{s:8:"selected";a:1:{i:0;s:6:"inline";}}}s:23:"show_notification_popup";i:0;s:7:"friends";a:1:{i:11;s:1:"1";}}
[members_disable_pm] => 0
[members_l_display_name] => papa_bert
[members_l_username] => administrator
[failed_logins] =>
[failed_login_count] => 0
[members_profile_views] => 575
[members_pass_hash] => cf407e695cc8d14e0a7079c8e0e1f4b4
[members_pass_salt] => ]s:%5
[member_banned] => 0
[member_uploader] => flash
[members_bitoptions] => 0
[fb_uid] => 0
[fb_emailhash] =>
[fb_lastsync] => 0
[members_day_posts] => 0,0
[live_id] =>
[twitter_id] =>
[twitter_token] =>
[twitter_secret] =>
[notification_cnt] => 0
[tc_lastsync] => 0
[fb_session] =>
[fb_token] =>
[ips_mobile_token] =>
[unacknowledged_warnings] =>
[feedb_percent] => -1
[feedb_pos] => 0
[feedb_neg] => 0
[feedb_neu] => 0
[sospromote_vip] => 0
[sospromote_vip_eterno] => 0
[sospromote_vip_g_origem] => 0
                    [sospromote_vip_dias] => 0
                    [sospromote_vip_secondary] => 0
                    [sospromote_vip_removesecondary] => 0
                    [sub_end] => 0
                    [subs_pkg_chosen] => 0
                    [cm_credits] => 0
                    [cm_reg] => 0
                    [referred_by] => 0
                    [cm_no_sev] => 0
                    [cim_profile_id] => 
                    [cim_payment_id] => 0
                    [cim_method] => 0
                    [cm_return_group] => 0
                    [my_member_id] => 1
                    [pp_member_id] => 1
                    [pp_last_visitors] => a:2:{i:1346978590;i:7;i:1346536186;i:2;}
                    [pp_rating_hits] => 0
                    [pp_rating_value] => 0
                    [pp_rating_real] => 0
                    [pp_main_photo] => http://www.honlegends.com/community/uploads/profile/photo-1.jpg?_r=1347002709
                    [pp_main_width] => 170
                    [pp_main_height] => 125
                    [pp_thumb_photo] => http://www.honlegends.com/community/uploads/profile/photo-thumb-1.jpg?_r=1347002709
                    [pp_thumb_width] => 100
                    [pp_thumb_height] => 100
                    [pp_setting_moderate_comments] => 0
                    [pp_setting_moderate_friends] => 0
                    [pp_setting_count_friends] => 1
                    [pp_setting_count_comments] => 1
                    [pp_setting_count_visitors] => 1
                    [pp_about_me] => 
                    [pp_reputation_points] => 1
                    [pp_gravatar] => 
                    [pp_photo_type] => custom
                    [signature] => [center][img]http://tomeisopa.files.wordpress.com/2009/11/snooze-snorlax.png[/img][/center]
                    [avatar_location] => 
                    [avatar_size] => 0
                    [avatar_type] => 
                    [pconversation_filters] => 
                    [fb_photo] => 
                    [fb_photo_thumb] => 
                    [fb_bwoptions] => 0
                    [tc_last_sid_import] => 0
                    [tc_photo] => 
                    [tc_bwoptions] => 0
                    [pp_customization] => 
                    [pp_profile_update] => 1347002709
                    [cache_content] => <p class='bbc_center'><span rel='lightbox'><img src='http://tomeisopa.files.wordpress.com/2009/11/snooze-snorlax.png' alt='Posted Image' class='bbc_img' /></span></p>
                    [full] => 1
                    [_canBeIgnored] => 
                    [bw_is_spammer] => 0
                    [bw_from_sfs] => 0
                    [bw_vnc_type] => 0
                    [bw_forum_result_type] => 0
                    [bw_no_status_update] => 0
                    [bw_status_email_mine] => 0
                    [bw_status_email_all] => 0
                    [bw_disable_customization] => 0
                    [bw_local_password_set] => 0
                    [bw_disable_tagging] => 0
                    [bw_disable_prefixes] => 0
                    [bw_using_skin_gen] => 0
                    [bw_disable_gravatar] => 0
                    [_group_formatted] => <span style="color: #46c843; font-weight: bold; text-shadow: 0 0 .7em #59ff55;">Administrators</span>
                    [member_rank_img] => http://www.honlegends.com/community/public/style_extra/team_icons/admin.png
                    [member_rank_img_i] => img
                    [show_warn] => 1
                    [custom_fields] => 
                    [_has_photo] => 1
                    [pp_small_photo] => http://www.honlegends.com/community/uploads/profile/photo-thumb-1.jpg?_r=1347002709
                    [pp_small_width] => 50
                    [pp_small_height] => 50
                    [pp_mini_photo] => http://www.honlegends.com/community/uploads/profile/photo-thumb-1.jpg?_r=1347002709
                    [pp_mini_width] => 25
                    [pp_mini_height] => 25
                    [_online] => 1
                    [_last_active] => Today, 12:02 PM
                    [_pp_rating_real] => 0
                    [members_display_name_formatted] => <span style="color: #46c843; font-weight: bold; text-shadow: 0 0 .7em #59ff55;">PAPA_bert</span>
                    [members_display_name_short] => PAPA_bert
                    [author_reputation] => Array
                        (
                            [text] => Neutral
                            [image] => 
                        )

                    [member_title] => Administrator
                    [cm_first_name] => Albert
                    [cm_last_name] => Yang
                    [cm_address_1] => 2919 Warwick Ave
                    [cm_address_2] => 
                    [cm_city] => Los Angeles
                    [cm_state] => CA
                    [cm_zip] => 90032
                    [cm_country] => US
                    [cm_phone] => 3233160892
                    [_name] => Albert Yang
                )

            [cardhandler:private] => 
        )

    [takeAction] => 1
)
  • 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-11T01:09:11+00:00Added an answer on June 11, 2026 at 1:09 am

    In theory:

    ob_start();
    var_dump($object);
    $objectStr = ob_get_clean();
    

    and then use string functions to get the value – similar to:

    $qPos = strpos($objectStr,"quantity",0);
    $value = substring($objectStr$qPos+SOMEVALUE,$qPOS+SOMEVALUE+LENGTH);
    

    That’s not a perfect answer and you’ll have to tweak it.

    As @abhi-beckert said,, however, it’s bad form to do it and likely horrible for performance. Check the documentation and see if there’s a different way.

    You can’t extend the class to do it – private aren’t inherited.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I don't have much knowledge about the IPv6 protocol, so sorry if the question
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am currently running into a problem where an element is coming back from

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.