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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:13:20+00:00 2026-05-31T10:13:20+00:00

I have been puzzled by this weird problem and it got me stuck. Please

  • 0

I have been puzzled by this weird problem and it got me stuck. Please take a look. May be a differnt eye wil catch the error. I have pasted the code below so you may see where the error occurs at line 21 ( ‘consumer_key’ => $this->get_consumer_key(),).

Thanks for your help in advance. Cheers 🙂

<?php
    class Xro_config {

        //Set to true to enable Oauth debugging
        protected $debug = true;
        // public, partner, or private
        protected $xro_app_type = "Public"; 

        /* 
        * Xero Calback URL
        */
        protected static $_oauth_callback = '';

        /*
        * Xero Signature keys
        */
        protected $signatures = array(
            // local
            'consumer_key' => $this->get_consumer_key(),
            'shared_secret' => $this->get_shared_secret(),
            // 'rsa_private_key' => '/[path]/[privatekey].pem',
            // 'rsa_public_key' => '/[path]/[publickey].cer'
         );

        protected static $_consumer_key;
        protected static $_shared_secret;

        /**
         * Sets the Oauth Callback URL. The Default is in an emptystring
         * @param string $URL
         */
        public static function set_oauth_callback($URL) {
            self::$_oauth_callback = $URL;
        }

        /**
        * Gets the oauth_callback
        */
        function get_oauth_callback(){
            return self::$_oauth_callback;
        }

        /**
         * Sets the Cusumer API KEys
         * @param string $consumerkey
         */
        public static function set_consumer_key($consumerkey) {
            self::$_consumer_key = $consumerkey;
        }

        /**
         * Sets the Cusumer API KEys
         * @param string $sharedSecret
         */
        public static function set_shared_secret($sharedSecret) {
            self::$_shared_secret = $sharedSecret;
        }

        /* 
        * Get Signature Keys 
        */
        function get_consumer_key(){
            return self::$_consumer_key;
        }

        function get_shared_secret(){
            return self::$_shared_secret;
        }
              }
?>
  • 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-05-31T10:13:21+00:00Added an answer on May 31, 2026 at 10:13 am

    You should initialize variables on the class constructor.

    For example:

    class Xro_config {
    
      protected $signatures; 
    
      public function __construct()
      {
       $this->signatures = array(
              // local
              'consumer_key' => $this->get_consumer_key(),
              'shared_secret' => $this->get_shared_secret(),
              // 'rsa_private_key' => '/[path]/[privatekey].pem',
              // 'rsa_public_key' => '/[path]/[publickey].cer'
           );
    
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been a little puzzled with this as I have not seen many examples
I have been toying with some codes to solve this using a Levenberg-Marquardt solver
for some reason this hasn't been inserting into the database. I'm puzzled. It runs
I've been puzzled by this for a while. I am writing quite a large
I have been really puzzled because I was trying to work out some jQuery
I have been reading lots of posts and am confused as to why this
I have been completely puzzled by an issue I just came over in my
I have been working on a problem relating to UITableView and cellForRowAtIndexPath. I want
Have been looking at the MVC storefront and see that IQueryable is returned from
Have been studying the file system related classes of Adobe AIR 1.5, but so

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.