Jose\KeyConverter\ECKey::__construct PHP Method

__construct() public method

public __construct ( Jose\Object\JWKInterface | string | array $data )
$data Jose\Object\JWKInterface | string | array
    public function __construct($data)
    {
        parent::__construct();
        if ($data instanceof JWKInterface) {
            $this->loadJWK($data->getAll());
        } elseif (is_array($data)) {
            $this->loadJWK($data);
        } elseif (is_string($data)) {
            $this->loadPEM($data);
        } else {
            throw new \InvalidArgumentException('Unsupported input');
        }
        $this->private = isset($this->values['d']);
    }