Page MenuHomestyx hydra

AphrontView.php
No OneTemporary

AphrontView.php

<?php
abstract class AphrontView {
protected $children = array();
final public function appendChild($child) {
$this->children[] = $child;
return $this;
}
final protected function renderChildren() {
$out = array();
foreach ($this->children as $child) {
$out[] = $this->renderSingleView($child);
}
return implode('', $out);
}
final protected function renderSingleView($child) {
if ($child instanceof AphrontView) {
return $child->render();
} else if (is_array($child)) {
$out = array();
foreach ($child as $element) {
$out[] = $this->renderSingleView($element);
}
return implode('', $out);
} else {
return $child;
}
}
abstract public function render();
public function __set($name, $value) {
phlog('Wrote to undeclared property '.get_class($this).'::$'.$name.'.');
$this->$name = $value;
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Nov 21, 12:57 PM (9 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
352796
Default Alt Text
AphrontView.php (916 B)

Event Timeline