Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add file driver config can be save like the database #566

Open
wants to merge 1 commit into
base: 3.3/develop
Choose a base branch
from

Conversation

ljyf5593
Copy link

add file driver config can be save like the database


$config_file = APPPATH.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.$group.'.php';

$result = file_put_contents($config_file, "<?php\nreturn ".var_export($this->_loaded_keys[$group], TRUE).';');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should probably check for is_writable first.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ljyf5593 very sorry to come back to you this late. Could you kindly note @shadowhand 's comment here, as I think the sooner we check for is_writable the better. And maybe should we add a try... catch block here for the same reasons?

Thanks.

@shadowhand
Copy link
Contributor

I think this should be updated to use the same pattern as kohana/database#77

@enov
Copy link
Contributor

enov commented May 8, 2015

This needs unittesting too. Thank you for your time.

@neo22s neo22s added this to the 4.0.0 milestone Mar 21, 2016
@neo22s
Copy link
Member

neo22s commented Mar 21, 2016

needs to be reviewed tested and considered for 4.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants