"Sputnik" help  
Sputnik Help
Language Reference - Classes - Class Magic Functions - Unset

Class Magic Functions - Unset

Overrides the Unset function its purpose is to destroy variables.

// define a class
class Foo
{
    Function __Unset($key)
    {
        say "Wants to unset something calle $key";
    }
}

// create new instance
my $a = new Foo();
unset($a["cat"]);
unset($a["dog"]);

// PRINTS
// Wants to unset something calle cat
// Wants to unset something calle dog

A full list of all possible magic functions can be found here.


Contact
Cheryl (uberfox@hotmail.com)
Homepage
http://ubersoft.org