public function read()
    {
        $request = Router::getRequest();
        if (!empty($request) && empty($this->_postData)) {
            $this->_postData = (array)$request->data();
        }

        if (!empty($this->_postData)) {
            $keys = array_keys($this->_postData);
            $first = array_shift($keys);
            $value = $this->_postData[$first];
            unset($this->_postData[$first]);

            return $value;
        }

        return false;
    }
public function read()
    {
        $request = Router::getRequest();
        if (!empty($request) && empty($this->_postData)) {
            $this->_postData = (array)$request->data();
        }

        if (!empty($this->_postData)) {
            $keys = array_keys($this->_postData);
            $first = array_shift($keys);
            $value = $this->_postData[$first];
            unset($this->_postData[$first]);

            return $value;
        }

        return false;
    }
public function read ( ) { $ request = Router :: getRequest ( ) ; if ( ! empty ( $ request ) && empty ( $ this -> _postData ) ) { $ this -> _postData = ( array ) $ request -> data ( ) ; } if ( ! empty ( $ this -> _postData ) ) { $ keys = array_keys ( $ this -> _postData ) ; $ first = array_shift ( $ keys ) ; $ value = $ this -> _postData [ $ first ] ; unset ( $ this -> _postData [ $ first ] ) ; return $ value ; } return false ; }
Read a value from POST data.

It reads the first input and removes that value from the stack,
so consecutive readings are supported as follow:

**Incoming POST data array**

```php
[
'input1' => 'value1',
'input2' => 'value2',
'input3' => 'value3',
]
```

**Reading from POST**:

```php
$this->read(); // returns "value1"
$this->read(); // returns "value2"
$this->read(); // returns "value3"
$this->read(); // returns false
```

@return mixed The value from POST data
Read a value from POST data .