Activity Stream
48,167 MEMBERS
6779 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 3 of 3 FirstFirst 123
Results 21 to 22 of 22
  1.     
    #21
    Respected Developer
    Website's:
    PlatinumW.org NexusDDL.com HD-United.org CheckLinks.org FLVD.org
    Really nice one Litewarez, I just don't like your indentation style lol, otherwise your code is super. Anyway, I have a question how does the getter and setter magic method work?

  2.     
    #22
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    The Getter and Setter magic method basically lets you add stuff into the class without needing to create a function and predefined variables

    so for instance

    PHP Code: 
    <?php
    class Dman{
        function 
    __get($var){
            echo 
    $var;
        }
    }
    $Dman = new Dman;

    //no if i do this
    $Dman->I_Love_Litewarez// this would echo I_Love_Litewarez

    //What happens is because the variable "var $I_Lovae_Litewarez" is not there it will send the variable name to __get() and try let the function create some data for that
    ?>
    No the same is with the __set(); it takes 2 variables a $key and a $varaible and in the function you can pull stuff from an array or summat..

    It basically allows you to set data like $Dman->someVariableKey = "Some VariableValue";
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  3.   Sponsored Links

Page 3 of 3 FirstFirst 123

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Advanced Bash Loops Tutorial
    By Albert.Nawaro in forum Tutorials and Guides
    Replies: 0
    Last Post: 9th Feb 2012, 10:56 AM
  2. [AMS] xCleaner - Cleans your System & Registry ;)
    By l0calh0st in forum Web Development Area
    Replies: 1
    Last Post: 24th Jul 2010, 05:10 PM
  3. Tutorial [Creating a PHP Framework] {advanced} (PART 3)
    By litewarez in forum Tutorials and Guides
    Replies: 1
    Last Post: 4th Feb 2010, 02:12 AM
  4. Tutorial [Creating a PHP Framework] {advanced} (PART 2)
    By litewarez in forum Tutorials and Guides
    Replies: 2
    Last Post: 3rd Feb 2010, 05:37 AM

Tags for this Thread

BE SOCIAL