Documer\Storage\Memory::getTotalDocsGroupByLabel PHP Method

getTotalDocsGroupByLabel() public method

Get how many documents we have seen so far for each label
public getTotalDocsGroupByLabel ( ) : array
return array
    public function getTotalDocsGroupByLabel()
    {
        $results = array();
        foreach ($this->labels as $l) {
            if (isset($results[$l])) {
                $results[$l] += 1;
            } else {
                $results[$l] = 1;
            }
        }
        return $results;
    }