string(19) "ViewArticleOrg.html"
$ret = $this->callSomething(array('xxx' => 'yyyy', 'zzz' => 'aaaa' ....Good
$ret = $this->callSomething(array( 'xxx' => 'yyyy', 'zzz' => 'aaaa' .... ));
if ((condition) || (condition2)) { statement; statement; } else { statement; } if ((condition) || (condition2)) { statement; statement; } elseif ((condition) || (condition2)) { statement; } // for long if statements if ((condition) || (condition2) //8 space indent || (condition2) || (condition2) ) { // closer and opener 4 space indented statement; statement; }
for ($i = 0; $i < 100; $i++) { if (!$x) { break; } if ($x < 10) { statement; statement; break; } ...... } function get($arg) { $do = DB_DataObject:;factory('xxxx'); if (!(int)$arg || !$do->get($arg)) { return HTML_FlexyFramework::factory('Error/404', array('errors'=> .....); } .....
function get($arg) { $do = DB_DataObject:;factory('xxxx'); if ($arg != "") { if ($do->get("id",$arg)) { ... do stuff ... } } }
switch ($x) { case 1: statement; break; case 2: statement; break; default: statement; break; }
$ret = $this->callSomething($a, $b); $ret = $this->callSomething(array( 'xxx' => 'yyyy', 'zzz' => 'aaaa', )); $abcdefg = $this->find(); $xxx = $this->fetch();
function callSomething($a, $b) { if ($a) { return false; } statement; }
class myclass extends anotherclass { function .......() { } }
class something { var $fred; // this is fred's var }Longer comments should use /* */ style docbook comments
include 'MyClass.php
require_once 'MyProject/MyClass.php'; //rather than require_once 'MyClass.php'
$this->warning['messagename']= true; and in the HTML: <p flexy:if="warning[messagename]">Display the warning / error</p>
if(!$do->get($id)) { $this->error = .... return HTML_FlexyFramework::run('Error/404'); }
From: { t.someemail } <test@xyz> Subject: A test .....In the above example ensure that { t.someemail } does not have line breaks comming from user input!
$siteconfig = parse_ini_file('/etc/flexyframework/myproject_config.ini'); HTML_FlexyFramework::factory(array( ...... MyProject => $siteconfig, ));
$opts = HTML_FlexyFramework::get()->classname;
class MyProject_TestPage extends MyProject { function get() { $_SESSION[__CLASS__]['settings'] = .......
Pman.Dialog.XXX = new Roo.Observable({ xxx : function () { .... }, yyy : 1 });
<flexy:toJavascript baseURL="baseURL" rootURL="rootURL"/>
<div> <table> <tr> <td>XXXX</td> </tr> </table> </div>
{ if:step1 } ......... { end: } { if:step2 } ..... { end: } ........
.stylename { display: block; font-color: red; }Note the large indentation on the definitions.
invbuy_transdate = new_inv_buy.transdate,
invbuy_qty = new_inv_buy.qty,
invbuy_totalcost = new_inv_buy.totalcost,
v_trans_qty numeric(18, 6);
v_new_invhist_id integer;