summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
authorxue <>2005-11-11 21:03:34 +0000
committerxue <>2005-11-11 21:03:34 +0000
commitcb9ad614fe9e811a1565878ffbfb37803fa30486 (patch)
treecfcd509ab0b99525744a2347d27841c2d30f54ed /framework/Web
parent26ede97cc6771418af76a999931ccf5f4a8705a4 (diff)
Changed getPropertyByPath and setPropertyByPath to getSubProperty and setSubProperty, respectively.
Diffstat (limited to 'framework/Web')
-rw-r--r--framework/Web/Services/TPageService.php4
-rw-r--r--framework/Web/TCacheManager.php116
-rw-r--r--framework/Web/UI/TControl.php2
-rw-r--r--framework/Web/UI/TPage.php2
-rw-r--r--framework/Web/UI/TTemplate.php4
-rw-r--r--framework/Web/UI/TTemplateControl.php2
-rw-r--r--framework/Web/UI/TTheme.php2
7 files changed, 8 insertions, 124 deletions
diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php
index 6a19273d..0ab1b7bf 100644
--- a/framework/Web/Services/TPageService.php
+++ b/framework/Web/Services/TPageService.php
@@ -148,7 +148,7 @@ class TPageService extends TComponent implements IService
{
$component=Prado::createComponent($parameter[0]);
foreach($parameter[1] as $name=>$value)
- $component->setPropertyByPath($name,$value);
+ $component->setSubProperty($name,$value);
$parameters->add($id,$component);
}
}
@@ -159,7 +159,7 @@ class TPageService extends TComponent implements IService
$module=Prado::createComponent($moduleConfig[0]);
$application->setModule($id,$module);
foreach($moduleConfig[1] as $name=>$value)
- $module->setPropertyByPath($name,$value);
+ $module->setSubProperty($name,$value);
$module->init($this->_application,$moduleConfig[2]);
}
diff --git a/framework/Web/TCacheManager.php b/framework/Web/TCacheManager.php
deleted file mode 100644
index f1c9edd8..00000000
--- a/framework/Web/TCacheManager.php
+++ /dev/null
@@ -1,116 +0,0 @@
-<?php
-/**
-<configuration>
- <modules>
- <module id="cache" Expiry="xxx" CacheStorage="file"
- Location="xxx"
- MemcacheServer="localhost" MemcachePort="1111" />
- <module id="security" MachineKey="xxx" .... />
- <module id="authenticator" ... />
- </modules>
- <services>
- <service id="page" Location="xxx">
- <module id="asset" UseService="false" Location="xxx" Url="xxx" />
- <module id="authorizer" />
- </service>
- </services>
-</configuration>
-
-<module id="cache" Storage="sqlite,memcache" UniquePrefix="xxx"
- SqliteFile="xxx" MemcacheServer="localhost" MemcachePort="1111"/>
-<module id="asset" UseService="true" Location="xxx" Url="xxx" />
-<module id="authenticator" LoginUrl="xxxx" />
-<module id="authorizer" /> // need to investigate the security of memory cache
- */
-
-/**
-<module id="cache" type="System.Modules.TMemCache" Server="localhost" Port="1FileName="xxx" UniquePrefix="" />
-*/
-
-/**
-<module id="cache" type="System.Modules.TSqliteCache" DbFile="xxx" />
-*/
-
-
-class TAuthencator extends TComponent
-{
-}
-
-class TAuthorizer extends TComponent
-{
-}
-
-$cm->generateUniqueID('button:',$id)
-$cm->saveValue('template:'.$tmpFile,$template);
-$cm->saveValue('application:ID',$appID);
-$cm->saveValue('application:hashkey',$key);
-
-class TTemplateManager extends TComponent implements IModule
-{
-}
-
-class TAssetManager extends TComponent implements IModule
-{
- private $_pubDir=null;
- private $_pubUrl=null;
-
- public function init($context)
- {
- if(is_null($this->_pubDir))
- throw new TCongiruationException('cache_public_location_required');
- if(is_null($this->_pubUrl))
- throw new TCongiruationException('cache_public_url_required');
- }
-
- public function getPublicLocation()
- {
- return $this->_pubDir;
- }
-
- public function setPublicLocation($value)
- {
- if(is_dir($value))
- $this->_pubDir=realpath($value);
- else
- throw new TInvalidDataValueException('cache_public_location_invalid');
- }
-
- public function getPublicUrl()
- {
- return $this->_pubUrl;
- }
-
- public function setPublicUrl($value)
- {
- $this->_pubUrl=rtrim($value,'/');
- }
-
- public function publishLocation($path,$forceOverwrite=false)
- {
- $name=basename($path);
- $prefix=md5(dirname($path));
- }
-
- public function publishFile($path,$forceOverwrite=false)
- {
- if(($fullpath=realpath($path))!==false)
- {
- return $this->_pubUrl.'/'.$fullpath;
- }
- else
- throw new TInvalidDataValueException('cachemanager_path_unpublishable');
- }
-
- public function unpublishPath($path)
- {
- }
-}
-
-class TMemcache extends TComponent
-{
-}
-
-class TSqliteCache extends TComponent
-{
-}
-?> \ No newline at end of file
diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php
index ed6e7dd0..a3d3c93a 100644
--- a/framework/Web/UI/TControl.php
+++ b/framework/Web/UI/TControl.php
@@ -613,7 +613,7 @@ class TControl extends TComponent
if(isset($this->_rf[self::RF_DATA_BINDINGS]))
{
foreach($this->_rf[self::RF_DATA_BINDINGS] as $property=>$expression)
- $this->setPropertyByPath($property,$this->evaluateExpression($expression));
+ $this->setSubProperty($property,$this->evaluateExpression($expression));
if($raiseOnDataBinding)
$this->onDataBinding(null);
if(isset($this->_rf[self::RF_CONTROLS]))
diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php
index bb8f2253..08fbd2fe 100644
--- a/framework/Web/UI/TPage.php
+++ b/framework/Web/UI/TPage.php
@@ -51,7 +51,7 @@ class TPage extends TTemplateControl
if(is_array($initProperties))
{
foreach($initProperties as $name=>$value)
- $this->setPropertyByPath($name,$value);
+ $this->setSubProperty($name,$value);
}
parent::__construct();
}
diff --git a/framework/Web/UI/TTemplate.php b/framework/Web/UI/TTemplate.php
index df9bf813..160a00f0 100644
--- a/framework/Web/UI/TTemplate.php
+++ b/framework/Web/UI/TTemplate.php
@@ -148,11 +148,11 @@ class TTemplate extends TComponent implements ITemplate
else // complex property
{
if(is_string($value))
- $component->setPropertyByPath($name,$value);
+ $component->setSubProperty($name,$value);
else if($value[0]===0)
$component->bindProperty($name,$value[1]);
else
- $component->setPropertyByPath($component->evaluateExpression($value[1]));
+ $component->setSubProperty($component->evaluateExpression($value[1]));
}
}
$parent=isset($controls[$object[0]])?$controls[$object[0]]:$tplControl;
diff --git a/framework/Web/UI/TTemplateControl.php b/framework/Web/UI/TTemplateControl.php
index 89bfe12f..7042281c 100644
--- a/framework/Web/UI/TTemplateControl.php
+++ b/framework/Web/UI/TTemplateControl.php
@@ -73,7 +73,7 @@ class TTemplateControl extends TControl implements INamingContainer
if(($tpl=$this->getTemplate(true))!==null)
{
foreach($tpl->getDirective() as $name=>$value)
- $this->setPropertyByPath($name,$value);
+ $this->setSubProperty($name,$value);
}
}
diff --git a/framework/Web/UI/TTheme.php b/framework/Web/UI/TTheme.php
index 1e3d8fab..3d4d4e5d 100644
--- a/framework/Web/UI/TTheme.php
+++ b/framework/Web/UI/TTheme.php
@@ -52,7 +52,7 @@ class TTheme extends TComponent
{
foreach($this->_skins[$type][$id] as $name=>$value)
{
- $control->setPropertyByPath($name,$value);
+ $control->setSubProperty($name,$value);
}
}
else