From e2e83df93a77ff7d7597384a26d17a0aef2eb232 Mon Sep 17 00:00:00 2001 From: Silvio Date: Fri, 30 Jul 2010 10:51:29 -0300 Subject: Adding missing class files --- lib/sfIsisImporterStats.class.php | 78 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 lib/sfIsisImporterStats.class.php (limited to 'lib/sfIsisImporterStats.class.php') diff --git a/lib/sfIsisImporterStats.class.php b/lib/sfIsisImporterStats.class.php new file mode 100644 index 0000000..d7dae34 --- /dev/null +++ b/lib/sfIsisImporterStats.class.php @@ -0,0 +1,78 @@ +stats = array(); + } + + /** + * Simple accumulator. + * + * @param string $section Section name + */ + public function increase($section) + { + $this->stats[$section]++; + } + + /** + * Compute soundex. + * + * @param string $name Name + */ + public function soundex($name) { + $this->stats['sounded'][soundex($name)] = $name; + } + + /** + * Compute metaphone. + * + * @param string $name Name + */ + public function metaphone($name) { + $this->stats['sounded'][metaphone($name)] = $name; + } + + /** + * Compute similar words indexes. + * + * @param string $name Name + */ + public function similar($name) { + $this->soundex($name); + $this->metaphone($name); + } + + /** + * Display statistics. + * + * @todo Write and test + */ + public function display() { + } +} -- cgit v1.2.3