protected function buildIdAttr($eltId = null, bool $errorIfExists = false)
    {
        if ($errorIfExists && isset($this->attributes['id'])) {
            throw new \Osf\Exception\ArchException('Id element already set');
        }
        if ($eltId === null) {
            $eltId = 'e' . self::$eltIdCount++;
        }
        $this->setAttribute('id', $eltId);
        return $this;
    }
protected function buildIdAttr($eltId = null, bool $errorIfExists = false)
    {
        if ($errorIfExists && isset($this->attributes['id'])) {
            throw new \Osf\Exception\ArchException('Id element already set');
        }
        if ($eltId === null) {
            $eltId = 'e' . self::$eltIdCount++;
        }
        $this->setAttribute('id', $eltId);
        return $this;
    }
protected function buildIdAttr ( $ eltId = null , bool $ errorIfExists = false ) { if ( $ errorIfExists && isset ( $ this -> attributes [ 'id' ] ) ) { throw new \ Osf \ Exception \ ArchException ( 'Id element already set' ) ; } if ( $ eltId === null ) { $ eltId = 'e' . self :: $ eltIdCount ++ ; } $ this -> setAttribute ( 'id' , $ eltId ) ; return $ this ; }
Build an id attribute
@param string $eltId
@param bool $errorIfExists
@return $this
@throws \Osf\Exception\ArchException
Build an id attribute