-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #15 - first pass routines to analyse current situation
- Loading branch information
1 parent
f7a5bac
commit 1f74de1
Showing
10 changed files
with
3,002 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Herb Miller,QW/Herb,qw,09.03.2018 14:28,file:///C:/Users/Herb/AppData/Roaming/OpenOffice/4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
/** | ||
* @copyright (C) Bobbing Wide 2018 | ||
* @package oik-block | ||
*/ | ||
|
||
class component_counter { | ||
|
||
|
||
public $components; | ||
|
||
public function __construct() { | ||
$this->components = array(); | ||
$this->components['plugins'] = array(); | ||
$this->components['themes'] = array(); | ||
} | ||
|
||
public function add( $component, $type ) { | ||
if ( !isset( $this->components[ $type ][ $component ] ) ) { | ||
$this->components[ $type ][ $component ] = 0; | ||
} | ||
$this->components[ $type ][ $component ] += 1; | ||
} | ||
|
||
public function report() { | ||
//print_r( $this->components ); | ||
echo "Type,Component,Count" . PHP_EOL; | ||
$components = 0; | ||
foreach ( $this->components as $type => $data ) { | ||
foreach ( $data as $component => $count ) { | ||
echo "$type,$component,$count" . PHP_EOL; | ||
$total += $count; | ||
$components++; | ||
} | ||
} | ||
echo "Totals,$components,$total" . PHP_EOL; | ||
} | ||
|
||
} |
Oops, something went wrong.