Commit graph

896 commits

Author SHA1 Message Date
Joshua Sherman
c0dbb39bda More tests
Also, found that damn newline that was being output.
2013-12-30 17:13:22 -05:00
Joshua Sherman
64dc006b5f Documented some stuff, refactoring some other stuff
Moved re-used object instances to the Object class and added object loader logic to the constructor.
2013-12-30 15:47:13 -05:00
Joshua Sherman
74f0adb4f8 Disabled some tests as I figure out the issue, detroyed 5.4 support. 2013-12-30 00:46:29 -05:00
Joshua Sherman
54471c361b So much refactoring... 2013-12-30 00:38:13 -05:00
Joshua Sherman
03e613d380 Reworked README a bit to include PHP 5.4+
... for now, muahahahahaha
2013-12-29 13:32:23 -05:00
Joshua Sherman
7f37abc527 Cleaned up test includes a bit
Probably want to include an autoloader at some point. Also added PHP 5.3 and 5.4 to the test list, 5.3 outta fail, unsure about 5.4
2013-12-29 13:16:21 -05:00
Joshua Sherman
19a211cf6a More refactoring, ditching old code
Added a new 404 system which checks for templates/__shared/404.phtml (module-less bare in mind) and falls back to a generic Apache-ish Not found page with PICKLES shout out. Added some more assumptions (login page is always /login a/k/a the login.php module) also there's no way to customize which template is used for the 404. Removed some code that was no longer used in the Security class.
2013-12-29 12:52:13 -05:00
Joshua Sherman
09d1744910 Refactoring old code
More like removing old code. Added some memento notes for myself in there.
2013-12-28 18:41:56 -05:00
Joshua Sherman
6a1056306f Dropped old Display classes
RSS isn't ported yet but I have a copy to work from
2013-12-28 16:26:12 -05:00
Joshua Sherman
064b4d9f55 Reworked Controller around new Display class 2013-12-28 16:23:42 -05:00
Joshua Sherman
4c0632cb4c Cleaned up whitespace 2013-12-28 16:23:27 -05:00
Joshua Sherman
a050c7d031 Hacked in some public variables
Very hacky, switched variables to public and added a catch in the __get method to assign to the right place for the variables that modules are using (instead of having to update all of the modules in the wild)
2013-12-28 16:22:22 -05:00
Joshua Sherman
a4bf33cce2 If no request, assume 'home' module
Eliminates the need to define a default module in the config.
2013-12-28 16:21:24 -05:00
Joshua Sherman
e0228a9e8a Updated to use composer.json
Throwing errors about my command, figured it's best to just use the same thing I'm using locally. Really hope that this is something that can be done.
2013-12-28 02:09:53 -05:00
Joshua Sherman
e70f31c711 Moved to composer installed vfsSteam
Seems the issue was namespacing this whole time.
2013-12-28 02:08:10 -05:00
Joshua Sherman
fd157c23bc Just a bit more... 2013-12-28 01:54:21 -05:00
Joshua Sherman
054ac575e1 Debugging stuff 2013-12-28 01:52:00 -05:00
Joshua Sherman
a1d9f87a4f More tweaking. 2013-12-28 01:49:52 -05:00
Joshua Sherman
5d14f78d29 More hacking to get vfsStream to load in Travis 2013-12-28 01:44:30 -05:00
Josh Sherman
2dad337c8d Fixed composer require command 2013-12-28 01:39:33 -05:00
Josh Sherman
6b0fed32c6 Added dependencies
Added a hack to work locally for me. May move to using composer to obtain / install vfsStream just didn't like the "vendor" directory, will look into using a custom directory so it can be hidden git ignored.
2013-12-28 01:36:08 -05:00
Josh Sherman
7c4e939e6e Added status image and proper script in config
Expecting a failure due to PEAR dependencies failing.
2013-12-28 01:24:16 -05:00
Josh Sherman
6bca74f155 Added travis config 2013-12-28 01:17:00 -05:00
Josh Sherman
07a95a7508 Built out new Display class with tests
Not hooked up to the Controller yet, wanted to get Travis setup.
2013-12-28 01:13:02 -05:00
Josh Sherman
99a04865e8 Fixed existing tests
Just some small tweaks to get all of the tests passing again. Functionality changed and the tests were not kept up to date.
2013-12-26 15:01:05 -05:00
Josh Sherman
408f3cdfa3 Merge branch 'master' of github.com:joshtronic/pickles 2013-12-24 17:38:51 -05:00
Josh Sherman
89dabbf7f5 Fixed case sensitivity issue.
When developing on OS X the case sensitivity didn't matter much but on Linux it broke the include.
2013-12-24 17:36:10 -05:00
Josh Sherman
ae66815cb9 Hacked in pretty JSON option
Just need to include `?pretty=true` to a request and the JSON returned will be formatted. As I was digging in there I think I may consolidate all of the Display logic into a single class and potentially bring back `.json` and `.xml` extensions to dictate what is returned. Would help a ton in scenarios where I have an endpoint that I want to server up a template on error or return JSON on success.
2013-12-24 14:17:03 -05:00
Josh Sherman
cce87a104e Stated intentions for being bleeding edge. 2013-12-24 13:59:21 -05:00
Josh Sherman
9b297f3d87 Dropped Convert::toJSON()
In an effort to only maintain compatibility with the latest version of PHP (currently the 5.5 branch) I dropped the sanity checks if `json_encode` was available as it is always available in PHP 5.2+. Dropping this sanity check also allowed me to remove the wrapper function and the `JSON_AVAILABLE` constant. Ideally I'd like to move towards dropping the `Convert` class entirely but will need a way to convert an array to XML as the `RSS` class still leverages it. One thought is to move that code right into the `RSS` class as it never gets used elsewhere because XML is gross.
2013-12-24 13:28:49 -05:00
Josh Sherman
0cbc1df48f Added AreYouAHuman.com integration
Includes AYAH v1.1.7, a static wrapper class and an update to our main include file to handle loading the official AYAH library from the vendors directory.
2013-12-23 19:11:01 -05:00
Josh Sherman
d96181c60f Q4 2013, seemed like a good time to update the copyright notices 2013-11-04 17:36:04 -05:00
Josh Sherman
058e22c1aa Made method public and fixed return 2013-10-02 15:59:48 -04:00
Josh Sherman
8f57077ef6 Created a validation class to handle validation
Instead of making the Module the keeper of validation, moved the actual sanity checks to another class. This makes it stupid easy to use one module's validation (some or all) to validate arbitrary values elsewhere in your system.
2013-09-29 15:51:45 -04:00
Josh Sherman
011f9b42b2 Updated to not store empty cache
Primary key queries should not be cached because the record may not exist today but could exist in the future and because the INSERT logic in PICKLES doesn't do any invalidation of the cache.
2013-09-27 13:40:44 -04:00
Josh Sherman
7ed930d278 Fixed issue when passing in single IDs
If you tried to use the extended array syntax to query against the primary key (id) and passed it an integer instead of an array, an error was occurring. Thanks @geoffoliver !
2013-09-22 22:48:07 -04:00
Josh Sherman
6ac911b78a Sort class!!~! 2013-09-22 19:40:49 -04:00
Josh Sherman
dd6ba92e28 Added utility method to extract values from field
Pass it a field name, it'll return an array of all of the values form that field.
2013-09-16 12:59:16 -04:00
Josh Sherman
38e5173823 Updated checks for exactly false.
Fixed some issue withe the sanity checks if the cache results.
2013-09-15 23:32:34 -04:00
Josh Sherman
919ad37717 Added arbitrary cache usage by key.
Pass a Model an optional second or third parameter to force the Model to check the cache before running the query and stashing the results in the key for future queries.
2013-09-15 17:15:22 -04:00
Josh Sherman
6b41edf659 Moved default cache expiration to 1 day
Not quite ready to make the jump to no expiration, but 1 day has been serving me well for over a year now.
2013-09-15 12:38:32 -04:00
Josh Sherman
dca62b82d1 Removed unnecessary sanity checks when calling Log 2013-09-15 12:02:07 -04:00
Josh Sherman
b6bacdd432 Caching where primary key in ( ... )
Caching was limited to single row selects against the primary key. Expanded to include cache checking and storing when selecting multiple values against the primary key. Does not work on any other row due to the fact that some rows may have duplicate values and the mapping could get borked pretty quick.
2013-09-15 11:56:34 -04:00
Josh Sherman
7746567ec3 Added sanity check if logging was enabled
No more wrapping calls to the Log class with a check if it's enabled.
2013-09-15 11:55:56 -04:00
Josh Sherman
391e95c9e8 Reverted per column caching aside from id field.
Was a bit messy, just so hard to automagically cache stuff without knowing the data usage.
2013-09-13 13:22:10 -04:00
Josh Sherman
4d9eb54b13 Dropped dot syntax
Too much juggling to make sure the proper assets were loaded. Opened up a security issue that allowed some pages to be accessed even if data was missing, just a headache, best to move away from it and allow users to defining custom routing in inde.php. Perhaps down the road allowing a Route class that the user can define everything in.
2013-09-12 17:59:29 -04:00
Josh Sherman
d671cfa977 Hardcoded email, whoops. 2013-09-12 09:49:19 -04:00
Josh Sherman
4819b2c1a2 Added sanity check for variable
I like to remove the password field from records when I'm not using the password value, this caused an error when creating the cache keys.
2013-09-11 10:28:38 -04:00
Josh Sherman
9dcf3fa58e Added column caching
If you're pulling data against a single column and returning a single column the UID will be cached out to a key that can easily be recalled the next time the same query is executed. On UPDATE and DELETE the corresponding keys are deleted.
2013-09-10 22:43:52 -04:00
Josh Sherman
72c9e85f5d Added the template variable to the new scope logic 2013-09-10 19:57:23 -04:00