Some handy dandy code snippets and plugins I wrote! (All FREE under MIT license)

I've written a few code snippets and plugins you guys might find handy, figured I'd share. They're available free under the MIT license so you may do whatever you please with them.

Snippets:

1. [Overridable Default Configure Values for Plugins](https://bitbucket.org/snippets/riddlemd/4nnjk/cakephp3-plugin-overridable-default), This allows you to add config options to your plugins that can easily be overwriten in the main apps config.
2. [Query To Conditions formatter](https://bitbucket.org/snippets/riddlemd/4nXRx/query-to-conditions-formatter-for-cakephp3), This makes it easy to generate conditional statements for your find's from data submited by users (can be dangerous), it even works with BelongsTo and HasOne associations!
3. [Minimally Populated Entities Arrays (Mpea) Type](https://bitbucket.org/snippets/riddlemd/Br946/minimally-populated-entities-arrays-mpea), This is a custom type that when saved to the database it stores only the primary key of the entities in an array under the key of the source, then populates the Entities back when read out of the database. It's a Lazy Loader of sorts for nosql stored in relational databases. It maintains entity order in the array ONLY if all entities are of same class (which they should be in most cases).
4. [Crypted Type](https://bitbucket.org/snippets/riddlemd/6nEjE), a custom type that automatically encrypts data when stored into database (use blob or other binary safe field type) and decrypts it when pulling out of database. Handy for storing credit card data, secret passphrases for call in identity confirmation, etc.

Plugins:

1. [Tagit](https://bitbucket.org/riddlemd/tagit), A Tagging plugin, that, add custom tags to any table in your database and edit them as a simple delimited string.
2. [Eavus](https://bitbucket.org/riddlemd/eavus), An EAV plugin that makes handling of dynamic attributes easier.

Leave a Comment