<?php
App::uses('AppModel', 'Model');
class Configuration extends AppModel 
{
    public $name = 'Configuration';
    public $useTable = 'configurations';
       
    public function load($prefix = 'CFG') 
    {
        $settings = $this->find('all');
        foreach ($settings as $variable) {
            Configure::write("$prefix.{$variable['Configuration']['key']}",$variable['Configuration']['value']);
        }
    }
}