Jump to content

Naming conventions for my templating


newbtophp

Recommended Posts

I've been coding my script to PEAR standards, however was wondering what do you recommend for the naming conventions for my templating, I'm currently doing them as how constants would be (uppercase seperated with _ for another word) like:

 

$xtpl->assign('LATEST_FLASH_TITLE', $latest_flash_title);

 

What do you suggest?

Link to comment
https://forums.phpfreaks.com/topic/209745-naming-conventions-for-my-templating/
Share on other sites

Perhaps my questions was abit vague, heres a few naming convention examples:

 

//caps and underscore (my current one)

<title>{LATEST_FLASH_TITLE}</title>

 

//camelcase

<title>{latestFlashTitle}</title>

 

//lowercase and underscore

<title>{latest_flash_title}</title>

 

As I'm following PEARS standards, I have'nt read anywhere which states what they suggest when it comes to this, and as I'd like it to be consistant and readable to others, what do you suggest?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.