We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

$this->EE-> vs. ee()->

How Do I?

jay_turley's avatar
jay_turley
46 posts
10 years ago
jay_turley's avatar jay_turley

Just finished writing my first plugin.

For most of it, I was able to access EE functionality using code in this format (as shown in the current documentation):

ee()->foo->bar();

However, I had to use the older format for one thing:

$this->EE =& get_instance();
$pages = $this->EE->config->item( 'site_pages' );

Because I couldn’t find a reference in the development documentation anywhere for the config class.

Just curious if I missed it, or if this is something you just have to know EE well enough to know where to find this kind of thing.

EDIT: Just in case, I tested this again with

$pages = ee()->config->item( 'site_pages' );

And it worked.

So forget this… Sorry lol

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.