compile all errors in one line
@return string
485061
public function getErrorMessage()
     {
         $messages = $this->getMessage();
         $critical = $this->getCritical();
         $msgError = "";
         $i = 0;
         foreach ($messages as $message ) {

             if ($critical[$i++]) {
                 $msgError .= "{$message}\n";
             }
         }

         return $msgError;
     }
1168716
public static function errors()
    {
        $result                    = array();
        $result['error_reporting'] = error_reporting();
        $errTypes                  = self::_getErrorTypes();

        foreach ($errTypes as $errTypeKey => $errTypeName) {
            if ($result['error_reporting'] & $errTypeKey) {
                $result['show_types'][] = $errTypeName . ' (' . $errTypeKey . ')';
            }
        }

        return self::i()->dump($result, '! errors info !');
    }
865160
protected function _compile(){
		if(!$this->regex){
			// Compile the chain
			$tokens=preg_split('#
					(?<!\\\)(
						\{[a-zA-Z_]\w+\}|
						\*|
						\+
					)
				#Ssx',
				$this->chain,
				null,
				PREG_SPLIT_DELIM_CAPTURE
			);
			$regex='';
			foreach($tokens as $token){
				$name=substr($token,1,strlen($token)-2);
				// Named slug
				if($token && $token{0}=='{'){
					$regex.='(?<'.$name.'>.*?)';
				}
				// Joker slug
				elseif($token=='*'){
					$regex.='.+?';
				}
				// Word slug
				elseif($token=='+'){
					$regex.='\w+?';
				}
				// Text
				else{
					$regex.=preg_quote(
						str_replace(
							array('\{','\*','\+'),
							array('{','*','+'),
							$token
						),
						'/'
					);
				}
				// Default value
				if(isset($this->default_values[$name])){
					$regex.='?';
				}
			}
			$this->regex="/^$regex$/Ss";
		}
		return $this->regex;
	}
1134089
public function compile()
    {
        $value = $this->value();

        if ( ! empty($this->parameters))
        {
            $params = $this->parameters;
            $value = strtr($value, $params);
        }

        return $value;
    }
468670
public function Errors() {
      $Return = '';
      if (is_array($this->_ValidationResults) && count($this->_ValidationResults) > 0) {
         $Return = "<div class=\"Messages Errors\">\n<ul>\n";
         foreach($this->_ValidationResults as $FieldName => $Problems) {
            $Count = count($Problems);
            for($i = 0; $i < $Count; ++$i) {
               if (substr($Problems[$i], 0, 1) == '@')
                  $Return .= '<li>'.substr($Problems[$i], 1)."</li>\n";
               else
                  $Return .= '<li>' . sprintf(
                     T($Problems[$i]),
                     T($FieldName)) . "</li>\n";
            }
         }
         $Return .= "</ul>\n</div>\n";
      }
      return $Return;
   }
201444
protected function createErrorString()
    {
        $str = '';
        if ( $this->errorType !== null )
        {
            $str .= ", error='{$this->errorType}'";
        }

        if ( $this->errorMessage !== null )
        {
            $str .= ", error_description='{$this->errorMessage}'";
        }
        return $str;
    }
1159216
public function getFullMessage(): string {
        $paras = [];

        if (!empty($this->getMainMessage())) {
            $paras[] = $this->getMainMessage();
        } elseif ($this->getErrorCount() === 0) {
            return '';
        }

        if (isset($this->errors[''])) {
            $paras[] = $this->formatErrorList('', $this->errors['']);
        }

        foreach ($this->errors as $field => $errors) {
            if ($field === '') {
                continue;
            }
            $paras[] = $this->formatErrorList($field, $errors);
        }

        $result = implode("\n\n", $paras);
        return $result;
    }
70907
public function getErrors()
    {
        foreach ($this->errors as $i => $error) {
            if ($error instanceof \Closure) {
                $this->errors[$i] = (string) $error();
            } elseif (!\is_string($error)) {
                $this->errors[$i] = (string) $error;
            }
        }

        return $this->errors;
    }
558054
public function getFirstError()
    {
        if (empty($this->errorMessages)) {
            return '';
        }

        reset($this->errorMessages);
        return current(current($this->errorMessages));
    }
552796
public function errorInfo(): string
    {
        if($this->lastStmt)
        {
            return $this->lastStmt->errorInfo();
        }
        else
        {
            $errorInfo = $this->instance->errorInfo();
            return !isset($errorInfo[0]) || 0 == $errorInfo[0] ? '' : implode(' ', $errorInfo);
        }
    }
1217469
private function formatBacktrace() {

		$backtrace = $this -> error -> getBacktrace();
		
		if(null !== $backtrace) {

			array_shift($backtrace);
			array_shift($backtrace);

			foreach($backtrace as $index => $stack) {

				foreach(['type', 'args'] as $type) {

					if(true === isset($backtrace[$index][$type])) {
						unset($backtrace[$index][$type]);
					}
				}
			}
		}

		return $backtrace;
	}
705666
protected function compile()
    {
        // The URI should be considered literal except for keys and optional parts
        // Escape everything preg_quote would escape except for : ( ) < >
        $regex = preg_replace('#' . self::REGEX_ESCAPE . '#', '\\\\$0', $this->uri);

        if (strpos($regex, '(') !== false) {
            // Make optional parts of the URI non-capturing and optional
            $regex = str_replace(array('(', ')'), array('(?:', ')?'), $regex);
        }

        // Insert default regex for keys
        $regex = str_replace(array('<', '>'), array('(?P<', '>' . self::REGEX_SEGMENT . ')'), $regex);

        $search = $replace = array();
        foreach ($this->regex as $key => $value) {
            $search[] = "<$key>" . self::REGEX_SEGMENT;
            $replace[] = "<$key>$value";
        }

        // Replace the default regex with the user-specified regex
        return sprintf('#^%s$#', str_replace($search, $replace, $regex));
    }
1349247
private function compile()
    {
        $shellOptions = [];
        /** @var ShellOption $shellOption */
        foreach ($this->shellOptions as $shellOption) {
            $shellOptions = array_merge($shellOptions, $shellOption->getArray());
        }

        $shellArguments = [];
        foreach ($this->shellArguments as $shellArgument) {
            $shellArguments[] = $shellArgument['value'];
        }

        $command = array_merge([$this->shellCommand], $shellOptions, $shellArguments);

        $builder = new Process($command);

        $builder->setTimeout($this->getCommandTimeout());

        $this->builder = $builder;

        return $this->builder;
    }
592354
public function error()
    {
        if (!$this->output) { return $this; }

        foreach (func_get_args() as $line) {

            if (is_array($line)) {
                call_user_func_array([ $this->output, 'write' ], $line);
                continue;
            }

            $this->output->getErrorOutput()->write($line);
        };

        return $this;
    }
994223
public function getErrorMessage()
    {
        $messages = array();
        foreach ($this->errors as $error) {
            if (isset($this->errorMessages[$error])) {
                $messages[] = $this->errorMessages[$error];
            } else{
                $messages[] = $error;
            }
        }

        return implode(' ', $messages);
    }
350412
protected function renderValidationErrors()
    {
        $arguments = $this->controllerContext->getArguments();
        $validationResults = $arguments->getValidationResults();
        $validationErrors = [];
        foreach ($validationResults->getFlattenedErrors() as $key => $errors) {
            $validationError = ['property' => $key, 'errors' => []];
            foreach ($errors as $error) {
                /** @var \TYPO3\Flow\Error\Error $error */
                $validationError['errors'][] = [
                    'message' => $error->getMessage(),
                    'code' => $error->getCode()
                ];
            }
            $validationErrors[] = $validationError;
        }
        return $validationErrors;
    }
930131
public function compile()
    {
        preg_match_all('#{(.*?)}#i', $this->format, $out);

        $compiled = $this->format;

        foreach ($out[0] as $i => $var) {
            $format = '(?P<%s>%s)%s';
            $name   = str_replace('?', '', $out[1][$i]);
            $regex  = $this->getWhere($name) ?: '.*';
            $opt    = '';

            if (substr($var, -2, 1) == '?') {
                $opt = '?';
                $compiled = str_replace('/'.$var, '/?'.$var, $compiled);
            }

            $compiled = str_replace($var, sprintf($format, $name, $regex, $opt), $compiled);
        }

        return $compiled;
    }