Search Results

Search found 1 results on 1 pages for 'thesocialhacker'.

Page 1/1 | 1 

  • how to make object public to all function in a class?

    - by thesocialhacker
    I've created a class that calls an object in the "__construct" how can i make this object available through out the class. class SocialMedia { function __construct() { $object = "whatever"; } } how can I access $object in the other funtions (which are static) from with in the class. I've tried to use "$this-object" but I get an error "$this when not in object context" when I try to call it from my other static functions.

    Read the article

1