Redaxscript\Request::setPost PHP Метод

setPost() публичный Метод

set item to post
С версии: 2.2.0
public setPost ( string $key = null, string $value = null )
$key string key of the item
$value string value of the item
    public function setPost($key = null, $value = null)
    {
        self::$_requestArray['post'][$key] = $value;
    }

Usage Example

Пример #1
0
 /**
  * testPost
  *
  * @since 2.2.0
  */
 public function testPost()
 {
     /* setup */
     Request::setPost('testKey', 'testValue');
     /* result */
     $result = Request::getPost('testKey');
     /* compare */
     $this->assertEquals('testValue', $result);
 }