Archive | PHP RSS feed for this section

[CakePHP] Code Sniff Updates

TweetIn an earlier post, Dr.Sani discussed about CodeSniffer and sniffs for CakePHP Standard. In that we saw how to define a new coding standard using the existing sniffs. With the release of PHP_CodeSniffer v1.3, the way we define a new standard has changed. Please read Code sniffs for CakePHP and then some more before going [...]

Read full story · Comments { 0 }

[CakePHP] Tweak translate behavior get belongsTo translations

TweetIn one of my earlier posts, I had written about How to fallback to default language while using Translate behavior. This is one more Translate behavior tweak (in continuation with the previous) to get belongsTo data's translations in current locale. By default, Translate behavior only gets current model's translations in current locale and you need [...]

Read full story · Comments { 1 }

[How To] Use XSLT to transform XML documents into other formats, like XHTML

TweetXSL stands for EXtensible Stylesheet Language and as the name suggests it is a styling language for XML documents. XSLT stands for XSL Transformations. XSLT is used to transform an XML document into another document formats,We will be transforming XML into HTML and XHTML. Usually XSLT transforms each XML element into an (X)HTML element. Lets [...]

Read full story · Comments { 0 }

How to track SQL errors in CakePHP on production site

TweetIn a CakePHP application, if there is any SQL error and debug level is set to greater than 0, then the complete error message from the database is displayed on the screen, but if the debug is set to 0 it just gives something like "unable to add" or worse a blank page. This can [...]

Read full story · Comments { 3 }