src/Core/Configure.php
public static function consume($var)
    {
        if (strpos($var, '.') === false) {
            if (!isset(static::$values[$var])) {
                return null;
            }
            $value = static::$values[$var];
            unset(static::$values[$var]);

            return $value;
        }
        $value = Hash::get(static::$values, $var);
        static::delete($var);

        return $value;
    }
public static function consume($var)
    {
        if (strpos($var, '.') === false) {
            if (!isset(static::$values[$var])) {
                return null;
            }
            $value = static::$values[$var];
            unset(static::$values[$var]);

            return $value;
        }
        $value = Hash::get(static::$values, $var);
        static::delete($var);

        return $value;
    }
Used to read and delete a variable from Configure.

@param string $var The key to read and remove.

@return array|null