php Articles & Posts

How to Create your own Scaffolding plugin for CakePHP 2

CakePHP’s builtin scaffolding is great but sometimes I wish it would do more or behave a little differently. Until recently, I assumed this couldn’t be accomplished with the way scaffolding was baked in. Thanks to the clever way CakePHP handles includes, we can easily use our own scaffolding implementation by adding 2 lines to AppController.

In this tutorial we will built a scaffolding plugin that is aware of the TreeBehavior (continue reading…)


  • pronique com
  • cakephp generate list scaffolding
  • cakephp 2 1 tutorial
  • throughf7z

CsvExport Behavior for CakePHP 2

This behavior is the exact opposite of the CsvImport behavior included in the Utils plugin from CakeDC. This Behavior will end on github but for now, here is the source code and instructions on how to use the Behavior. (continue reading…)


  • cakephp csv


cakecore is a command line tool and convention for installing/updating the CakePHP core libraries in /usr/lib/cakephp. Using cakecore provides a foundation for maintaining one core, for many apps. The advantages are…

  • One copy of each major version of the CakePHP core libraries.
  • Easy upgrade when new CakePHP version are released.
  • Switch to newer version of CakePHP on a per project basis.
  • Reduce disk space required for each project.
  • Decoupling the core libraries means less to commit and maintain in code repositories.

Installing CakeCore

# clone cakecore from github
sudo git clone /usr/lib/cakephp

# add cakecore to your path
sudo ln -s /usr/lib/cakephp/cakecore /usr/bin/cakecore

Checkout and install CakePHP

sudo cakecore install-all
# Installs a copy of each major version of CakePHP in...
# /usr/lib/cakephp/1.2/
# /usr/lib/cakephp/1.3/
# /usr/lib/cakephp/2.0/
# /usr/lib/cakephp/2.1/

Updating CakePHP

sudo cakecore update-all

Check current CakePHP versions

sudo cakecore status

Show instructions for linking to the core libraries from your app/project

cakecore paths

CakeCore is open source software released under the MIT License. CakeCore is developed and maintained by PRONIQUE Software, a PHP Software Development Company.

Visit the CakeCore Project on github

Install and reuse CakePHP across multiple projects

Update: I have created a command line tool that provides the functionality explained in detail below. Check-out CakeCore and learn more.

How to maintain one copy of each major version of the CakePHP Core library. Making upgrades to new versions of the framework effortless even across many applications.

I use CakePHP for the majority of web-based applications I create. Before developing this convention I would end up with many redundant copies of the Core library floating around taking up disk space, and making upgrade tedious. (continue reading…)


  • cakephp multiple apps

Howto recover deleted php files using scalpel

Several times in the past I’ve accidentally overwritten a file or used a greedy wildcard with rm -rf. If you find yourself in this situation, don’t worry, scalpel can recover your file(s). My experience using scalpel was on a Ubuntu server but the tool will work on other linux distros including Redhat, Fedora, Debian, and more.  A Windows and Mac OS X build is also available.

scalpel is my tool of choice because it will recover files from the newer ext4 filesystem, which is the default filesystem for Ubuntu since (continue reading…)


  • scalpel php
  • scalpel recover text files
  • scalpel recover php files
  • foremost recover text file
  • scalpel conf for scalpel-2 1

gearmandAdmin – A PHP class to query gearmand

This is a php class that connects to a running gearmand process and gets the ‘status’ and and list of ‘workers’. The response can be had as the raw response $gmAdmin->getStatusRaw() or as a structured array $gmAdmin->getStatus(). (continue reading…)

Copyright © 1996-2012 PRONIQUE Software. All rights reserved.