protected function nameAccepted($name) { if ($this->nameValidator) { if (function_exists($this->nameValidator)) { $f = $this->nameValidator; return $f($name); } return preg_match($this->nameValidator, $name); } return true; }