src/Shell/PurifierShell.php
public function purify()
    {
        $table = $this->_getTable();
        $fields = $this->_getFields($table);
        $this->_loadBehavior($table, $fields);

        $query = $table->find();
        if ($table->hasFinder('purifier')) {
            $query->find('purifier');
        }
        $total = $query->all()->count();

        $this->info(__d('Burzum/HtmlPurifier', 'Sanitizing fields `{0}` in table `{1}`', implode(',', $fields), $table->table()));

        $this->helper('progress')->output([
            'total' => $total,
            'callback' => function ($progress) use ($total, $table, $fields) {
                $chunkSize = 25;
                $chunkCount = 0;
                while ($chunkCount <= $total) {
                    $this->_process($table, $chunkCount, $chunkSize, $fields);
                    $chunkCount = $chunkCount + $chunkSize;
                    $progress->increment($chunkSize);
                    $progress->draw();
                }
                return;
            }
        ]);
    }
public function purify()
    {
        $table = $this->_getTable();
        $fields = $this->_getFields($table);
        $this->_loadBehavior($table, $fields);

        $query = $table->find();
        if ($table->hasFinder('purifier')) {
            $query->find('purifier');
        }
        $total = $query->all()->count();

        $this->info(__d('Burzum/HtmlPurifier', 'Sanitizing fields `{0}` in table `{1}`', implode(',', $fields), $table->table()));

        $this->helper('progress')->output([
            'total' => $total,
            'callback' => function ($progress) use ($total, $table, $fields) {
                $chunkSize = 25;
                $chunkCount = 0;
                while ($chunkCount <= $total) {
                    $this->_process($table, $chunkCount, $chunkSize, $fields);
                    $chunkCount = $chunkCount + $chunkSize;
                    $progress->increment($chunkSize);
                    $progress->draw();
                }
                return;
            }
        ]);
    }
public function purify ( ) { $ table = $ this -> _getTable ( ) ; $ fields = $ this -> _getFields ( $ table ) ; $ this -> _loadBehavior ( $ table , $ fields ) ; $ query = $ table -> find ( ) ; if ( $ table -> hasFinder ( 'purifier' ) ) { $ query -> find ( 'purifier' ) ; } $ total = $ query -> all ( ) -> count ( ) ; $ this -> info ( __d ( 'Burzum/HtmlPurifier' , 'Sanitizing fields `{0}` in table `{1}`' , implode ( ',' , $ fields ) , $ table -> table ( ) ) ) ; $ this -> helper ( 'progress' ) -> output ( [ 'total' => $ total , 'callback' => function ( $ progress ) use ( $ total , $ table , $ fields ) { $ chunkSize = 25 ; $ chunkCount = 0 ; while ( $ chunkCount <= $ total ) { $ this -> _process ( $ table , $ chunkCount , $ chunkSize , $ fields ) ; $ chunkCount = $ chunkCount + $ chunkSize ; $ progress -> increment ( $ chunkSize ) ; $ progress -> draw ( ) ; } return ; } ] ) ; }
Purifies data base content.

@return void
Purifies data base content .