protected function addAllSourceFiles($fileHandler)
{
/**
* Sorting is important, so that the resulting contents doesn't fluctuate because of OS,
* filesystem walk order, etc. Therefore the resulting file can be easily diff'ed
* with its previous version in repository.
*/
$cFiles = $this->getSortedSourceFilesToAppend($this->sourceDir);
$hFiles = $this->extractReferencedHeaders($cFiles);
foreach ($hFiles as $file) {
$this->appendSource($fileHandler, $file);
}
foreach ($cFiles as $file) {
$this->appendSource($fileHandler, $file);
}
$this->appendSource($fileHandler, $this->sourceDir . '/phalcon.c');
}