summaryrefslogtreecommitdiff
path: root/demos/composer/protected/pages/ClassDefinition.php
diff options
context:
space:
mode:
authorxue <>2006-04-15 14:21:40 +0000
committerxue <>2006-04-15 14:21:40 +0000
commitb07499534b6d0ed57a2b80c4d95354ca3791c236 (patch)
tree29bfeefb0b543abee915dd4051652dabb413005a /demos/composer/protected/pages/ClassDefinition.php
parent0f380cd025dd9530b8faee7061d1957c5fd6cd9c (diff)
Breaking change! Changed context of the expressions in template to the template control. Evaluations of <%= %> are now all in PreRender stage.
Diffstat (limited to 'demos/composer/protected/pages/ClassDefinition.php')
-rw-r--r--demos/composer/protected/pages/ClassDefinition.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/demos/composer/protected/pages/ClassDefinition.php b/demos/composer/protected/pages/ClassDefinition.php
index bd704b0e..cb657e85 100644
--- a/demos/composer/protected/pages/ClassDefinition.php
+++ b/demos/composer/protected/pages/ClassDefinition.php
@@ -36,8 +36,8 @@ class ClassDefinition extends TComponent
if($this->Comments!=='')
{
$str.=" *\n";
- $str.=implode("\n * ",explode("\n",wordwrap($this->Comments)));
- $str.=" *\n\n";
+ $str.=" * ".implode("\n * ",explode("\n",wordwrap($this->Comments)));
+ $str.="\n *\n";
}
if($this->Author!=='')
{
@@ -171,9 +171,18 @@ class ClassDefinition extends TComponent
$name=$event->Name;
if($name==='')
continue;
+ if(strncasecmp($name,'on',2)!==0)
+ $name='On'.$name;
+ else
+ {
+ $name[0]='O';
+ $name[1]='n';
+ }
+ $methodName=$name;
+ $methodName[0]='o';
$comments=implode("\n\t * ",explode("\n",wordwrap($event->Comments)));
$writer->write("\n\t/**\n\t * Raises <b>$name</b> event.\n\t * $comments\n\t * @param TEventParameter event parameter\n\t */\n");
- $writer->write("\tpublic function $name(\$param)\n\t{\n\t\t\$this->raiseEvent('$name',\$this,\$param);\n\t}\n");
+ $writer->write("\tpublic function $methodName(\$param)\n\t{\n\t\t\$this->raiseEvent('$name',\$this,\$param);\n\t}\n");
}
}