original_string: protected function renameCacheEntries($to) {
  
  		if(($cachePath = $this->folder->getCachePath(TRUE))) {
  
  			$di	= new \DirectoryIterator($cachePath);
  
  			foreach($di as $fileinfo) {
  
  				$filename = $fileinfo->getFilename();
  
  				if(	$fileinfo->isDot() ||
  					!$fileinfo->isFile() ||
  					strpos($filename, $this->filename) !== 0
  				) {
  					continue;
  				}
  
  				$renamed = substr_replace($filename, $to, 0, strlen($this->filename));
  				rename($fileinfo->getRealPath(), $fileinfo->getPath() . DIRECTORY_SEPARATOR . $renamed);
  			}
  		}
  	}
code: protected function renameCacheEntries($to) {
  
  		if(($cachePath = $this->folder->getCachePath(TRUE))) {
  
  			$di	= new \DirectoryIterator($cachePath);
  
  			foreach($di as $fileinfo) {
  
  				$filename = $fileinfo->getFilename();
  
  				if(	$fileinfo->isDot() ||
  					!$fileinfo->isFile() ||
  					strpos($filename, $this->filename) !== 0
  				) {
  					continue;
  				}
  
  				$renamed = substr_replace($filename, $to, 0, strlen($this->filename));
  				rename($fileinfo->getRealPath(), $fileinfo->getPath() . DIRECTORY_SEPARATOR . $renamed);
  			}
  		}
  	}
code_tokens: protected function renameCacheEntries ( $ to ) { if ( ( $ cachePath = $ this -> folder -> getCachePath ( TRUE ) ) ) { $ di = new \ DirectoryIterator ( $ cachePath ) ; foreach ( $ di as $ fileinfo ) { $ filename = $ fileinfo -> getFilename ( ) ; if ( $ fileinfo -> isDot ( ) || ! $ fileinfo -> isFile ( ) || strpos ( $ filename , $ this -> filename ) !== 0 ) { continue ; } $ renamed = substr_replace ( $ filename , $ to , 0 , strlen ( $ this -> filename ) ) ; rename ( $ fileinfo -> getRealPath ( ) , $ fileinfo -> getPath ( ) . DIRECTORY_SEPARATOR . $ renamed ) ; } } }
docstring: updates names of cache entries
  
  @param string $to new filename
docstring_tokens: updates names of cache entries