public function post($name = null, $default = null, $filter = true, $type = null)
    {
        $post = $this->request['post'];

        if ($filter !== 'raw') {
            gplcart_array_trim($post, (bool) $filter);
        }

        if (isset($name)) {
            $result = gplcart_array_get($post, $name);
            $return = isset($result) ? $result : $default;
        } else {
            $return = $post;
        }

        gplcart_settype($return, $type, $default);
        return $return;
    }
public function post($name = null, $default = null, $filter = true, $type = null)
    {
        $post = $this->request['post'];

        if ($filter !== 'raw') {
            gplcart_array_trim($post, (bool) $filter);
        }

        if (isset($name)) {
            $result = gplcart_array_get($post, $name);
            $return = isset($result) ? $result : $default;
        } else {
            $return = $post;
        }

        gplcart_settype($return, $type, $default);
        return $return;
    }
public function post ( $ name = null , $ default = null , $ filter = true , $ type = null ) { $ post = $ this -> request [ 'post' ] ; if ( $ filter !== 'raw' ) { gplcart_array_trim ( $ post , ( bool ) $ filter ) ; } if ( isset ( $ name ) ) { $ result = gplcart_array_get ( $ post , $ name ) ; $ return = isset ( $ result ) ? $ result : $ default ; } else { $ return = $ post ; } gplcart_settype ( $ return , $ type , $ default ) ; return $ return ; }
Returns a data from POST request
@param string|array $name
@param mixed $default
@param bool|string $filter
@param null|string $type
@return mixed
Returns a data from POST request