public function doingAction(string $action = '', bool $flag = null): bool
    {
        if ($action && isset($flag)) {
            $this->doing_actions[$action] = $flag;
        }
        if ($action) {
            return $this->doing_actions[$action] ?? false;
        } else {
            return !empty($this->doing_actions);
        }
    }
public function doingAction(string $action = '', bool $flag = null): bool
    {
        if ($action && isset($flag)) {
            $this->doing_actions[$action] = $flag;
        }
        if ($action) {
            return $this->doing_actions[$action] ?? false;
        } else {
            return !empty($this->doing_actions);
        }
    }
public function doingAction ( string $ action = '' , bool $ flag = null ) : bool { if ( $ action && isset ( $ flag ) ) { $ this -> doing_actions [ $ action ] = $ flag ; } if ( $ action ) { return $ this -> doing_actions [ $ action ] ?? false ; } else { return ! empty ( $ this -> doing_actions ) ; } }
Doing an action?

@since 170623.50532 Action utils.

@param string     $action Action to add or check.
@param mixed|null $data   If adding action data.

@return bool True if doing the action.
Doing an action?