protected function gc(&$manifest)
    {
        if (count($manifest) > $this->module->historySize + 10) {
            $n = count($manifest) - $this->module->historySize;
            foreach (array_keys($manifest) as $tag) {
                $file = $this->module->dataPath . "/$tag.data";
                @unlink($file);
                if (isset($manifest[$tag]['mailFiles'])) {
                    foreach ($manifest[$tag]['mailFiles'] as $mailFile) {
                        @unlink(Yii::getAlias($this->module->panels['mail']->mailPath) . "/$mailFile");
                    }
                }
                unset($manifest[$tag]);
                if (--$n <= 0) {
                    break;
                }
            }
        }
    }
protected function gc(&$manifest)
    {
        if (count($manifest) > $this->module->historySize + 10) {
            $n = count($manifest) - $this->module->historySize;
            foreach (array_keys($manifest) as $tag) {
                $file = $this->module->dataPath . "/$tag.data";
                @unlink($file);
                if (isset($manifest[$tag]['mailFiles'])) {
                    foreach ($manifest[$tag]['mailFiles'] as $mailFile) {
                        @unlink(Yii::getAlias($this->module->panels['mail']->mailPath) . "/$mailFile");
                    }
                }
                unset($manifest[$tag]);
                if (--$n <= 0) {
                    break;
                }
            }
        }
    }
protected function gc ( & $ manifest ) { if ( count ( $ manifest ) > $ this -> module -> historySize + 10 ) { $ n = count ( $ manifest ) - $ this -> module -> historySize ; foreach ( array_keys ( $ manifest ) as $ tag ) { $ file = $ this -> module -> dataPath . "/$tag.data" ; @ unlink ( $ file ) ; if ( isset ( $ manifest [ $ tag ] [ 'mailFiles' ] ) ) { foreach ( $ manifest [ $ tag ] [ 'mailFiles' ] as $ mailFile ) { @ unlink ( Yii :: getAlias ( $ this -> module -> panels [ 'mail' ] -> mailPath ) . "/$mailFile" ) ; } } unset ( $ manifest [ $ tag ] ) ; if ( -- $ n <= 0 ) { break ; } } } }
Removes obsolete data files
@param array $manifest
Removes obsolete data files