public static function deprecate($alternative = '', $continue = true)
	{
		if (!self::$_enabled) {
			return;
		}

		if (self::$ensureByGet && !isset($_GET['debug'])) {
			return;
		}

		$debug = new THEDEBUG\ADEBUG();

		/* Get the deprecated method/function name */
		$scope = $debug->getScope();

		/* You can not deprecate the global namespace */
		if ($scope->type === 'global') {
			return;
		}

		/* Write a nice message */
		$message = sprintf(
			'Deprecated usage of %s "%s".',
			$scope->type,
			$scope->name
		);

		/* Add alternative hint if given */
		if (!empty($alternative)) {
			$message .= sprintf(
				' Please consider using "%s" instead.',
				$alternative
			);
		}

		/* Manipulate the offset so the debug will point to the deprecated method call */
		$debug->backTraceOffset++;
		$debug->setLineAndFile();

		/* Set the message, type and put */
		$debug->variable = $message;
		$debug->type = 'warning';
		$debug->variableType = 'string';
		$debug->put();

		if ($debug->modus === 'FirePHP') {
			self::$_FirePHP->trace('');
		}

		/* Die if continue is false */
		if (!$continue) {
			die();
		}
	}
public static function deprecate($alternative = '', $continue = true)
	{
		if (!self::$_enabled) {
			return;
		}

		if (self::$ensureByGet && !isset($_GET['debug'])) {
			return;
		}

		$debug = new THEDEBUG\ADEBUG();

		/* Get the deprecated method/function name */
		$scope = $debug->getScope();

		/* You can not deprecate the global namespace */
		if ($scope->type === 'global') {
			return;
		}

		/* Write a nice message */
		$message = sprintf(
			'Deprecated usage of %s "%s".',
			$scope->type,
			$scope->name
		);

		/* Add alternative hint if given */
		if (!empty($alternative)) {
			$message .= sprintf(
				' Please consider using "%s" instead.',
				$alternative
			);
		}

		/* Manipulate the offset so the debug will point to the deprecated method call */
		$debug->backTraceOffset++;
		$debug->setLineAndFile();

		/* Set the message, type and put */
		$debug->variable = $message;
		$debug->type = 'warning';
		$debug->variableType = 'string';
		$debug->put();

		if ($debug->modus === 'FirePHP') {
			self::$_FirePHP->trace('');
		}

		/* Die if continue is false */
		if (!$continue) {
			die();
		}
	}
public static function deprecate ( $ alternative = '' , $ continue = true ) { if ( ! self :: $ _enabled ) { return ; } if ( self :: $ ensureByGet && ! isset ( $ _GET [ 'debug' ] ) ) { return ; } $ debug = new THEDEBUG \ ADEBUG ( ) ; /* Get the deprecated method/function name */ $ scope = $ debug -> getScope ( ) ; /* You can not deprecate the global namespace */ if ( $ scope -> type === 'global' ) { return ; } /* Write a nice message */ $ message = sprintf ( 'Deprecated usage of %s "%s".' , $ scope -> type , $ scope -> name ) ; /* Add alternative hint if given */ if ( ! empty ( $ alternative ) ) { $ message .= sprintf ( ' Please consider using "%s" instead.' , $ alternative ) ; } /* Manipulate the offset so the debug will point to the deprecated method call */ $ debug -> backTraceOffset ++ ; $ debug -> setLineAndFile ( ) ; /* Set the message, type and put */ $ debug -> variable = $ message ; $ debug -> type = 'warning' ; $ debug -> variableType = 'string' ; $ debug -> put ( ) ; if ( $ debug -> modus === 'FirePHP' ) { self :: $ _FirePHP -> trace ( '' ) ; } /* Die if continue is false */ if ( ! $ continue ) { die ( ) ; } }
Flag a function as deprecated by placing this method inside it.

@param string  $alternative an alternative function that should be used instead.
@param boolean $continue    true to die

@return void
Flag a function as deprecated by placing this method inside it .