{"id":39,"date":"2008-05-12T13:33:50","date_gmt":"2008-05-12T18:33:50","guid":{"rendered":"http:\/\/osric.com\/chris\/accidental-developer\/?p=39"},"modified":"2009-01-29T11:08:06","modified_gmt":"2009-01-29T16:08:06","slug":"strike-one-against-cakephp","status":"publish","type":"post","link":"https:\/\/osric.com\/chris\/accidental-developer\/2008\/05\/strike-one-against-cakephp\/","title":{"rendered":"strike one against cakePHP"},"content":{"rendered":"<p><img decoding=\"async\" style=\"max-width: 800px;\" src=\"https:\/\/osric.com\/chris\/accidental-developer\/wp-content\/uploads\/2008\/05\/cake-logo.png\" align=\"right\" \/>So I&#8217;m looking into the cakePHP framework, because, well why not. (for those not in the know cake is to php as rails is to ruby) Install is quite painless, but I&#8217;m still in the documentation, and I have already bumped into something that makes me <b>cringe<\/b>. The naming conventions require some classes to be singular, and some to be plural, and there is automatic translation between the the two. (I.E. you don&#8217;t declare where the singular class should look for the plural one, it just appends an s and goes to look for it) I&#8217;m sure some of you know that English is just not that regular a language. <\/p>\n<p>This of course means there has to be a way to add <a href=\"http:\/\/manual.cakephp.org\/view\/47\/custom-inflections\">exceptions<\/a> <\/p>\n<blockquote>\n<p> Cake&#8217;s naming conventions can be really nice &#8211; you can name your database table big_boxes, your model BigBox, your controller BigBoxesController, and everything just works together automatically. The way CakePHP knows how to tie things together is by <em>inflecting<\/em> the words between their singular and plural forms. <\/p>\n<p> There are occasions (especially for our non-English speaking friends) where you may run into situations where CakePHP&#8217;s inflector (the class that pluralizes, singularizes, camelCases, and under_scores) might not work as you&#8217;d like. If CakePHP won&#8217;t recognize your Foci or Fish, editing the custom inflections configuration file is where you can tell CakePHP about your special cases. This file is found in \/app\/config\/inflections.php. <\/p>\n<p> \tIn this file, you will find six variables. Each allows you to fine-tune CakePHP inflection behavior. <\/p>\n<\/blockquote>\n<p>Ugg!! I can just imagine getting caught by this one as part of a learning curve and walking away from the whole damn framework because of it. But I guess this is one open manhole cover that I managed not to fall into.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So I&#8217;m looking into the cakePHP framework, because, well why not. (for those not in the know cake is to php as rails is to ruby) Install is quite painless, but I&#8217;m still in the documentation, and I have already bumped into something that makes me cringe. The naming conventions require some classes to be &hellip; <a href=\"https:\/\/osric.com\/chris\/accidental-developer\/2008\/05\/strike-one-against-cakephp\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">strike one against cakePHP<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[55],"class_list":["post-39","post","type-post","status-publish","format-standard","hentry","category-php","tag-cakephp"],"_links":{"self":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/39","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/comments?post=39"}],"version-history":[{"count":1,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/39\/revisions"}],"predecessor-version":[{"id":153,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/39\/revisions\/153"}],"wp:attachment":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/media?parent=39"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/categories?post=39"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/tags?post=39"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}