Gajus\Dora\Input::getAttribute PHP Method

getAttribute() public method

If [id] is undefined at the time of request, Dora will use instance UID.
public getAttribute ( $name ) : null | string
return null | string Attribute value.
    public function getAttribute($name)
    {
        if ($name === 'id' && !isset($this->attributes['id'])) {
            if ($this->is_stringified) {
                throw new Exception\LogicException('Too late to generate random [id].');
            }
            $this->attributes['id'] = isset($this->properties['uid']) ? 'dora-input-' . $this->properties['uid'] : 'dora-input-' . $this->getUid();
        }
        return isset($this->attributes[$name]) ? $this->attributes[$name] : null;
    }