src/snac/server/database/DBUtil.php
/**
     * Read Analytics
     *
     * Read outbound link traffic analytics
     *
     * @param string $domain The unique domain to return counts for.
     * @return array $visits Array of dates, hit counts, and total hits.
     */
Read Analytics
Read outbound link traffic analytics

@param string $domain The unique domain to return counts for.
@return array $visits Array of dates, hit counts, and total hits.
Read Analytics Read outbound link traffic analytics @param string $domain The unique domain to return counts for . @return array $visits Array of dates hit counts and total hits .
public function readAnalyticsByDomain($domain) {
        $results =  $this->sql->selectAnalyticsByDomain($domain);
        $visits = [["Date"], ["Count"], ["Total" => 0]];
        if ($results) {
            foreach ($results as $result) {
                $visits[0][] = $result["date"];
                $visits[1][] = $result["count"];
                $visits[2]["Total"] += $result["count"];
            }
        }
        return $visits;
    }
public function readAnalyticsByDomain ( $ domain ) { $ results = $ this -> sql -> selectAnalyticsByDomain ( $ domain ) ; $ visits = [ [ " Date " ] , [ " Count " ] , [ " Total " => 0 ] ] ; if ( $ results ) { foreach ( $ results as $ result ) { $ visits [ 0 ] [ ] = $ result [ " date " ] ; $ visits [ 1 ] [ ] = $ result [ " count " ] ; $ visits [ 2 ] [ " Total " ] += $ result [ " count " ] ; } } return $ visits ; }
Read Analytics
 Read outbound link traffic analytics
Read Analytics Read outbound link traffic analytics