protected function isNameValid($name)
    {
        if (is_string($name) === false) {
            return false;
        }

        $match = preg_match(self::PATTERN_VALIDATE_NAME, $name);
        if ($name === '' || $match === false || $match <= 0) {
            return false;
        } else {
            return true;
        }
    }
protected function isNameValid($name)
    {
        if (is_string($name) === false) {
            return false;
        }

        $match = preg_match(self::PATTERN_VALIDATE_NAME, $name);
        if ($name === '' || $match === false || $match <= 0) {
            return false;
        } else {
            return true;
        }
    }
protected function isNameValid ( $ name ) { if ( is_string ( $ name ) === false ) { return false ; } $ match = preg_match ( self :: PATTERN_VALIDATE_NAME , $ name ) ; if ( $ name === '' || $ match === false || $ match <= 0 ) { return false ; } else { return true ; } }
Check if the name is valid.

@param string $name The name to check.
@return boolean
Check if the name is valid .