Welcome Guest, Not a member yet? Register   Sign In
Gen Options v1.1.0b For CodeIgniter 2.1
#1

[eluser]Spelljack[/eluser]
Hello,

This is my first library sharing. So please be gentle Smile

What is Gen Options?

Gen Options is a CodeIgniter library that helps you to store your scripts' options in database and let you to easyly access them.

Code:
<?php
// getting autoloaded option: site_title
echo $this->gen_options->site_title;

// writing new option into database:
$this->gen_options->site_url = "http//www.example.com/";

// Deleting option from database:
unset($this->gen_options->site_enabled);

?>

as simply as that.

For more information please visit my repository's Wiki.

Changelog:
* Fixed some errors.
* __set() method now updates loaded options.
* Comments are now in english.
* Added Method Chaining.
* Methods are modified.

Download from BitBucket Repository
#2

[eluser]Aken[/eluser]
Nice library! A couple suggestions after a quick glance:

1) You should have a copy in English, since that's the most universal programming language, and any non-Turkish speakers are left out.

2) Your __set() method should also add the item to the options data array, so it can be used after its added.

3) In your model, I would either remove the construct() method, or add parent::__construct() to it.

Pretty clean, though. Thanks for contributing.
#3

[eluser]Spelljack[/eluser]
[quote author="Aken" date="1329958557"]Nice library! A couple suggestions after a quick glance:

1) You should have a copy in English, since that's the most universal programming language, and any non-Turkish speakers are left out.

2) Your __set() method should also add the item to the options data array, so it can be used after its added.

3) In your model, I would either remove the construct() method, or add parent::__construct() to it.

Pretty clean, though. Thanks for contributing. [/quote]

I'm hiding in corner Sad

I think I was pretty hasty about sharing this library. I fixed alot of errors including the thinks that you said.

Now it is fully working.
#4

[eluser]Sire[/eluser]
Love the idea, thanks for sharing. I'll give it a spin sometime soon.
#5

[eluser]Spelljack[/eluser]
Thank you. I am glad you like it Smile




Theme © iAndrew 2016 - Forum software by © MyBB