public function applyRules()
    {
        if (!$this->hasRules()) {
            return false;
        }

        $rules = $this->getRules();
        foreach ($rules as $rewrite) {
            add_rewrite_rule($rewrite[0], $rewrite[1], $rewrite[2]);
        }

        $wroteInDB = $this->flush();

        $message = $wroteInDB ?
            sprintf("Added <info>%d</info> and flushed the rewrite list.", count($rules)) :
            sprintf("Added <info>%d</info> while using the cached rewrites.", count($rules));

        Strata::app()->log($message, "<info>Rewriter</info>");

        return $wroteInDB;
    }