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

  • Home
  • SEARCH
  • 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 8906425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:39:08+00:00 2026-06-15T02:39:08+00:00

I have a few classes that are often run through var_dump or print_r .

  • 0

I have a few classes that are often run through var_dump or print_r.

Inside these classes I have a few variables that are references to other, rather large objects that only ever has one instance of each and are only used inside the classes (outside the classes have their own reference to these classes) I do not wish these classes printed in the output, so I have declared them as private static which is working fine.

But my IDE (PHPstorm) is flicking up an error-level alert with Member has private access when I access them through self::$ci->...

I am wondering if this is a bug in the IDE, highlighting because it’s probably a bug (aka it’s static but nothing outside the class can access it, why would you want to to do that?), or because there is actually something syntactically wrong with it?

As an example here is part of the class,
Note that =& get_instance(); returns a reference to the Code Igniter super object

private static $ci = null;

public function __construct(){
    self::$ci = self::$ci =& get_instance();
}

public function product() {
    if ($this->product == null) {
        self::$ci->products->around($this->relative_date);
        $this->product = self::$ci->products->get($this->product_id);
    }
    return $this->product;
}
  • 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-15T02:39:12+00:00Added an answer on June 15, 2026 at 2:39 am

    In your product() method you’re trying to access the private member self::$ci. Your IDE thinks that this method can be accessed anywhere, and detects a conflict with the private static member $ci.

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

Sidebar

Related Questions

I have a few classes that hold references to other classes through IDictionary instance
I have a few classes that are instantiated using ninject Session Scoping - because
I have a few classes that perform background tasks that might raise exceptions. They
I have a data access library that has a few classes that all implement
I have a few classes in a project that I inherited that are really
I have a few classes which have a property which is unique to that
I've heard before that modules are just classes too. I have a few situations,
I have a few classes that read from very delicate tables, which is why
I have a few classes that define sequences whose values must be available both
I have a few classes that are abstracted in a way that I can

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.