The Syrian army said it had brought "security and safety" to Aleppo, ending four years of rebel resistance in parts of the northern Syrian city.