public function toArray($printDefaults = false)
{
$result = array();
$reflection = new \ReflectionClass($this);
$blacklist = array('config', 'element', 'jarves', 'rootName', 'docBlock', 'docBlocks');
foreach ($reflection->getProperties() as $property) {
$k = $property->getName();
if ($property->isPrivate()) {
continue;
}
if (in_array($k, $blacklist)) {
continue;
}
$value = $this->propertyToArray($k, $printDefaults);
if (null === $value) {
continue;
}
$result[$k] = $value;
}
return $result;
}