Geoff likes to exploit the URI and inject key/value pairs into it. It's not something I do, but I was intrigued enough to implement it. Basic usage is /path/to/page/id:123/spam:eggs. The variables are removed from the request variable as to not bork module loading and are made available via Browser::get('variable');
Dropped the bootstrap submodules since the bootstrap is moving out of this project again. Also dropped LESS, relying on an installed copy (similar to SASS)
Using github for authentication, I already had a github callback module. Renamed to /callback/github/hook to be a bit more verbose (and avoid the conflict)
Takes a word and a variable and determines if the word should be plural. Optionally returns the variable prepended to the output. Happy Fucking New Year!
Sure beats incrementing the variable then setting it! Usage: $model->record['column'] = '++'; // or '--'. Only works with single row updates at the moment. May expand into allowing a variable step to be defined (+10 or ++10 or something... I say that cause I think the double character is a bit safer since you could in theory set a value to -10000 and not want it to decrement by 10k)
Fixed a bug in the Controller that was throwing some notices when a module didn't return any data. Also finished up the calculateDistance() method in the Distance class. Seems I left it in somewhat of a bug filled incomplete state last week.
Solves the issue with having a site not using the built in PDO (case in point, I'm building a site entirely on Redis with a separate vendor library that isn't part of PICKLES)
Rearranged methods as well, they needed to be in alphabetical order. In the case that I need more distance related conversions, I'll move that method to it's own class.
Used to be very rigid in that each URI had to map to a single module. Now the inclusion of dots in the URI allow you to have multiple end points in a single file. /user/edit and /user/edit.save both resolve to /modules/user/edit.php
Probably should make it a part of the model as well, assuming it doesn't already do that, pretty sure it doesn't. Would help me as one of my sites I need to migrate a ton of code, so being able to flip models on one by one would be excellent.
Simplified logic by only checking one variable. Since "1" is a string but also returns true for being an integer, I swapped the is_string out for an !is_int
Previously new Model(array(1, 2, 3)); would results in a query like SELECT * FROM table WHERE 1 AND 2 AND 3; which would typically result in an out of memory error depending on the number of rows in the table (as all would be returned). Added detection for an array of integers and forces that to be considered new Model(array('id' => array(1, 2, 3))). As I type this I think I need to go back and make an additional change.
Selects done against a primary key will automatically cache to Memcached (haven't tried it, but it should fail gracefully) indexed by the model name and the primary key ([NAMESPACE-]MODEL-PKEY). Any updates or deletes against the same primary key will purge the cache automatically. The major caveat here is the case of mass updates which would result in stale data. As it stands the data is being cached for a mere 5 minutes, so this multiple row update scenario would be short lived but ideally, I'll be pushing back the time to live on the cache and/or making it something that's configurable. If you have to do mass updates, you're probably doing them with a cronjob and should just be flushing all of the cache in that scenario (as it would be nearly impossible to detect the affected keys and purge them all).
Also obliterated the getters and setters in the Database class after running some tests against their speed in comparison to getting and setting the variables directly