public function config($config = [])
    {
        $defaults = [
            'conventions' => [
                'source' => function($class) {
                    $basename = substr(strrchr($class, '\\'), 1);
                    return Inflector::underscore($basename);
                },
                'key' => function() {
                    return 'id';
                },
                'reference' => function($class) {
                    $pos = strrpos($class, '\\');
                    $basename = substr($class, $pos !== false ? $pos + 1 : 0);
                    return Inflector::underscore(Inflector::singularize($basename)). '_id';
                },
                'references' => function($class) {
                    $pos = strrpos($class, '\\');
                    $basename = substr($class, $pos !== false ? $pos + 1 : 0);
                    return Inflector::underscore(Inflector::singularize($basename)). '_ids';
                },
                'field' => function($class) {
                    $pos = strrpos($class, '\\');
                    $basename = substr($class, $pos !== false ? $pos + 1 : 0);
                    return Inflector::underscore(Inflector::singularize($basename));
                },
                'multiple' => function($name) {
                    return Inflector::pluralize($name);
                },
                'single' => function($name) {
                    return Inflector::singularize($name);
                }
            ]
        ];
        $config = Set::extend($defaults, $config);
        $this->_conventions = $config['conventions'];
    }