Function that displays an error message when an End-User attempts to use a function no longer included in Peachy

@param null|string $method
@param null|string $newFunction
@param string $message
356409
public static function deprecatedWarn($method, $newFunction, $message = null)
	{
		if( is_null( $message ) ) {
			$message = "Warning: $method is deprecated. Please use $newFunction instead.";
		}

		$message = "[$message|YELLOW_BAR]\n\n";

		pecho( $message, PECHO_WARN, 'cecho' );
	}
965645
function(object, methods) {
        _.each(methods, function(method, name) {
            if (!_.isFunction(method)) {
                throw new Error('Method "' + name + '" must be a function!');
            }
            object[name] = method
        });
    }
591502
public function PEAR_Error($message = 'unknown error', $code = null,
                        $mode = null, $options = null, $userinfo = null) {
        self::__construct($message, $code, $mode, $options, $userinfo);
    }
800978
protected function addError($name, $customMessage = null)
    {
        $this->errors[$name] = $customMessage ?: $this->message ?: $this->{$name . 'Message'};
    }
243000
public function notifyError($name, $message, callable $callback = null)
    {
        $report = Report::fromNamedError($this->config, $name, $message);

        $this->notify($report, $callback);
    }
84657
public function setError($code, $message = '', Exception $innerException = null)
    {
        if ($code == static::ERR_NONE && !$message && $innerException === null) {
            $this->errorCode = static::ERR_NONE;
            $this->errorMessage = '';
            $this->innerException = null;
        } else {
            $code = (int) $code;
            $this->errorCode = $code === static::ERR_NONE ? static::ERR_OTHER : $code;
            $message = trim((string) $message);
            if ($message === '') {
                switch ($this->errorCode) {
                    case static::ERR_NOCURRENTLIBRARY:
                        $this->errorMessage = t("There's no current geolocation library");
                        break;
                    case static::ERR_NOCURRENTIPADDRESS:
                        $this->errorMessage = t('The IP address of the current client is not available');
                        break;
                    case static::ERR_IPNOTPUBLIC:
                        $this->errorMessage = t('The IP address is not in the public IP address ranges');
                        break;
                    case static::ERR_MISCONFIGURED:
                        $this->errorMessage = t('The geolocation library is misconfigured');
                        break;
                    case static::ERR_NETWORK:
                        $this->errorMessage = t('A network error occurred during the geolocalization');
                        break;
                    case static::ERR_LIBRARYSPECIFIC:
                        $this->errorMessage = t('An unspecified error occurred in the geolocation library');
                        break;
                    default:
                        $this->errorMessage = t('An unexpected error occurred in the geolocation library');
                }
            } else {
                $this->errorMessage = $message;
            }
            $this->innerException = $innerException;
        }
    }
890441
protected function throwsBadMethodCallException(/*# string */ $method)
    {
        throw new Exception\BadMethodCallException(
            Message::get(Message::IMMUTABLE_EVENT_METHOD, $method),
            Message::IMMUTABLE_EVENT_METHOD
        );
    }
995786
public function addRule($rule, $method = null, $params = [], $message = null)
    {

        // construction des paramètres
        array_unshift($params, $rule, $method);

        call_user_func_array([$this->getValidator(), 'addRule'], $params);

        if (!is_null($message)) {
            if(is_array($message)){
                foreach($message as $rule => $message){
                    $this->getValidator()->addMessage($rule, $message);
                }
            }else{
                $this->getValidator()->addMessage($rule, $message);
            }
        }

        return $this;
    }
1048423
public function returnError($exception, $method, $message)
    {
        Yii::error($exception, $method);
        return $message . ':' . Html::tag('pre', $exception);
    }
1095823
function warnOnDeprecation( oldMethod, newMethod ) {
	return function() {
		if ( console.warn || console.log ) {
			var msg = "Warning, the " + oldMethod + " method has been deprecated. Please use " + newMethod + " instead.";
			if ( console.warn ) {
				console.warn( msg );
			} else {
				console.log( msg );
			}
		}
		return SubscriptionDefinition.prototype[ newMethod ].apply( this, arguments );
	};
}
1087492
protected function call($eventName, $method, $data = null)
    {
        if (method_exists($this, $method)) {
            $result = call_user_func_array([$this, $method], $data);
            return $result;
        }

        return null;
    }
432984
protected function addError(string $name, array $parameters, string $message = '')
    {
        if (array_key_exists('message', $parameters) &&
            Assert::stringNotEmpty($parameters['message'])
        ) {
            $message = trim($parameters['message']);
        }

        $this->validator->addError(sprintf($message, $name));
    }
249999
protected function error($message='',$jumpUrl='',$ajax=false) {
        $this->dispatchJump($message,0,$jumpUrl,$ajax);
    }
1116868
private function doCallback($method = null)
    {

        $callback = $method;
        if (is_null($callback)) {
            $callback = self::$METHOD_NAMES[$_POST['lti_message_type']];
        }
        if (method_exists($this, $callback)) {
            $result = $this->$callback();
        } else if (is_null($method) && $this->ok) {
            $this->ok = false;
            $this->reason = "Message type not supported: {$_POST['lti_message_type']}";
        }
        if ($this->ok && ($_POST['lti_message_type'] == 'ToolProxyRegistrationRequest')) {
            $this->consumer->save();
        }

    }
1127867
protected function validateMethod($method)
    {
        if (null === $method) {
            return;
        }

        if (!is_string($method)) {
            throw new InvalidArgumentException('HTTP method must be a string.');
        }

        if (!preg_match('/^[!#$%&\'*+.^_`\|~0-9a-z-]+$/i', $method)) {
            throw new InvalidArgumentException(sprintf('Invalid HTTP method "%s"', $method));
        }
    }
373773
function NameError(message) {
  Error.call(this);
  Error.captureStackTrace(this, arguments.callee);
  this.name = 'Middleware Name Error';
  this.message = message || 'The argument must be a named function or supply a name';
}
497972
function JFP_Error(message) {
    Error.call(this, message);

    Object.defineProperty(this, "name", {
        value: this.constructor.name
    });

    Object.defineProperty(this, "message", {
        value: message
    });

    if (Error.captureStackTrace) {
        Error.captureStackTrace(this, this.constructor);
    } else {
        Object.defineProperty(this, "stack", {
            value: (new Error()).stack
        });
    }
}