public function setType($type, $all = true) { if (empty($type)) { return false; } if ($all) { $type = FN::lastName($type); } $this->type = array_search($type, self::$_TypeArray); return $this->type; }