<?php

namespace Plainwork\Ui\Component\Form;

use Plainwork\Http\Request;
use Plainwork\Ui\Component\Form\AbstractInput;

class PasswordInput extends AbstractInput
{
    private string $value = '';

    public function grab(Request $request): ?string
    {
        return $request->getPostParam($this->getName());
    }

    public function setValue(string $v): self
    {
        $this->value = $v;

        return $this;
    }

    public function getValue(): ?string
    {
        return $this->value;
    }
}
