Object for storing a list of unfolded iCalendar lines (ZCiCalDataNode objects)

public array $child = []

Array of children for this node

  • var \ZCiCalNode[] $child
public array $data = []

Array of $data for this node

  • var array<string,mixed> $data
public string $name = ''

The name of the node

public ?ICalendarOrg\ZCiCalNode $next = NULL

Next sibling of this node

public ?ICalendarOrg\ZCiCalNode $parentnode = NULL

The parent of this node

public ?ICalendarOrg\ZCiCalNode $prev = NULL

Previous sibling of this node

public __construct(string $_name, ?ICalendarOrg\ZCiCalNode $_parent, bool $first = false)

Create ZCiCalNode

  • param string $_name Name of node
  • param ?\ZCiCalNode $_parent Parent node for this node
  • param bool $first Is this the first child for this parent?
public addNode(ICalendarOrg\ZCiCalDataNode $node) : ICalendarOrg\ZCiCalNode

Add node to list

public export(?ICalendarOrg\ZCiCalNode $node = NULL, int $level = 0) : string

export tree to icalendar format

  • param ?\ZCiCalNode $node Top level node to export
  • param int $level Level of recursion (usually leave this blank)
  • throws \Exception
  • return string iCalendar formatted output
public getAttrib(int $i) : string

Get Attribute

  • param int $i array id of attribute to get
public getFirstChild() : ?ICalendarOrg\ZCiCalNode

Get the first child of this object

  • return ?\ZCiCalNode The first child
public getName() : string

Return the name of the object

public getParent() : ?ICalendarOrg\ZCiCalNode

Get the parent object of this object

  • return ?\ZCiCalNode parent of this object
public printDataLine(ICalendarOrg\ZCiCalDataNode $d, string $p) : string

print an attribute line

  • param \ZCiCalDataNode $d attributes
  • param string $p properties
public printTree(?ICalendarOrg\ZCiCalNode $node = NULL, int $level = 1) : string

Print object tree in HTML for debugging purposes

  • param ?\ZCiCalNode $node select part of tree to print, or leave blank for full tree
  • param int $level Level of recursion (usually leave this blank)
  • return string
    • HTML formatted display of object tree
public setAttrib(string $value) : ICalendarOrg\ZCiCalNode

Set Attribute

  • param string $value value of attribute to set
protected array $attrib = []
  • var array<int,string> Array of attributes for this node
© 2024 Bruce Wells
Search Namespaces \ Classes