CakePHP inflector sandbox

I built this little tool a while ago because of the large amount of people that kept asking about how the inflector in CakePHP works or why their model was not working correctly. As cake works on conventions almost every class name and table name is generated using the inflector.

The inflector is used to convert from urls to controllers, from controller names to model names and so on. In versions prior to 2.x it was also used to convert between class names and file paths.

Besides showing the output of each method the inflector sandbox also explains some of the usage for each method.

I have updated it to now also show possible problems that may exist with a word being used in CakePHP. For example, if you wanted to use a table called blog__posts the inflector would not be able to convert between the different forms correctly. The table blog__posts would be converted to the model BlogPost correctly but the model would not convert to a table name correctly, instead it would output blog_posts.

Similar thing for singular / plural conversions. pys, for lack of a better example, can not be converted between plural and singular like regular words such as post / posts.

Read more...

The moon

I got a telescope for Christmas 2012 which is pretty cool. The telescope has a 102mm objective diameter and a focal length of 1100mm, with a maximum magnification of 400x. Christmas happened to fall on a full moon and clear night so I was able to test it out without having to wait much.

The moon

This photo was taken with my phone, just holding the camera lense upto the telescope eye piece. Its rath…

Read more...

No more posts