flag Class Reference

Handles dead code such as methods marked for deprecation. More...

Static Public Member Functions

static deprecation_kills ()
 Should we kill the current process? Typically used in CI or in development environments.
static deprecated ($thing, $message="")
 You want to soft-deprecate something - calling deprecated() from any Ninja method in production will be a noop, but the call will error out when in development mode.

Detailed Description

Handles dead code such as methods marked for deprecation.

If you want to implement support for feature-flags, this could be the place for that supporting code.


Member Function Documentation

static flag::deprecated ( thing,
message = "" 
) [static]

You want to soft-deprecate something - calling deprecated() from any Ninja method in production will be a noop, but the call will error out when in development mode.

'Development mode' is defined by

See also:
deprecation_kills.
Parameters:
$thing string
$message string = ""
Exceptions:
DeprecationException 
static flag::deprecation_kills (  )  [static]

Should we kill the current process? Typically used in CI or in development environments.

Returns:
boolean

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables

Generated on 19 Dec 2018 for ninja by  doxygen 1.6.1