public function run($type = 'default')
    {
        $this->stdout("dump {$type}:\n", Console::FG_GREEN);
        switch ($type) {
            case 'default':
                foreach ($this->ipv4->getQueries() as $name => $query) {
                    $this->dumpDefault($query, $name);
                }
                break;
            case 'division':
                foreach ($this->ipv4->getQueries() as $name => $query) {
                    $this->dumpDivision($query, $name);
                }
                break;
            case 'division_id':
                foreach ($this->ipv4->getQueries() as $name => $query) {
                    if (FileQuery::is_a($query)) {
                        $this->dumpDivisionWithId($query, $name);
                    }
                }
                break;
            default:
                $this->stderr("Unknown type \"{$type}\".\n", Console::FG_GREY, Console::BG_RED);
                break;
        }
    }
public function run($type = 'default')
    {
        $this->stdout("dump {$type}:\n", Console::FG_GREEN);
        switch ($type) {
            case 'default':
                foreach ($this->ipv4->getQueries() as $name => $query) {
                    $this->dumpDefault($query, $name);
                }
                break;
            case 'division':
                foreach ($this->ipv4->getQueries() as $name => $query) {
                    $this->dumpDivision($query, $name);
                }
                break;
            case 'division_id':
                foreach ($this->ipv4->getQueries() as $name => $query) {
                    if (FileQuery::is_a($query)) {
                        $this->dumpDivisionWithId($query, $name);
                    }
                }
                break;
            default:
                $this->stderr("Unknown type \"{$type}\".\n", Console::FG_GREY, Console::BG_RED);
                break;
        }
    }
public function run ( $ type = 'default' ) { $ this -> stdout ( "dump {$type}:\n" , Console :: FG_GREEN ) ; switch ( $ type ) { case 'default' : foreach ( $ this -> ipv4 -> getQueries ( ) as $ name => $ query ) { $ this -> dumpDefault ( $ query , $ name ) ; } break ; case 'division' : foreach ( $ this -> ipv4 -> getQueries ( ) as $ name => $ query ) { $ this -> dumpDivision ( $ query , $ name ) ; } break ; case 'division_id' : foreach ( $ this -> ipv4 -> getQueries ( ) as $ name => $ query ) { if ( FileQuery :: is_a ( $ query ) ) { $ this -> dumpDivisionWithId ( $ query , $ name ) ; } } break ; default : $ this -> stderr ( "Unknown type \"{$type}\".\n" , Console :: FG_GREY , Console :: BG_RED ) ; break ; } }
dump ip database

@param string $type division or division_id

@throws \Exception
dump ip database