From de021710e1c0dae732e61ecb42a9ac60440f55ee Mon Sep 17 00:00:00 2001 From: "godzilla80@gmx.net" <> Date: Thu, 19 Mar 2009 21:20:47 +0000 Subject: replace is_null() function calls with native native language constuct --- .../UI/ActiveControls/TCallbackClientScript.php | 138 ++++++++++----------- 1 file changed, 69 insertions(+), 69 deletions(-) (limited to 'framework/Web/UI/ActiveControls/TCallbackClientScript.php') diff --git a/framework/Web/UI/ActiveControls/TCallbackClientScript.php b/framework/Web/UI/ActiveControls/TCallbackClientScript.php index 8f275ef8..1b9f1ca6 100644 --- a/framework/Web/UI/ActiveControls/TCallbackClientScript.php +++ b/framework/Web/UI/ActiveControls/TCallbackClientScript.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2008 PradoSoft + * @copyright Copyright © 2005-2008 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ * @package System.Web.UI.ActiveControls @@ -104,7 +104,7 @@ class TCallbackClientScript extends TApplicationComponent { $method = TPropertyValue::ensureEnum($method, 'Value', 'Index', 'Clear', 'Indices', 'Values', 'All', 'Invert'); - $type = is_null($type) ? $this->getSelectionControlType($control) : $type; + $type = ($type===null) ? $this->getSelectionControlType($control) : $type; $total = $this->getSelectionControlIsListType($control) ? $control->getItemCount() : 1; $this->callClientFunction('Prado.Element.select', array($control, $type.$method, $value, $total)); @@ -164,8 +164,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function setAttribute($control, $name, $value) { - if ($control instanceof ISurroundable) - $control=$control->getSurroundingTagID(); + if ($control instanceof ISurroundable) + $control=$control->getSurroundingTagID(); $this->callClientFunction('Prado.Element.setAttribute',array($control, $name, $value)); } @@ -193,8 +193,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function show($element) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->callClientFunction('Element.show', $element); } @@ -204,8 +204,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function hide($element) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->callClientFunction('Element.hide', $element); } @@ -217,8 +217,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function toggle($element, $effect=null, $options=array()) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->callClientFunction('Element.toggle', array($element,$effect,$options)); } @@ -228,8 +228,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function remove($element) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->callClientFunction('Element.remove', $element); } @@ -246,8 +246,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function update($element, $content) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->replace($element, $content, 'Element.update'); } @@ -258,8 +258,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function addCssClass($element, $cssClass) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->callClientFunction('Element.addClassName', array($element, $cssClass)); } @@ -270,8 +270,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function removeCssClass($element, $cssClass) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->callClientFunction('Element.removeClassName', array($element, $cssClass)); } @@ -292,8 +292,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function scrollTo($element) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->callClientFunction('Element.scrollTo', $element); } @@ -313,9 +313,9 @@ class TCallbackClientScript extends TApplicationComponent * @param array list of key-value pairs as style property and style value. */ public function setStyle($element, $styles) - { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + { + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->callClientFunction('Prado.Element.setStyle', array($element, $styles)); } @@ -326,8 +326,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function appendContent($element, $content) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->replace($element, $content, 'Prado.Element.Insert.append'); } @@ -338,8 +338,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function prependContent($element, $content) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->replace($element, $content, 'Prado.Element.Insert.prepend'); } @@ -350,8 +350,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function insertContentAfter($element, $content) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->replace($element, $content, 'Prado.Element.Insert.after'); } @@ -362,8 +362,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function insertContentBefore($element, $content) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->replace($element, $content, 'Prado.Element.Insert.before'); } @@ -406,8 +406,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function replaceContent($element,$content) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->replace($element, $content); } @@ -458,8 +458,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function visualEffect($type, $element, $options=null) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->callClientFunction($type, array($element, $options)); } @@ -470,8 +470,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function appear($element, $options=null) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->visualEffect('Effect.Appear', $element, $options); } @@ -482,8 +482,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function blindDown($element, $options=null) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->visualEffect('Effect.BlindDown', $element, $options); } @@ -494,8 +494,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function blindUp($element, $options=null) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->visualEffect('Effect.BlindUp', $element, $options); } @@ -507,8 +507,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function dropOut($element, $options=null) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->visualEffect('Effect.DropOut', $element, $options); } @@ -519,8 +519,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function fade($element, $options=null) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->visualEffect('Effect.Fade', $element, $options); } @@ -531,8 +531,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function fold($element, $options = null) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->visualEffect('Effect.Fold', $element, $options); } @@ -543,8 +543,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function grow($element, $options=null) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->visualEffect('Effect.Grow', $element, $options); } @@ -555,8 +555,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function puff($element, $options=null) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->visualEffect('Effect.Puff', $element, $options); } @@ -567,8 +567,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function pulsate($element, $options=null) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->visualEffect('Effect.Pulsate', $element, $options); } @@ -579,8 +579,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function shake($element, $options=null) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->visualEffect('Effect.Shake', $element, $options); } @@ -591,8 +591,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function shrink($element, $options=null) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->visualEffect('Effect.Shrink', $element, $options); } @@ -603,8 +603,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function slideDown($element, $options=null) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->visualEffect('Effect.SlideDown', $element, $options); } @@ -615,8 +615,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function slideUp($element, $options=null) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->visualEffect('Effect.SlideUp', $element, $options); } @@ -627,8 +627,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function squish($element, $options=null) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->visualEffect('Effect.Squish', $element, $options); } @@ -639,8 +639,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function switchOff($element, $options=null) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->visualEffect('Effect.SwitchOff', $element, $options); } @@ -651,8 +651,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function highlight($element, $options=null) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $this->visualEffect('Prado.Effect.Highlight', $element, $options); } @@ -663,8 +663,8 @@ class TCallbackClientScript extends TApplicationComponent */ public function setOpacity($element, $value) { - if ($element instanceof ISurroundable) - $element=$element->getSurroundingTagID(); + if ($element instanceof ISurroundable) + $element=$element->getSurroundingTagID(); $value = TPropertyValue::ensureFloat($value); $this->callClientFunction('Element.setOpacity', array($element,$value)); } -- cgit v1.2.3