protected function handle($fileToRotate)
    {

        // next rotation date is tomorrow
        $today = new \DateTime();

        // do we have to rotate based on the current date or the file's size?
        if ($this->getNextRotationDate() < $today->getTimestamp()) {
            $this->rotate($fileToRotate);
        } elseif (file_exists($fileToRotate) && filesize($fileToRotate) >= $this->getMaxSize()) {
            $this->rotate($fileToRotate);
        }
    }