Jump to content

Class visibility and database connection


silversurfer5150
 Share

Recommended Posts

Hey there,

Where can I find out which prestashop classes are visibile to one another? For, example, I can see the db connection php files but I am unsure of where each script makes that connection? What if I wanted to write some new code which required db connection?

thanks

Share this post


Link to post
Share on other sites

Prestashop uses autoload, you can just use any class under the classes directory without the need to include anything. And you can access the database connection anywhere using the getInstance method, check other files to see how they use it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More