Ferreteria/v0.6/clade/IO/Aspect/Connx/Buffer/@removed

From Woozle Writes Code
< Ferreteria‎ | v0.6‎ | clade‎ | IO‎ | Aspect‎ | Connx‎ | Buffer
Revision as of 02:45, 28 November 2025 by Woozle (talk | contribs) (Created page with "{{fmt/title|Removed Code}} =={{fmt/date|2025|03|18}}== Rewritten API, I think: {{fmt/php/block|1=# private int $nByCurr = 0; private int $nByTotal = 0; protected function ResetBytes() : void { $this->nByTotal = $this->nByCurr = 0; } protected function IncCount(int $nBytes) : void { $this->nByCurr += $nBytes; $this->nByTotal += $nBytes; } public function TotalInByteCount() : int { return $this->nByTotal; } public function AvailInByteCou...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Removed Code

2025-03-18

Rewritten API, I think:

#
    private int $nByCurr = 0;
    private int $nByTotal = 0;
    protected function ResetBytes() : void {
        $this->nByTotal = $this->nByCurr = 0;
    }
    protected function IncCount(int $nBytes) : void { $this->nByCurr += $nBytes; $this->nByTotal += $nBytes; }
    public function TotalInByteCount() : int { return $this->nByTotal; }
    public function AvailInByteCount() : int { return $this->nByCurr; }

    // -- COUNTERS -- //
    // ++ ACCESS ++ //

    public function HasBytes() : bool { return ($this->AvailInByteCount() > 0); }
    public function RewindAll() : void { $this->ResetBytes(); } // STUB, should be expanded on
    public function AppendBytes(string $s) { echo $this->MethodPrompt(); die(); }
    public function RemoveBytes() : string { echo $this->MethodPrompt(); die(); }

    // -- ACCESS -- //