Skip to content
lrezek edited this page Oct 6, 2014 · 2 revisions

Arachnid supports 2 types of entities: Nodes and Relations. To make a class a node, simply add the LRezek\Arachnid\Annotation\Node annotation to the class. For example:

/**
 * @LRezek\Arachnid\Annotation\Node
 */
class User
{
    ...
}

Similarly, you can make a class a relation as follows:

/**
 * @LRezek\Arachnid\Annotation\Relation
 */
class FriendsWith
{
    ...
}

You can also import the LRezek\Arachnid\Annotation namespace to reduce the annotation length. For example:

use LRezek\Arachnid\Annotation as Arachnid;

/**
 * @Arachnid\Node
 */
class User
{
 
}

Each of these entities has certain required parameters, which are explained at length in the corresponding section.

Clone this wiki locally