summaryrefslogtreecommitdiff
path: root/demos/address-book/protected/pages/FlexApp.php
diff options
context:
space:
mode:
authorwei <>2007-01-17 11:55:40 +0000
committerwei <>2007-01-17 11:55:40 +0000
commit912dc30b43330a3e99a3e1f947ff14de108a3701 (patch)
tree064a66120c95b043de9f9d56fb52d3e66bfe3e81 /demos/address-book/protected/pages/FlexApp.php
parent3dc598bc7c2604e24b9e0be1189d9d78b43737ea (diff)
Add address-book flex demo
Diffstat (limited to 'demos/address-book/protected/pages/FlexApp.php')
-rw-r--r--demos/address-book/protected/pages/FlexApp.php114
1 files changed, 114 insertions, 0 deletions
diff --git a/demos/address-book/protected/pages/FlexApp.php b/demos/address-book/protected/pages/FlexApp.php
new file mode 100644
index 00000000..e7a5bf2a
--- /dev/null
+++ b/demos/address-book/protected/pages/FlexApp.php
@@ -0,0 +1,114 @@
+<?php
+/**
+ * @author Wei Zhuo <weizho[at]gmail[dot]com>
+ * @version $Id$
+ * @since 3.1
+ */
+class FlexApp extends TTemplateControl
+{
+ private $_parameters;
+
+ /**
+ * FlashVar parameter name value pairs.
+ *
+ * NOTE: parameter names must be accessed in lowercase in Flex Applications!
+ *
+ * @return TAttributeCollection
+ */
+ public function getParameters()
+ {
+ if($this->_parameters===null)
+ $this->_parameters = new TAttributeCollection();
+ return $this->_parameters;
+ }
+
+ public function getFlashVars()
+ {
+ $params = array();
+ foreach($this->getParameters() as $name=>$value)
+ $params[] = $name.'='.$value;
+ return implode('&', $params);
+ }
+
+ public function getWidth()
+ {
+ return $this->getViewState('Width', '450');
+ }
+
+ public function setWidth($value)
+ {
+ $this->setViewState('Width', $value, '450');
+ }
+
+ public function getHeight()
+ {
+ return $this->getViewState('Height', '300');
+ }
+
+ public function setHeight($value)
+ {
+ $this->setViewState('Height', $value, '300');
+ }
+
+ public function getBinDirectory()
+ {
+ return $this->getViewState('Bin');
+ }
+
+ public function setBinDirectory($value)
+ {
+ $this->setViewState('Bin', $value);
+ }
+
+ public function getAppName()
+ {
+ return $this->getViewState('AppName');
+ }
+
+ public function setAppName($value)
+ {
+ $this->setViewState('AppName', $value);
+ }
+
+ public function getQuality()
+ {
+ return $this->getViewState('Quality', 'high');
+ }
+
+ public function setQuality($value)
+ {
+ $this->setViewState('Quality', $value, 'high');
+ }
+
+ public function getBgcolor()
+ {
+ return $this->getViewState('bgcolor', '#ffffff');
+ }
+
+ public function setBgColor($value)
+ {
+ $this->setViewState('bgcolor', $value, '#ffffff');
+ }
+
+ public function getAlign()
+ {
+ return $this->getViewState('align', 'middle');
+ }
+
+ public function setAlign($value)
+ {
+ $this->setViewState('align', $value, 'middle');
+ }
+
+ public function getAllowScriptAccess()
+ {
+ return $this->getViewState('allowScriptAccess', 'sameDomain');
+ }
+
+ public function setAllowScriptAccess($value)
+ {
+ $this->setViewState('allowScriptAccess', $value, 'sameDomain');
+ }
+}
+
+?> \ No newline at end of file