public function data(string $action = '', bool $allow_dimensions = false)
    {
        $action = $action ?: $this->action;

        if (!$this->action) {
            return; // Not applicable.
        } elseif ($action !== $this->action) {
            return; // Not applicable.
        } elseif (!isset($_REQUEST[$this->data_var])) {
            return; // Not applicable.
        }
        $data = $_REQUEST[$this->data_var];

        if (is_object($data)) {
            $data = (array) $data;
        }
        $data = $this->c::removeKey($data, '___ignore');
        // Removes keys needed to make forms submit an empty array.

        if (!$allow_dimensions && is_array($data)) {
            $data = array_map('strval', $data);
        }
        $data = $this->c::unslash($data);
        $data = $this->c::mbTrim($data);

        return $data;
    }
public function data(string $action = '', bool $allow_dimensions = false)
    {
        $action = $action ?: $this->action;

        if (!$this->action) {
            return; // Not applicable.
        } elseif ($action !== $this->action) {
            return; // Not applicable.
        } elseif (!isset($_REQUEST[$this->data_var])) {
            return; // Not applicable.
        }
        $data = $_REQUEST[$this->data_var];

        if (is_object($data)) {
            $data = (array) $data;
        }
        $data = $this->c::removeKey($data, '___ignore');
        // Removes keys needed to make forms submit an empty array.

        if (!$allow_dimensions && is_array($data)) {
            $data = array_map('strval', $data);
        }
        $data = $this->c::unslash($data);
        $data = $this->c::mbTrim($data);

        return $data;
    }
public function data ( string $ action = '' , bool $ allow_dimensions = false ) { $ action = $ action ? : $ this -> action ; if ( ! $ this -> action ) { return ; // Not applicable. } elseif ( $ action !== $ this -> action ) { return ; // Not applicable. } elseif ( ! isset ( $ _REQUEST [ $ this -> data_var ] ) ) { return ; // Not applicable. } $ data = $ _REQUEST [ $ this -> data_var ] ; if ( is_object ( $ data ) ) { $ data = ( array ) $ data ; } $ data = $ this -> c :: removeKey ( $ data , '___ignore' ) ; // Removes keys needed to make forms submit an empty array. if ( ! $ allow_dimensions && is_array ( $ data ) ) { $ data = array_map ( 'strval' , $ data ) ; } $ data = $ this -> c :: unslash ( $ data ) ; $ data = $ this -> c :: mbTrim ( $ data ) ; return $ data ; }
Action data.

@since 160608 ReST utils.

@param string $action           Action identifier.
@param bool   $allow_dimensions Allow multiple dimensions?

@return array|string|null Action data.
Action data .