public function toDBObject()
    {
        $info = pathinfo($this->path);

        switch ($info['extension']) {
            case 'yaml':
            case 'yml':
                return DBField::create_field('YAMLField', file_get_contents($this->path));
            case 'json':
                return DBField::create_field('JSONField', file_get_contents($this->path));

            default:
                return null;
        }
    }