public function setType($type, $attribute = NULL) { $this->addToPropertyCtrl("class", $type, RevealType::getConstants()); if (isset($attribute)) { $this->addToPropertyCtrl("class", $attribute, Direction::getConstants()); } return $this; }