\friendly

An abstract class to simulate friend relationships in php.

Summary

Methods
Properties
Constants
No public methods found
No public properties found
No constants found
__construct()
is_friendly()
add_friend()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct()

Constructor.

This class is automatically added as a friend to itself.

is_friendly()

is_friendly() : void

Test if the current class is in the list of friend classes.

Throws an exception on failure.

add_friend()

add_friend(string $classname)

Add a class to this classes list of friends.

Typically this method is called from this classes constructor.

$this->add_friend('otherclass');

Parameters

string $classname

The class to add as a friend.