summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorxue <>2006-05-09 12:11:38 +0000
committerxue <>2006-05-09 12:11:38 +0000
commitf4de82bcdafba51e4eed9cae6b2d3e5375ffd115 (patch)
tree08f98e1763e87f0639961c6da33224082345c7c3 /framework
parent92dca3315f083f00dcff610ea207af52284d0616 (diff)
Diffstat (limited to 'framework')
-rw-r--r--framework/3rdParty/readme.html9
-rw-r--r--framework/Exceptions/messages.txt2
-rw-r--r--framework/IO/TTextWriter.php2
-rw-r--r--framework/Web/UI/TTemplateManager.php23
-rw-r--r--framework/Web/UI/WebControls/TButton.php2
5 files changed, 28 insertions, 10 deletions
diff --git a/framework/3rdParty/readme.html b/framework/3rdParty/readme.html
index b48f5b74..c6bc491c 100644
--- a/framework/3rdParty/readme.html
+++ b/framework/3rdParty/readme.html
@@ -116,6 +116,15 @@ projects.
<td>Has "The Software shall be used for Good, not Evil." clause.</td>
</tr>
+<tr>
+ <td><a href="../../demos/quickstart/protected/index/Zend">../../demos/quickstart/protected/index/Zend</a></td>
+ <td><a href="http://framework.zend.com">Zend Framework</a></td>
+ <td><a href="../../demos/quickstart/protected/index/Zend/LICENSE.txt">BSD</a></td>
+ <td>Quickstart tutorial indexing and search is provided the Zend Lucene search implementation.</td>
+ <td>This product includes the Zend Framework, freely available at
+ http://www.zend.com</td>
+</tr>
+
</table>
</p>
</body>
diff --git a/framework/Exceptions/messages.txt b/framework/Exceptions/messages.txt
index 5edd7c75..fa12238a 100644
--- a/framework/Exceptions/messages.txt
+++ b/framework/Exceptions/messages.txt
@@ -103,7 +103,7 @@ pageserviceconf_page_invalid = <page> element must have an "id" attribute in p
template_closingtag_unexpected = Unexpected closing tag '{0}' is found.
template_closingtag_expected = Closing tag '{0}' is expected.
-template_directive_nonunique = Directive '<%@ ... %>' must appear at most once in a template.
+template_directive_nonunique = Directive '<%@ ... %>' must appear at the beginning of the template and can appear at most once.
template_comments_forbidden = Template comments are not allowed within property tags.
template_matching_unexpected = Unexpected matching.
template_property_unknown = {0} has no property called '{1}'.
diff --git a/framework/IO/TTextWriter.php b/framework/IO/TTextWriter.php
index a6bf5751..e63a7f7c 100644
--- a/framework/IO/TTextWriter.php
+++ b/framework/IO/TTextWriter.php
@@ -19,7 +19,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Revision: $ $Date: $
- * @package System
+ * @package System.IO
* @since 3.0
*/
class TTextWriter extends TComponent implements ITextWriter
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php
index d2a92c04..60ce11ca 100644
--- a/framework/Web/UI/TTemplateManager.php
+++ b/framework/Web/UI/TTemplateManager.php
@@ -546,6 +546,7 @@ class TTemplate extends TApplicationComponent implements ITemplate
$container=-1;
$matchEnd=0;
$c=0;
+ $this->_directive=null;
try
{
for($i=0;$i<$n;++$i)
@@ -598,7 +599,7 @@ class TTemplate extends TApplicationComponent implements ITemplate
if($matchStart>$textStart)
$tpl[$c++]=array($container,substr($input,$textStart,$matchStart-$textStart));
$textStart=$matchEnd+1;
- if(isset($tpl[0]))
+ if(isset($tpl[0]) || $this->_directive!==null)
throw new TConfigurationException('template_directive_nonunique');
$this->_directive=$this->parseAttributes($match[4][0],$match[4][1]);
}
@@ -675,18 +676,23 @@ class TTemplate extends TApplicationComponent implements ITemplate
}
if(($last=count($stack))<1 || $stack[$last-1][0]!=='@')
{
- if($matchStart>$textStart && $container>=0)
+ if($matchStart>$textStart)
{
$value=substr($input,$textStart,$matchStart-$textStart);
if(strrpos($prop,'template')===strlen($prop)-8)
$value=$this->parseTemplateProperty($value,$textStart);
else
$value=$this->parseAttribute($value);
- $type=$tpl[$container][1];
- $this->validateAttributes($type,array($prop=>$value));
- if(isset($tpl[$container][2][$prop]))
- throw new TConfigurationException('template_property_duplicated',$prop);
- $tpl[$container][2][$prop]=$value;
+ if($container>=0)
+ {
+ $type=$tpl[$container][1];
+ $this->validateAttributes($type,array($prop=>$value));
+ if(isset($tpl[$container][2][$prop]))
+ throw new TConfigurationException('template_property_duplicated',$prop);
+ $tpl[$container][2][$prop]=$value;
+ }
+ else // a property for the template control
+ $this->_directive[$prop]=$value;
$textStart=$matchEnd+1;
}
$expectPropEnd=false;
@@ -730,6 +736,9 @@ class TTemplate extends TApplicationComponent implements ITemplate
throw new TConfigurationException('template_format_invalid',$this->_tplFile,$line,$e->getMessage());
}
+ if($this->_directive===null)
+ $this->_directive=array();
+
// optimization by merging consecutive strings, expressions, statements and bindings
$objects=array();
$parent=null;
diff --git a/framework/Web/UI/WebControls/TButton.php b/framework/Web/UI/WebControls/TButton.php
index ba523168..75d60695 100644
--- a/framework/Web/UI/WebControls/TButton.php
+++ b/framework/Web/UI/WebControls/TButton.php
@@ -19,7 +19,7 @@
* A <b>command</b> button has a command name (specified by
* the {@link setCommandName CommandName} property) and and a command parameter
* (specified by {@link setCommandParameter CommandParameter} property)
- * associated with the button. This allows you to create multiple TLinkButton
+ * associated with the button. This allows you to create multiple TButton
* components on a Web page and programmatically determine which one is clicked
* with what parameter. You can provide an event handler for
* {@link onCommand OnCommand} event to programmatically control the actions performed