original_string: protected function validator($input)
      {
          $this->checkValue($input);
  
          if ($this->hasErrors()) {
              return '';
          }
  
          if (!$input) {
              if ($this->mandatory) {
                  $this->addError(sprintf($GLOBALS['TL_LANG']['ERR']['mandatory'], $this->strLabel));
              }
  
              return '';
          } elseif (false === strpos($input, ',')) {
              return $this->multiple ? [(int) $input] : (int) $input;
          }
          $arrValue = array_map('intval', array_filter(explode(',', $input)));
  
          return $this->multiple ? $arrValue : $arrValue[0];
      }
code: protected function validator($input)
      {
          $this->checkValue($input);
  
          if ($this->hasErrors()) {
              return '';
          }
  
          if (!$input) {
              if ($this->mandatory) {
                  $this->addError(sprintf($GLOBALS['TL_LANG']['ERR']['mandatory'], $this->strLabel));
              }
  
              return '';
          } elseif (false === strpos($input, ',')) {
              return $this->multiple ? [(int) $input] : (int) $input;
          }
          $arrValue = array_map('intval', array_filter(explode(',', $input)));
  
          return $this->multiple ? $arrValue : $arrValue[0];
      }
code_tokens: protected function validator ( $ input ) { $ this -> checkValue ( $ input ) ; if ( $ this -> hasErrors ( ) ) { return '' ; } if ( ! $ input ) { if ( $ this -> mandatory ) { $ this -> addError ( sprintf ( $ GLOBALS [ 'TL_LANG' ] [ 'ERR' ] [ 'mandatory' ] , $ this -> strLabel ) ) ; } return '' ; } elseif ( false === strpos ( $ input , ',' ) ) { return $ this -> multiple ? [ ( int ) $ input ] : ( int ) $ input ; } $ arrValue = array_map ( 'intval' , array_filter ( explode ( ',' , $ input ) ) ) ; return $ this -> multiple ? $ arrValue : $ arrValue [ 0 ] ; }
docstring: Return an array if the "multiple" attribute is set.
  
  @param mixed $input
  
  @return mixed
docstring_tokens: Return an array if the multiple attribute is set .