_deprecated_argument

Description

Function is used to mark when a function or class method’s argument/parameter is deprecated and informs when it is being used. This is only triggered when the APP_ENV constant in the root index.php file is set to DEV instead of PROD.

Usage

<?php _deprecated_argument($function_name, $release, $message = null); ?>

Parameters

$function_name (string) (required) The function that was called.

$release (string) (required) The release of eduTrac SIS that deprecated the function’s argument/parameter.

$message (string) (optional) The message you would like printed. Default null.

Return Values

(string) Returns a message alerting to a deprecated function’s argument/parameter that should no longer be used.

Examples

function get_students($id) {
    if(!empty($id)) {
        _deprecated_argument(__FUNCTION__, '6.1.12', 'The argument $id is deprecated and no longer should be used.');
    }
}

Notes

Change Log

Since 6.2.0

Source File

_deprecated_argument is located in app/functions/hook-function.php.