Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AbstractStorage.php

function AbstractStorage::set

Set specific key/value pair

@throw \WebDriver\Exception\UnexpectedParameters if unexpected parameters

Return value

\WebDriver\Storage\AbstractStorage

File

vendor/lullabot/php-webdriver/lib/WebDriver/Storage/AbstractStorage.php, line 68

Class

AbstractStorage
WebDriver\AbstractStorage class

Namespace

WebDriver\Storage

Code

public function set() {
    if (func_num_args() === 1 && is_array($arg = func_get_arg(0))) {
        $this->curl('POST', '', $arg);
        return $this;
    }
    if (func_num_args() === 2) {
        $arg = array(
            'key' => func_get_arg(0),
            'value' => func_get_arg(1),
        );
        $this->curl('POST', '', $arg);
        return $this;
    }
    throw WebDriverException::factory(WebDriverException::UNEXPECTED_PARAMETERS);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal