static function get($a)
 {
     $d = new self();
     $d->setCallback('line', array(__CLASS__, 'stackLine'));
     $d->walk($a);
     $d = implode("\n", self::$lines);
     self::$lines = array();
     return $d;
 }
 public static function factory($event = null, $type = null, $id = null, $callback = null)
 {
     if ($type instanceof Entity) {
         $callback = $id;
         $id = $type->getId();
         $type = $type->getType();
     }
     $sub = new self(array('ChannelType' => 'Post', 'EntityType' => $type, 'EntityId' => $id, 'Event' => $event));
     $sub->setCallback($callback);
     return $sub;
 }