Browsed by
Category: ORM

WordPress: ORM Model Class

WordPress: ORM Model Class

Object Relational Mapping or ORM is something that WordPress is missing, but that doesn’t mean we can’t create an abstract Model that act similar to ORM behavior. Here are the first version to implement the ORM in WordPres – far from completions. Here are the implementation: The usage: More features to add in – to have columns properties, what to hide, what to show, column alias and many more. But this is my first attempt to make the WordPress Plugin…

Read More Read More

How to Include PHP ActiveRecord in WordPress as Global Feature

How to Include PHP ActiveRecord in WordPress as Global Feature

This post for developers who used to ORM/ActiveRecord and not familiar with WordPress Query (like me) and want the ORM/ActiveRecord to be available in WordPress. As per post’s title, this post regarding how you can include PHP ActiveRecord for global use – let say you have multiple plugins that use PHP ActiveRecord, you can’t load same PHP ActiveRecord classes / redeclared classed in an application or system – to be precise in PHP. So the solution is to add in…

Read More Read More

Web Services: Slim Framework + Eloquent(Laravel)

Web Services: Slim Framework + Eloquent(Laravel)

Setting up the Restful API is easy with Slim Framework & Eloquent(Laravel). Here are the steps: Install required components via composer – Slim Framework + Eloquent(Laravel) Create a database called web_services and create users table. Setting up Eloquent Setting up Routes Final Touch Install the necessary components using composer – create a composer.json and save it in a working directory and run composer install. We’re creating a simple web services for Users – Simple CRUD. Create a database called web_services…

Read More Read More

Micro-framework: Slim

Micro-framework: Slim

Setting up Slim Application Create a folder for your project, mine called slim create a composer.json in the directory and open up your Command Prompt / Terminal and run composer install. Later you should have something similar to Screenshot #2. Setting up RedBeanPHP4 Download RedbeanPHP4 Create a folder named RedBeanPHP4 in vendor directory and extract download zip file above and copy the rb.php into slim/vendor/RedBeanPHP4 – see Screenshot #2. Include the rb.php in slim/vendor/autoloader.php Then, add MySQL connection settings. Let’s…

Read More Read More