protected function getFilesToDelete()
    {
        $dirName    = dirname($this->baseFilename);
        $baseName   = basename($this->baseFilename);
        $fileNames  = scandir($dirName);
        $result     = array();
        $prefix     = $baseName . '.';
        $plen       = strlen($prefix);

        foreach ($fileNames as $fileName) {
            if ($fileName == '.' || $fileName == '..') {
                continue;
            }

            if (!strncmp($fileName, $prefix, $plen)) {
                $suffix = substr($fileName, $plen);
                if (preg_match($this->extMatch, $suffix)) {
                    $result[] = $dirName . DIRECTORY_SEPARATOR . $fileName;
                }
            }
        }

        sort($result);
        $rlen = count($result);
        if ($rlen < $this->backupCount) {
            $result = array();
        } else {
            $result = array_slice($result, 0, $rlen - $this->backupCount);
        }
        return $result;
    }
protected function getFilesToDelete()
    {
        $dirName    = dirname($this->baseFilename);
        $baseName   = basename($this->baseFilename);
        $fileNames  = scandir($dirName);
        $result     = array();
        $prefix     = $baseName . '.';
        $plen       = strlen($prefix);

        foreach ($fileNames as $fileName) {
            if ($fileName == '.' || $fileName == '..') {
                continue;
            }

            if (!strncmp($fileName, $prefix, $plen)) {
                $suffix = substr($fileName, $plen);
                if (preg_match($this->extMatch, $suffix)) {
                    $result[] = $dirName . DIRECTORY_SEPARATOR . $fileName;
                }
            }
        }

        sort($result);
        $rlen = count($result);
        if ($rlen < $this->backupCount) {
            $result = array();
        } else {
            $result = array_slice($result, 0, $rlen - $this->backupCount);
        }
        return $result;
    }
protected function getFilesToDelete ( ) { $ dirName = dirname ( $ this -> baseFilename ) ; $ baseName = basename ( $ this -> baseFilename ) ; $ fileNames = scandir ( $ dirName ) ; $ result = array ( ) ; $ prefix = $ baseName . '.' ; $ plen = strlen ( $ prefix ) ; foreach ( $ fileNames as $ fileName ) { if ( $ fileName == '.' || $ fileName == '..' ) { continue ; } if ( ! strncmp ( $ fileName , $ prefix , $ plen ) ) { $ suffix = substr ( $ fileName , $ plen ) ; if ( preg_match ( $ this -> extMatch , $ suffix ) ) { $ result [ ] = $ dirName . DIRECTORY_SEPARATOR . $ fileName ; } } } sort ( $ result ) ; $ rlen = count ( $ result ) ; if ( $ rlen < $ this -> backupCount ) { $ result = array ( ) ; } else { $ result = array_slice ( $ result , 0 , $ rlen - $ this -> backupCount ) ; } return $ result ; }
Return a list of old log files to delete.

\retval array
List of old log files to delete.
Return a list of old log files to delete .