From e4999b25052d1ad9400a0f9fd5289a49eea1bddc Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Sun, 25 Jan 2015 20:04:57 +0100 Subject: More namespace changes Changed version to 3.2.99; Attempt at fixing autoloading fixed enough namespaces to have some demos running --- .../Web/UI/ActiveControls/TActiveBoundColumn.php | 2 +- .../UI/ActiveControls/TActiveCheckBoxColumn.php | 2 +- .../ActiveControls/TActiveDropDownListColumn.php | 2 +- .../UI/ActiveControls/TActiveHyperLinkColumn.php | 2 +- .../Web/UI/ActiveControls/TActiveLiteralColumn.php | 2 +- .../UI/ActiveControls/TActiveTemplateColumn.php | 2 +- .../Web/UI/ActiveControls/TDraggableConstraint.php | 2 +- .../ActiveControls/TDraggableGhostingOptions.php | 2 +- .../UI/ActiveControls/TDraggableRevertOptions.php | 2 +- framework/Web/UI/IPostBackDataHandler.php | 2 +- framework/Web/UI/IValidatable.php | 2 +- framework/Web/UI/TControl.php | 1 + framework/Web/UI/THtmlWriter.php | 2 +- framework/Web/UI/TPage.php | 14 ++++---- framework/Web/UI/TTemplate.php | 9 +++--- framework/Web/UI/WebControls/IItemDataRenderer.php | 2 +- framework/Web/UI/WebControls/IRepeatInfoUser.php | 2 -- framework/Web/UI/WebControls/IStyleable.php | 37 ++++++++++++++++++++++ framework/Web/UI/WebControls/TAccordion.php | 8 +++-- framework/Web/UI/WebControls/TAccordionView.php | 3 +- .../UI/WebControls/TAccordionViewCollection.php | 3 +- framework/Web/UI/WebControls/TBaseDataList.php | 6 ---- framework/Web/UI/WebControls/TBaseValidator.php | 11 +++---- framework/Web/UI/WebControls/TBoundColumn.php | 12 +++---- framework/Web/UI/WebControls/TBulletStyle.php | 2 +- framework/Web/UI/WebControls/TBulletedList.php | 9 ++---- .../UI/WebControls/TBulletedListDisplayMode.php | 2 +- framework/Web/UI/WebControls/TButton.php | 12 ++++--- framework/Web/UI/WebControls/TButtonColumn.php | 11 ++----- framework/Web/UI/WebControls/TButtonColumnType.php | 2 +- framework/Web/UI/WebControls/TButtonType.php | 2 +- framework/Web/UI/WebControls/TCaptcha.php | 3 +- framework/Web/UI/WebControls/TCaptchaValidator.php | 4 +-- framework/Web/UI/WebControls/TCheckBox.php | 9 +++--- framework/Web/UI/WebControls/TCheckBoxColumn.php | 10 +----- framework/Web/UI/WebControls/TCheckBoxList.php | 22 +++---------- framework/Web/UI/WebControls/TCircleHotSpot.php | 1 + framework/Web/UI/WebControls/TClientScript.php | 3 +- framework/Web/UI/WebControls/TColorPicker.php | 1 + framework/Web/UI/WebControls/TColorPickerMode.php | 2 +- framework/Web/UI/WebControls/TCompareValidator.php | 9 ++---- framework/Web/UI/WebControls/TConditional.php | 6 ++-- framework/Web/UI/WebControls/TContent.php | 4 ++- framework/Web/UI/WebControls/TContentDirection.php | 2 +- .../Web/UI/WebControls/TContentPlaceHolder.php | 2 +- framework/Web/UI/WebControls/TCustomValidator.php | 6 +--- framework/Web/UI/WebControls/TDataBoundControl.php | 15 +++++---- framework/Web/UI/WebControls/TDataGrid.php | 16 +++------- framework/Web/UI/WebControls/TDataGridColumn.php | 23 +++++++------- .../UI/WebControls/TDataGridColumnCollection.php | 3 +- .../WebControls/TDataGridCommandEventParameter.php | 6 ++-- framework/Web/UI/WebControls/TDataGridItem.php | 5 +-- .../Web/UI/WebControls/TDataGridItemCollection.php | 3 +- .../Web/UI/WebControls/TDataGridItemRenderer.php | 3 -- framework/Web/UI/WebControls/TDataGridPager.php | 4 +-- .../UI/WebControls/TDataGridPagerButtonType.php | 2 +- .../Web/UI/WebControls/TDataGridPagerMode.php | 2 +- .../Web/UI/WebControls/TDataGridPagerPosition.php | 2 +- .../Web/UI/WebControls/TDataGridPagerStyle.php | 4 +-- framework/Web/UI/WebControls/TDataList.php | 18 ++++------- .../WebControls/TDataListCommandEventParameter.php | 6 ++-- framework/Web/UI/WebControls/TDataListItem.php | 5 +-- .../Web/UI/WebControls/TDataListItemCollection.php | 3 +- .../Web/UI/WebControls/TDataListItemRenderer.php | 5 +-- framework/Web/UI/WebControls/TDataRenderer.php | 4 +-- .../Web/UI/WebControls/TDataSourceControl.php | 2 +- .../UI/WebControls/TDataSourceSelectParameters.php | 1 + .../Web/UI/WebControls/TDataTypeValidator.php | 8 ++--- framework/Web/UI/WebControls/TDatePicker.php | 27 +++++++--------- .../Web/UI/WebControls/TDatePickerInputMode.php | 2 +- framework/Web/UI/WebControls/TDatePickerMode.php | 2 +- .../Web/UI/WebControls/TDatePickerPositionMode.php | 2 +- framework/Web/UI/WebControls/TDisplayStyle.php | 2 +- framework/Web/UI/WebControls/TDropDownList.php | 14 +++----- .../Web/UI/WebControls/TDropDownListColumn.php | 4 +-- .../Web/UI/WebControls/TEditCommandColumn.php | 12 +++---- .../Web/UI/WebControls/TEmailAddressValidator.php | 6 +--- framework/Web/UI/WebControls/TExpression.php | 2 +- framework/Web/UI/WebControls/TFileUpload.php | 7 ++-- framework/Web/UI/WebControls/TFlushOutput.php | 3 +- framework/Web/UI/WebControls/TFont.php | 1 + framework/Web/UI/WebControls/THead.php | 9 +++--- framework/Web/UI/WebControls/THiddenField.php | 11 ++++--- framework/Web/UI/WebControls/THorizontalAlign.php | 2 +- framework/Web/UI/WebControls/THotSpot.php | 1 + .../Web/UI/WebControls/THotSpotCollection.php | 3 +- framework/Web/UI/WebControls/THotSpotMode.php | 2 +- framework/Web/UI/WebControls/THtmlArea.php | 6 +--- framework/Web/UI/WebControls/THtmlArea4.php | 6 +--- framework/Web/UI/WebControls/THtmlElement.php | 6 ++-- framework/Web/UI/WebControls/THyperLink.php | 9 +++--- framework/Web/UI/WebControls/THyperLinkColumn.php | 9 ------ framework/Web/UI/WebControls/TImage.php | 6 ++-- framework/Web/UI/WebControls/TImageButton.php | 18 ++++------- .../UI/WebControls/TImageClickEventParameter.php | 1 + framework/Web/UI/WebControls/TImageMap.php | 8 ++--- framework/Web/UI/WebControls/TInlineFrame.php | 7 ++-- framework/Web/UI/WebControls/TInlineFrameAlign.php | 2 +- .../Web/UI/WebControls/TInlineFrameScrollBars.php | 2 +- framework/Web/UI/WebControls/TItemDataRenderer.php | 4 +-- framework/Web/UI/WebControls/TJavascriptLogger.php | 2 +- framework/Web/UI/WebControls/TKeyboard.php | 3 +- framework/Web/UI/WebControls/TLabel.php | 7 ++-- framework/Web/UI/WebControls/TLinkButton.php | 13 ++++---- framework/Web/UI/WebControls/TListBox.php | 14 +++----- framework/Web/UI/WebControls/TListControl.php | 20 ++++-------- .../Web/UI/WebControls/TListControlValidator.php | 6 +--- framework/Web/UI/WebControls/TListItem.php | 1 + framework/Web/UI/WebControls/TListItemType.php | 2 +- .../Web/UI/WebControls/TListSelectionMode.php | 2 +- framework/Web/UI/WebControls/TLiteral.php | 7 ++-- framework/Web/UI/WebControls/TLiteralColumn.php | 7 ++-- framework/Web/UI/WebControls/TMarkdown.php | 6 ---- .../Web/UI/WebControls/TMetaTagCollection.php | 3 +- framework/Web/UI/WebControls/TMultiView.php | 8 +++-- framework/Web/UI/WebControls/TOutputCache.php | 4 ++- .../TOutputCacheCalculateKeyEventParameter.php | 1 + .../TOutputCacheCheckDependencyEventParameter.php | 1 + framework/Web/UI/WebControls/TPager.php | 6 ++-- framework/Web/UI/WebControls/TPagerButtonType.php | 2 +- framework/Web/UI/WebControls/TPagerMode.php | 2 +- framework/Web/UI/WebControls/TPanel.php | 9 ++---- framework/Web/UI/WebControls/TPanelStyle.php | 6 +--- framework/Web/UI/WebControls/TPlaceHolder.php | 2 +- framework/Web/UI/WebControls/TRadioButton.php | 8 ++--- framework/Web/UI/WebControls/TRadioButtonList.php | 9 ------ framework/Web/UI/WebControls/TRangeValidator.php | 8 ++--- framework/Web/UI/WebControls/TRatingList.php | 7 ++-- framework/Web/UI/WebControls/TReCaptcha.php | 5 ++- .../Web/UI/WebControls/TReCaptchaValidator.php | 3 -- .../Web/UI/WebControls/TReadOnlyDataSource.php | 3 +- .../Web/UI/WebControls/TReadOnlyDataSourceView.php | 4 ++- framework/Web/UI/WebControls/TRectangleHotSpot.php | 1 + .../UI/WebControls/TRegularExpressionValidator.php | 5 --- framework/Web/UI/WebControls/TRepeatDirection.php | 2 +- framework/Web/UI/WebControls/TRepeatInfo.php | 2 ++ framework/Web/UI/WebControls/TRepeatLayout.php | 2 +- framework/Web/UI/WebControls/TRepeater.php | 28 ++++++++-------- .../WebControls/TRepeaterCommandEventParameter.php | 6 ++-- framework/Web/UI/WebControls/TRepeaterItem.php | 5 +-- .../Web/UI/WebControls/TRepeaterItemCollection.php | 5 +-- .../Web/UI/WebControls/TRepeaterItemRenderer.php | 5 +-- .../Web/UI/WebControls/TRequiredFieldValidator.php | 6 +--- framework/Web/UI/WebControls/TSafeHtml.php | 3 +- framework/Web/UI/WebControls/TScrollBars.php | 2 +- .../WebControls/TServerValidateEventParameter.php | 1 + framework/Web/UI/WebControls/TSlider.php | 11 ++++--- framework/Web/UI/WebControls/TSliderDirection.php | 2 +- framework/Web/UI/WebControls/TStatements.php | 2 +- framework/Web/UI/WebControls/TStyle.php | 6 +--- framework/Web/UI/WebControls/TStyleSheet.php | 2 +- framework/Web/UI/WebControls/TTabPanel.php | 8 +++-- framework/Web/UI/WebControls/TTabView.php | 3 +- .../Web/UI/WebControls/TTabViewCollection.php | 3 +- framework/Web/UI/WebControls/TTable.php | 8 ++--- .../Web/UI/WebControls/TTableCaptionAlign.php | 2 +- framework/Web/UI/WebControls/TTableCell.php | 7 ++-- .../Web/UI/WebControls/TTableCellCollection.php | 3 +- framework/Web/UI/WebControls/TTableFooterRow.php | 5 --- framework/Web/UI/WebControls/TTableGridLines.php | 2 +- framework/Web/UI/WebControls/TTableHeaderCell.php | 7 +--- framework/Web/UI/WebControls/TTableHeaderRow.php | 5 --- framework/Web/UI/WebControls/TTableHeaderScope.php | 2 +- framework/Web/UI/WebControls/TTableItemStyle.php | 1 + framework/Web/UI/WebControls/TTableRow.php | 8 ++--- .../Web/UI/WebControls/TTableRowCollection.php | 3 +- framework/Web/UI/WebControls/TTableRowSection.php | 2 +- framework/Web/UI/WebControls/TTableStyle.php | 2 ++ framework/Web/UI/WebControls/TTemplateColumn.php | 12 +++---- .../Web/UI/WebControls/TTemplatedWizardStep.php | 2 +- framework/Web/UI/WebControls/TTextAlign.php | 2 +- framework/Web/UI/WebControls/TTextBox.php | 15 +++++---- .../UI/WebControls/TTextBoxAutoCompleteType.php | 2 +- framework/Web/UI/WebControls/TTextBoxMode.php | 2 +- framework/Web/UI/WebControls/TTextHighlighter.php | 30 ++++++++++++++---- .../TTextHighlighterLineNumberStyle.php | 2 +- framework/Web/UI/WebControls/TTextProcessor.php | 4 ++- .../UI/WebControls/TValidationCompareOperator.php | 2 +- .../Web/UI/WebControls/TValidationDataType.php | 2 +- .../Web/UI/WebControls/TValidationSummary.php | 3 +- .../WebControls/TValidationSummaryDisplayMode.php | 2 +- .../WebControls/TValidationSummaryDisplayStyle.php | 2 +- .../Web/UI/WebControls/TValidatorClientSide.php | 1 + .../Web/UI/WebControls/TValidatorDisplayStyle.php | 2 +- framework/Web/UI/WebControls/TVerticalAlign.php | 2 +- framework/Web/UI/WebControls/TView.php | 3 +- framework/Web/UI/WebControls/TViewCollection.php | 3 +- framework/Web/UI/WebControls/TWebControl.php | 12 +++---- .../Web/UI/WebControls/TWebControlAdapter.php | 2 +- .../Web/UI/WebControls/TWebControlDecorator.php | 1 + framework/Web/UI/WebControls/TWizard.php | 18 ++++------- .../WebControls/TWizardNavigationButtonStyle.php | 6 +--- .../UI/WebControls/TWizardNavigationButtonType.php | 2 +- .../UI/WebControls/TWizardNavigationContainer.php | 2 +- .../TWizardNavigationEventParameter.php | 1 + .../UI/WebControls/TWizardNavigationTemplate.php | 1 + framework/Web/UI/WebControls/TWizardStep.php | 1 + .../Web/UI/WebControls/TWizardStepCollection.php | 3 +- framework/Web/UI/WebControls/TWizardStepType.php | 2 +- framework/Web/UI/WebControls/TXmlTransform.php | 3 +- 200 files changed, 492 insertions(+), 595 deletions(-) create mode 100644 framework/Web/UI/WebControls/IStyleable.php (limited to 'framework/Web/UI') diff --git a/framework/Web/UI/ActiveControls/TActiveBoundColumn.php b/framework/Web/UI/ActiveControls/TActiveBoundColumn.php index 806d0f04..38b6fdbf 100644 --- a/framework/Web/UI/ActiveControls/TActiveBoundColumn.php +++ b/framework/Web/UI/ActiveControls/TActiveBoundColumn.php @@ -34,7 +34,7 @@ class TActiveBoundColumn extends TBoundColumn { if(($classPath=$this->getHeaderRenderer())!=='') { $control=Prado::createComponent($classPath); - if($control instanceof IDataRenderer) { + if($control instanceof \Prado\IDataRenderer) { if($control instanceof IItemDataRenderer) { $item=$cell->getParent(); $control->setItemIndex($item->getItemIndex()); diff --git a/framework/Web/UI/ActiveControls/TActiveCheckBoxColumn.php b/framework/Web/UI/ActiveControls/TActiveCheckBoxColumn.php index ffe23edf..2fa4f4be 100644 --- a/framework/Web/UI/ActiveControls/TActiveCheckBoxColumn.php +++ b/framework/Web/UI/ActiveControls/TActiveCheckBoxColumn.php @@ -61,7 +61,7 @@ class TActiveCheckBoxColumn extends TCheckBoxColumn if(($classPath=$this->getHeaderRenderer())!=='') { $control=Prado::createComponent($classPath); - if($control instanceof IDataRenderer) + if($control instanceof \Prado\IDataRenderer) { if($control instanceof IItemDataRenderer) { diff --git a/framework/Web/UI/ActiveControls/TActiveDropDownListColumn.php b/framework/Web/UI/ActiveControls/TActiveDropDownListColumn.php index da6ffabd..530500e2 100644 --- a/framework/Web/UI/ActiveControls/TActiveDropDownListColumn.php +++ b/framework/Web/UI/ActiveControls/TActiveDropDownListColumn.php @@ -34,7 +34,7 @@ class TActiveDropDownListColumn extends TDropDownListColumn if(($classPath=$this->getHeaderRenderer())!=='') { $control=Prado::createComponent($classPath); - if($control instanceof IDataRenderer) + if($control instanceof \Prado\IDataRenderer) { if($control instanceof IItemDataRenderer) { diff --git a/framework/Web/UI/ActiveControls/TActiveHyperLinkColumn.php b/framework/Web/UI/ActiveControls/TActiveHyperLinkColumn.php index c9958b35..1d2d103c 100644 --- a/framework/Web/UI/ActiveControls/TActiveHyperLinkColumn.php +++ b/framework/Web/UI/ActiveControls/TActiveHyperLinkColumn.php @@ -35,7 +35,7 @@ class TActiveHyperLinkColumn extends THyperLinkColumn if(($classPath=$this->getHeaderRenderer())!=='') { $control=Prado::createComponent($classPath); - if($control instanceof IDataRenderer) + if($control instanceof \Prado\IDataRenderer) { if($control instanceof IItemDataRenderer) { diff --git a/framework/Web/UI/ActiveControls/TActiveLiteralColumn.php b/framework/Web/UI/ActiveControls/TActiveLiteralColumn.php index 70652762..59e1b366 100644 --- a/framework/Web/UI/ActiveControls/TActiveLiteralColumn.php +++ b/framework/Web/UI/ActiveControls/TActiveLiteralColumn.php @@ -39,7 +39,7 @@ class TActiveLiteralColumn extends TLiteralColumn { if(($classPath=$this->getHeaderRenderer())!=='') { $control=Prado::createComponent($classPath); - if($control instanceof IDataRenderer) { + if($control instanceof \Prado\IDataRenderer) { if($control instanceof IItemDataRenderer) { $item=$cell->getParent(); $control->setItemIndex($item->getItemIndex()); diff --git a/framework/Web/UI/ActiveControls/TActiveTemplateColumn.php b/framework/Web/UI/ActiveControls/TActiveTemplateColumn.php index d0e3f9d1..a566ed34 100644 --- a/framework/Web/UI/ActiveControls/TActiveTemplateColumn.php +++ b/framework/Web/UI/ActiveControls/TActiveTemplateColumn.php @@ -35,7 +35,7 @@ class TActiveTemplateColumn extends TTemplateColumn { if(($classPath=$this->getHeaderRenderer())!=='') { $control=Prado::createComponent($classPath); - if($control instanceof IDataRenderer) { + if($control instanceof \Prado\IDataRenderer) { if($control instanceof IItemDataRenderer) { $item=$cell->getParent(); $control->setItemIndex($item->getItemIndex()); diff --git a/framework/Web/UI/ActiveControls/TDraggableConstraint.php b/framework/Web/UI/ActiveControls/TDraggableConstraint.php index d22e5eae..55686082 100644 --- a/framework/Web/UI/ActiveControls/TDraggableConstraint.php +++ b/framework/Web/UI/ActiveControls/TDraggableConstraint.php @@ -16,7 +16,7 @@ namespace Prado\Web\UI\ActiveControls; * @license http://www.pradosoft.com/license * @package Prado\Web\UI\ActiveControls */ -class TDraggableConstraint extends TEnumerable +class TDraggableConstraint extends \Prado\TEnumerable { const None='None'; const Horizontal='Horizontal'; diff --git a/framework/Web/UI/ActiveControls/TDraggableGhostingOptions.php b/framework/Web/UI/ActiveControls/TDraggableGhostingOptions.php index 8fdcd2d5..40466546 100644 --- a/framework/Web/UI/ActiveControls/TDraggableGhostingOptions.php +++ b/framework/Web/UI/ActiveControls/TDraggableGhostingOptions.php @@ -16,7 +16,7 @@ namespace Prado\Web\UI\ActiveControls; * @license http://www.pradosoft.com/license * @package Prado\Web\UI\ActiveControls */ -class TDraggableGhostingOptions extends TEnumerable +class TDraggableGhostingOptions extends \Prado\TEnumerable { const None='None'; const Ghosting='Ghosting'; diff --git a/framework/Web/UI/ActiveControls/TDraggableRevertOptions.php b/framework/Web/UI/ActiveControls/TDraggableRevertOptions.php index 79e903b1..f6f96e19 100644 --- a/framework/Web/UI/ActiveControls/TDraggableRevertOptions.php +++ b/framework/Web/UI/ActiveControls/TDraggableRevertOptions.php @@ -16,7 +16,7 @@ namespace Prado\Web\UI\ActiveControls; * @license http://www.pradosoft.com/license * @package Prado\Web\UI\ActiveControls */ -class TDraggableRevertOptions extends TEnumerable +class TDraggableRevertOptions extends \Prado\TEnumerable { const None='None'; const Revert='Revert'; diff --git a/framework/Web/UI/IPostBackDataHandler.php b/framework/Web/UI/IPostBackDataHandler.php index 9c947545..c8844802 100644 --- a/framework/Web/UI/IPostBackDataHandler.php +++ b/framework/Web/UI/IPostBackDataHandler.php @@ -12,7 +12,7 @@ namespace Prado\Web\UI; /** - * IPostBackDataHandler interface + * \Prado\Web\UI\IPostBackDataHandler interface * * If a control wants to load post data, it must implement this interface. * diff --git a/framework/Web/UI/IValidatable.php b/framework/Web/UI/IValidatable.php index a9ed85bd..055288bc 100644 --- a/framework/Web/UI/IValidatable.php +++ b/framework/Web/UI/IValidatable.php @@ -12,7 +12,7 @@ namespace Prado\Web\UI; /** - * IValidatable interface + * \Prado\Web\UI\IValidatable interface * * If a control wants to be validated by a validator, it must implement this interface. * diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php index 6e34a439..99096311 100644 --- a/framework/Web/UI/TControl.php +++ b/framework/Web/UI/TControl.php @@ -15,6 +15,7 @@ use Prado\Exceptions\TInvalidOperationException; use Prado\Prado; use Prado\TPropertyValue; use Prado\Web\UI\ActiveControls\IActiveControl; +use Prado\Collections\TAttributeCollection; /** * TControl class diff --git a/framework/Web/UI/THtmlWriter.php b/framework/Web/UI/THtmlWriter.php index 13a3252f..59136523 100644 --- a/framework/Web/UI/THtmlWriter.php +++ b/framework/Web/UI/THtmlWriter.php @@ -10,7 +10,7 @@ */ namespace Prado\Web\UI; -use Prado\THttpUtility; +use Prado\Web\THttpUtility; /** * THtmlWriter class diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php index 8dc1f1e7..796d71cd 100644 --- a/framework/Web/UI/TPage.php +++ b/framework/Web/UI/TPage.php @@ -22,6 +22,10 @@ use Prado\Prado; use Prado\TPropertyValue; use Prado\Web\UI\ActiveControls\TActivePageAdapter; use Prado\Web\UI\ActiveControls\TCallbackClientScript; +use Prado\Web\UI\WebControls\THead; + +Prado::using('System.Web.UI.*'); +Prado::using('System.Web.UI.WebControls.*'); /** * TPage class @@ -593,11 +597,9 @@ class TPage extends TTemplateControl if(!$this->_clientScript) { $className = $classPath = $this->getService()->getClientScriptManagerClass(); Prado::using($className); - if(($pos=strrpos($className,'.'))!==false) - $className=substr($className,$pos+1); - if(!class_exists($className,false) || ($className!=='TClientScriptManager' && !is_subclass_of($className,'TClientScriptManager'))) - throw new THttpException(404,'page_csmanagerclass_invalid',$classPath); + if($className!=='\Prado\Web\UI\TClientScriptManager' && !is_subclass_of($className,'\Prado\Web\UI\TClientScriptManager')) + throw new THttpException(404,'page_csmanagerclass_invalid',$className); $this->_clientScript=new $className($this); } @@ -873,7 +875,7 @@ class TPage extends TTemplateControl continue; else if($control=$this->findControl($key)) { - if($control instanceof IPostBackDataHandler) + if($control instanceof \Prado\Web\UI\IPostBackDataHandler) { if($control->loadPostData($key,$postData)) $this->_controlsPostDataChanged[]=$control; @@ -893,7 +895,7 @@ class TPage extends TTemplateControl { if($control=$this->findControl($key)) { - if($control instanceof IPostBackDataHandler) + if($control instanceof \Prado\Web\UI\IPostBackDataHandler) { if($control->loadPostData($key,$this->_postData)) $this->_controlsPostDataChanged[]=$control; diff --git a/framework/Web/UI/TTemplate.php b/framework/Web/UI/TTemplate.php index cf32c4cc..a19935ef 100644 --- a/framework/Web/UI/TTemplate.php +++ b/framework/Web/UI/TTemplate.php @@ -474,7 +474,7 @@ class TTemplate extends \Prado\TApplicationComponent implements ITemplate $matchEnd=0; $c=0; $this->_directive=null; - try + //try { for($i=0;$i<$n;++$i) { @@ -647,6 +647,7 @@ class TTemplate extends \Prado\TApplicationComponent implements ITemplate if($textStart_startingLine+count(explode("\n",substr($input,0,$matchEnd+1))); $this->handleException($e,$line,$input); - } + } */ if($this->_directive===null) $this->_directive=array(); @@ -803,7 +804,7 @@ class TTemplate extends \Prado\TApplicationComponent implements ITemplate else $className=$type; $class=new \ReflectionClass($className); - if(is_subclass_of($className,'TControl') || $className==='TControl') + if(is_subclass_of($className,'\Prado\Web\UI\TControl') || $className==='\Prado\Web\UI\TControl') { foreach($attributes as $name=>$att) { @@ -842,7 +843,7 @@ class TTemplate extends \Prado\TApplicationComponent implements ITemplate } } } - else if(is_subclass_of($className,'TComponent') || $className==='TComponent') + else if(is_subclass_of($className,'\Prado\TComponent') || $className==='\Prado\TComponent') { foreach($attributes as $name=>$att) { diff --git a/framework/Web/UI/WebControls/IItemDataRenderer.php b/framework/Web/UI/WebControls/IItemDataRenderer.php index 83e08da7..7dfc3d95 100644 --- a/framework/Web/UI/WebControls/IItemDataRenderer.php +++ b/framework/Web/UI/WebControls/IItemDataRenderer.php @@ -23,7 +23,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.1.0 */ -interface IItemDataRenderer extends IDataRenderer +interface IItemDataRenderer extends \Prado\IDataRenderer { /** * Returns a value indicating the zero-based index of the item in the corresponding data control's item collection. diff --git a/framework/Web/UI/WebControls/IRepeatInfoUser.php b/framework/Web/UI/WebControls/IRepeatInfoUser.php index 8c181b05..0b4aed48 100644 --- a/framework/Web/UI/WebControls/IRepeatInfoUser.php +++ b/framework/Web/UI/WebControls/IRepeatInfoUser.php @@ -11,8 +11,6 @@ namespace Prado\Web\UI\WebControls; -Prado::using('System.Web.UI.WebControls.TTable'); - /** * IRepeatInfoUser interface. * This interface must be implemented by classes who want to use {@link TRepeatInfo}. diff --git a/framework/Web/UI/WebControls/IStyleable.php b/framework/Web/UI/WebControls/IStyleable.php new file mode 100644 index 00000000..f7e0bf31 --- /dev/null +++ b/framework/Web/UI/WebControls/IStyleable.php @@ -0,0 +1,37 @@ + + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2005-2014 PradoSoft + * @license http://www.pradosoft.com/license/ + * @package Prado\Web\UI\WebControls + */ + +namespace Prado\Web\UI\WebControls; + +/** + * IStyleable interface. + * + * This interface should be implemented by classes that support CSS styles. + * + * @author Qiang Xue + * @package Prado\Web\UI\WebControls + * @since 3.1.0 + */ +interface IStyleable +{ + /** + * @return boolean whether the object has defined any style information + */ + public function getHasStyle(); + /** + * @return TStyle the object representing the css style of the object + */ + public function getStyle(); + /** + * Removes all styles associated with the object + */ + public function clearStyle(); +} \ No newline at end of file diff --git a/framework/Web/UI/WebControls/TAccordion.php b/framework/Web/UI/WebControls/TAccordion.php index c62267e6..22e0bffd 100644 --- a/framework/Web/UI/WebControls/TAccordion.php +++ b/framework/Web/UI/WebControls/TAccordion.php @@ -11,6 +11,8 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; +use Prado\Exceptions\TInvalidDataValueException; /** * Class TAccordion. @@ -64,7 +66,7 @@ namespace Prado\Web\UI\WebControls; * @since 3.2 */ -class TAccordion extends TWebControl implements IPostBackDataHandler +class TAccordion extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\Web\UI\IPostBackDataHandler { private $_dataChanged=false; @@ -375,7 +377,7 @@ class TAccordion extends TWebControl implements IPostBackDataHandler /** * Raises postdata changed event. - * This method is required by {@link IPostBackDataHandler} interface. + * This method is required by {@link \Prado\Web\UI\IPostBackDataHandler} interface. * It is invoked by the framework when {@link getActiveViewIndex ActiveViewIndex} property * is changed on postback. * This method is primarly used by framework developers. @@ -387,7 +389,7 @@ class TAccordion extends TWebControl implements IPostBackDataHandler /** * Returns a value indicating whether postback has caused the control data change. - * This method is required by the IPostBackDataHandler interface. + * This method is required by the \Prado\Web\UI\IPostBackDataHandler interface. * @return boolean whether postback has caused the control data change. False if the page is not in postback mode. */ public function getDataChanged() diff --git a/framework/Web/UI/WebControls/TAccordionView.php b/framework/Web/UI/WebControls/TAccordionView.php index 928776b6..98f69111 100644 --- a/framework/Web/UI/WebControls/TAccordionView.php +++ b/framework/Web/UI/WebControls/TAccordionView.php @@ -11,6 +11,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * Class TAccordionView. @@ -25,7 +26,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.2 */ -class TAccordionView extends TWebControl +class TAccordionView extends \Prado\Web\UI\WebControls\TWebControl { private $_active=false; diff --git a/framework/Web/UI/WebControls/TAccordionViewCollection.php b/framework/Web/UI/WebControls/TAccordionViewCollection.php index f2511732..460b4545 100644 --- a/framework/Web/UI/WebControls/TAccordionViewCollection.php +++ b/framework/Web/UI/WebControls/TAccordionViewCollection.php @@ -11,6 +11,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Exceptions\TInvalidDataTypeException; /** * Class TAccordionViewCollection. @@ -21,7 +22,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.2 */ -class TAccordionViewCollection extends TControlCollection +class TAccordionViewCollection extends \Prado\Web\UI\TControlCollection { /** * Inserts an item at the specified position. diff --git a/framework/Web/UI/WebControls/TBaseDataList.php b/framework/Web/UI/WebControls/TBaseDataList.php index 3651e97a..7d6a21bf 100644 --- a/framework/Web/UI/WebControls/TBaseDataList.php +++ b/framework/Web/UI/WebControls/TBaseDataList.php @@ -11,12 +11,6 @@ namespace Prado\Web\UI\WebControls; -/** - * Includes TDataBoundControl and TDataFieldAccessor classes - */ -Prado::using('System.Web.UI.WebControls.TDataBoundControl'); -Prado::using('System.Util.TDataFieldAccessor'); - /** * TBaseDataList class * diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php index 1ebf16ea..291a29e6 100644 --- a/framework/Web/UI/WebControls/TBaseValidator.php +++ b/framework/Web/UI/WebControls/TBaseValidator.php @@ -10,11 +10,8 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Using TLabel class - */ -Prado::using('System.Web.UI.WebControls.TLabel'); +use Prado\TPropertyValue; +use Prado\Exceptions\TInvalidDataTypeException; /** * TBaseValidator class @@ -490,11 +487,11 @@ abstract class TBaseValidator extends TLabel implements IValidator * Retrieves the property value of the control being validated. * @param TControl control being validated * @return string property value to be validated - * @throws TInvalidDataTypeException if the control to be validated does not implement {@link IValidatable}. + * @throws TInvalidDataTypeException if the control to be validated does not implement {@link \Prado\Web\UI\IValidatable}. */ protected function getValidationValue($control) { - if($control instanceof IValidatable) + if($control instanceof \Prado\Web\UI\IValidatable) return $control->getValidationPropertyValue(); else throw new TInvalidDataTypeException('basevalidator_validatable_required',get_class($this)); diff --git a/framework/Web/UI/WebControls/TBoundColumn.php b/framework/Web/UI/WebControls/TBoundColumn.php index f5589469..36b9a143 100644 --- a/framework/Web/UI/WebControls/TBoundColumn.php +++ b/framework/Web/UI/WebControls/TBoundColumn.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * TDataGridColumn class file - */ -Prado::using('System.Web.UI.WebControls.TDataGridColumn'); +use Prado\TPropertyValue; /** * TBoundColumn class @@ -62,7 +58,7 @@ class TBoundColumn extends TDataGridColumn * * If not empty, the class will be used to instantiate as a child control in the item cells of the column. * - * If the class implements {@link IDataRenderer}, the Data property + * If the class implements {@link \Prado\IDataRenderer}, the Data property * will be set as the data associated with the datagrid cell during databinding. * The data can be either the whole data row or a field of the row if * {@link getDataField DataField} is not empty. If {@link getDataFormatString DataFormatString} @@ -90,7 +86,7 @@ class TBoundColumn extends TDataGridColumn * * If not empty, the class will be used to instantiate as a child control in the item cell that is in edit mode. * - * If the class implements {@link IDataRenderer}, the Data property + * If the class implements {@link \Prado\IDataRenderer}, the Data property * will be set as the data associated with the datagrid cell during databinding. * The data can be either the whole data row or a field of the row if * {@link getDataField DataField} is not empty. If {@link getDataFormatString DataFormatString} @@ -201,7 +197,7 @@ class TBoundColumn extends TDataGridColumn } else { - $control=Prado::createComponent('System.Web.UI.WebControls.TTextBox'); + $control=Prado::createComponent('\\Prado\\Web\\UI\\WebControls\\TTextBox'); $cell->getControls()->add($control); $cell->registerObject('TextBox',$control); } diff --git a/framework/Web/UI/WebControls/TBulletStyle.php b/framework/Web/UI/WebControls/TBulletStyle.php index 7e88532d..28e8383d 100644 --- a/framework/Web/UI/WebControls/TBulletStyle.php +++ b/framework/Web/UI/WebControls/TBulletStyle.php @@ -20,7 +20,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TBulletStyle extends TEnumerable +class TBulletStyle extends \Prado\TEnumerable { const NotSet='NotSet'; const None='None'; diff --git a/framework/Web/UI/WebControls/TBulletedList.php b/framework/Web/UI/WebControls/TBulletedList.php index eab33909..31df8afd 100644 --- a/framework/Web/UI/WebControls/TBulletedList.php +++ b/framework/Web/UI/WebControls/TBulletedList.php @@ -10,11 +10,8 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TListControl class - */ -Prado::using('System.Web.UI.WebControls.TListControl'); +use Prado\TPropertyValue; +use Prado\Web\THttpUtility; /** * TBulletedList class @@ -37,7 +34,7 @@ Prado::using('System.Web.UI.WebControls.TListControl'); * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TBulletedList extends TListControl implements IPostBackEventHandler +class TBulletedList extends TListControl implements \Prado\Web\UI\IPostBackEventHandler { /** * @var boolean cached property value of Enabled diff --git a/framework/Web/UI/WebControls/TBulletedListDisplayMode.php b/framework/Web/UI/WebControls/TBulletedListDisplayMode.php index 6cd2b2cc..e94fe341 100644 --- a/framework/Web/UI/WebControls/TBulletedListDisplayMode.php +++ b/framework/Web/UI/WebControls/TBulletedListDisplayMode.php @@ -25,7 +25,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TBulletedListDisplayMode extends TEnumerable +class TBulletedListDisplayMode extends \Prado\TEnumerable { const Text='Text'; const HyperLink='HyperLink'; diff --git a/framework/Web/UI/WebControls/TButton.php b/framework/Web/UI/WebControls/TButton.php index ed882654..6591bb76 100644 --- a/framework/Web/UI/WebControls/TButton.php +++ b/framework/Web/UI/WebControls/TButton.php @@ -10,6 +10,8 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Web\UI\TCommandEventParameter; +use Prado\TPropertyValue; /** * TButton class @@ -47,7 +49,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TButton extends TWebControl implements IPostBackEventHandler, IButtonControl, IDataRenderer +class TButton extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\Web\UI\IPostBackEventHandler, \Prado\Web\UI\IButtonControl, \Prado\IDataRenderer { /** * @return string tag name of the button @@ -197,7 +199,7 @@ class TButton extends TWebControl implements IPostBackEventHandler, IButtonContr * The method raises 'OnCommand' event to fire up the event handlers. * If you override this method, be sure to call the parent implementation * so that the event handlers can be invoked. - * @param TCommandEventParameter event parameter to be passed to the event handlers + * @param \Prado\Web\UI\TCommandEventParameter event parameter to be passed to the event handlers */ public function onCommand($param) { @@ -219,7 +221,7 @@ class TButton extends TWebControl implements IPostBackEventHandler, IButtonContr if($this->getCausesValidation()) $this->getPage()->validate($this->getValidationGroup()); $this->onClick(null); - $this->onCommand(new TCommandEventParameter($this->getCommandName(),$this->getCommandParameter())); + $this->onCommand(new \Prado\Web\UI\TCommandEventParameter($this->getCommandName(),$this->getCommandParameter())); } /** @@ -240,7 +242,7 @@ class TButton extends TWebControl implements IPostBackEventHandler, IButtonContr /** * Returns the caption of the button. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link getText()}. * @return string caption of the button. * @see getText @@ -253,7 +255,7 @@ class TButton extends TWebControl implements IPostBackEventHandler, IButtonContr /** * Sets the caption of the button. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link setText()}. * @param string caption of the button * @see setText diff --git a/framework/Web/UI/WebControls/TButtonColumn.php b/framework/Web/UI/WebControls/TButtonColumn.php index bfb74317..54f52a01 100644 --- a/framework/Web/UI/WebControls/TButtonColumn.php +++ b/framework/Web/UI/WebControls/TButtonColumn.php @@ -10,14 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * TDataGridColumn class file - */ -Prado::using('System.Web.UI.WebControls.TDataGridColumn'); -Prado::using('System.Web.UI.WebControls.TButton'); -Prado::using('System.Web.UI.WebControls.TLinkButton'); -Prado::using('System.Web.UI.WebControls.TImageButton'); +use Prado\TPropertyValue; /** * TButtonColumn class @@ -259,7 +252,7 @@ class TButtonColumn extends TDataGridColumn */ public function dataBindColumn($sender,$param) { - if($sender instanceof IButtonControl) + if($sender instanceof \Prado\Web\UI\IButtonControl) { if(($field=$this->getDataTextField())!=='') { diff --git a/framework/Web/UI/WebControls/TButtonColumnType.php b/framework/Web/UI/WebControls/TButtonColumnType.php index 5718204c..273a4747 100644 --- a/framework/Web/UI/WebControls/TButtonColumnType.php +++ b/framework/Web/UI/WebControls/TButtonColumnType.php @@ -25,7 +25,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TButtonColumnType extends TEnumerable +class TButtonColumnType extends \Prado\TEnumerable { const LinkButton='LinkButton'; const PushButton='PushButton'; diff --git a/framework/Web/UI/WebControls/TButtonType.php b/framework/Web/UI/WebControls/TButtonType.php index bd28b2e4..f46594f2 100644 --- a/framework/Web/UI/WebControls/TButtonType.php +++ b/framework/Web/UI/WebControls/TButtonType.php @@ -24,7 +24,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TButtonType extends TEnumerable +class TButtonType extends \Prado\TEnumerable { const Submit='Submit'; const Reset='Reset'; diff --git a/framework/Web/UI/WebControls/TCaptcha.php b/framework/Web/UI/WebControls/TCaptcha.php index 7f9bc662..33ab6b9b 100644 --- a/framework/Web/UI/WebControls/TCaptcha.php +++ b/framework/Web/UI/WebControls/TCaptcha.php @@ -10,8 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -Prado::using('System.Web.UI.WebControls.TImage'); +use Prado\TPropertyValue; /** * TCaptcha class. diff --git a/framework/Web/UI/WebControls/TCaptchaValidator.php b/framework/Web/UI/WebControls/TCaptchaValidator.php index f5a55ee4..e2c44f9b 100644 --- a/framework/Web/UI/WebControls/TCaptchaValidator.php +++ b/framework/Web/UI/WebControls/TCaptchaValidator.php @@ -10,9 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -Prado::using('System.Web.UI.WebControls.TBaseValidator'); -Prado::using('System.Web.UI.WebControls.TCaptcha'); +use Prado\TPropertyValue; /** * TCaptchaValidator class diff --git a/framework/Web/UI/WebControls/TCheckBox.php b/framework/Web/UI/WebControls/TCheckBox.php index feefd016..f9f451c3 100644 --- a/framework/Web/UI/WebControls/TCheckBox.php +++ b/framework/Web/UI/WebControls/TCheckBox.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TCheckBox class @@ -40,7 +41,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TCheckBox extends TWebControl implements IPostBackDataHandler, IValidatable, IDataRenderer, ISurroundable +class TCheckBox extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\Web\UI\IPostBackDataHandler, \Prado\Web\UI\IValidatable, \Prado\IDataRenderer, \Prado\Web\UI\ISurroundable { private $_dataChanged=false; private $_isValid=true; @@ -109,7 +110,7 @@ class TCheckBox extends TWebControl implements IPostBackDataHandler, IValidatabl /** * Returns a value indicating whether postback has caused the control data change. - * This method is required by the IPostBackDataHandler interface. + * This method is required by the \Prado\Web\UI\IPostBackDataHandler interface. * @return boolean whether postback has caused the control data change. False if the page is not in postback mode. */ public function getDataChanged() @@ -211,7 +212,7 @@ class TCheckBox extends TWebControl implements IPostBackDataHandler, IValidatabl /** * Returns the value indicating whether the checkbox is checked. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link getChecked()}. * @return boolean whether the checkbox is checked. * @see getChecked @@ -224,7 +225,7 @@ class TCheckBox extends TWebControl implements IPostBackDataHandler, IValidatabl /** * Sets the value indicating whether the checkbox is to be checked or not. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link setChecked()}. * @param boolean whether the checkbox is to be checked * @see setChecked diff --git a/framework/Web/UI/WebControls/TCheckBoxColumn.php b/framework/Web/UI/WebControls/TCheckBoxColumn.php index 27f75e21..3b9794e3 100644 --- a/framework/Web/UI/WebControls/TCheckBoxColumn.php +++ b/framework/Web/UI/WebControls/TCheckBoxColumn.php @@ -10,15 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * TDataGridColumn class file - */ -Prado::using('System.Web.UI.WebControls.TDataGridColumn'); -/** - * TCheckBox class file - */ -Prado::using('System.Web.UI.WebControls.TCheckBox'); +use Prado\TPropertyValue; /** * TCheckBoxColumn class diff --git a/framework/Web/UI/WebControls/TCheckBoxList.php b/framework/Web/UI/WebControls/TCheckBoxList.php index 64464c83..d680ec77 100644 --- a/framework/Web/UI/WebControls/TCheckBoxList.php +++ b/framework/Web/UI/WebControls/TCheckBoxList.php @@ -10,19 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TListControl class - */ -Prado::using('System.Web.UI.WebControls.TListControl'); -/** - * Includes TRepeatInfo class - */ -Prado::using('System.Web.UI.WebControls.TRepeatInfo'); -/** - * Includes TCheckBox class - */ -Prado::using('System.Web.UI.WebControls.TCheckBox'); +use Prado\TPropertyValue; /** * TCheckBoxList class @@ -47,7 +35,7 @@ Prado::using('System.Web.UI.WebControls.TCheckBox'); * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TCheckBoxList extends TListControl implements IRepeatInfoUser, INamingContainer, IPostBackDataHandler, IValidatable +class TCheckBoxList extends TListControl implements IRepeatInfoUser, \Prado\Web\UI\INamingContainer, \Prado\Web\UI\IPostBackDataHandler, \Prado\Web\UI\IValidatable { private $_repeatedControl; private $_isEnabled; @@ -355,7 +343,7 @@ class TCheckBoxList extends TListControl implements IRepeatInfoUser, INamingCont /** * Raises postdata changed event. - * This method is required by {@link IPostBackDataHandler} interface. + * This method is required by {@link \Prado\Web\UI\IPostBackDataHandler} interface. * It is invoked by the framework when {@link getSelectedIndices SelectedIndices} property * is changed on postback. * This method is primarly used by framework developers. @@ -440,7 +428,7 @@ class TCheckBoxList extends TListControl implements IRepeatInfoUser, INamingCont /** * Returns a value indicating whether postback has caused the control data change. - * This method is required by the IPostBackDataHandler interface. + * This method is required by the \Prado\Web\UI\IPostBackDataHandler interface. * @return boolean whether postback has caused the control data change. False if the page is not in postback mode. */ public function getDataChanged() @@ -450,7 +438,7 @@ class TCheckBoxList extends TListControl implements IRepeatInfoUser, INamingCont /** * Returns the value to be validated. - * This methid is required by IValidatable interface. + * This methid is required by \Prado\Web\UI\IValidatable interface. * @return mixed the value of the property to be validated. */ public function getValidationPropertyValue() diff --git a/framework/Web/UI/WebControls/TCircleHotSpot.php b/framework/Web/UI/WebControls/TCircleHotSpot.php index 6e48ac4f..ae5804b0 100644 --- a/framework/Web/UI/WebControls/TCircleHotSpot.php +++ b/framework/Web/UI/WebControls/TCircleHotSpot.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * Class TCircleHotSpot. diff --git a/framework/Web/UI/WebControls/TClientScript.php b/framework/Web/UI/WebControls/TClientScript.php index f0699580..39f15782 100644 --- a/framework/Web/UI/WebControls/TClientScript.php +++ b/framework/Web/UI/WebControls/TClientScript.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TClientScript class @@ -44,7 +45,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TClientScript extends TControl +class TClientScript extends \Prado\Web\UI\TControl { /** * @return string comma delimited list of javascript libraries to included diff --git a/framework/Web/UI/WebControls/TColorPicker.php b/framework/Web/UI/WebControls/TColorPicker.php index 6181cd97..e114630f 100644 --- a/framework/Web/UI/WebControls/TColorPicker.php +++ b/framework/Web/UI/WebControls/TColorPicker.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TColorPicker class. diff --git a/framework/Web/UI/WebControls/TColorPickerMode.php b/framework/Web/UI/WebControls/TColorPickerMode.php index 88ab4df0..5930f149 100644 --- a/framework/Web/UI/WebControls/TColorPickerMode.php +++ b/framework/Web/UI/WebControls/TColorPickerMode.php @@ -25,7 +25,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TColorPickerMode extends TEnumerable +class TColorPickerMode extends \Prado\TEnumerable { const Simple='Simple'; const Basic='Basic'; diff --git a/framework/Web/UI/WebControls/TCompareValidator.php b/framework/Web/UI/WebControls/TCompareValidator.php index 3ba76a5f..a62ab5d1 100644 --- a/framework/Web/UI/WebControls/TCompareValidator.php +++ b/framework/Web/UI/WebControls/TCompareValidator.php @@ -10,11 +10,8 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Using TBaseValidator class - */ -Prado::using('System.Web.UI.WebControls.TBaseValidator'); +use Prado\TPropertyValue; +use Prado\Exceptions\TInvalidDataValueException; /** * TCompareValidator class @@ -202,7 +199,7 @@ class TCompareValidator extends TBaseValidator $dateFormat = $this->getDateFormat(); if($dateFormat!=='') { - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter', $dateFormat); + $formatter = Prado::createComponent('\\Prado\\Util\\TSimpleDateFormatter', $dateFormat); return array($formatter->parse($value1), $formatter->parse($value2)); } else diff --git a/framework/Web/UI/WebControls/TConditional.php b/framework/Web/UI/WebControls/TConditional.php index f8d6a7ec..1a88c0a7 100644 --- a/framework/Web/UI/WebControls/TConditional.php +++ b/framework/Web/UI/WebControls/TConditional.php @@ -10,6 +10,8 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; +use Prado\Exceptions\TInvalidDataValueException; /** * TConditional class. @@ -43,7 +45,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.1.1 */ -class TConditional extends TControl +class TConditional extends \Prado\Web\UI\TControl { private $_condition='true'; private $_trueTemplate; @@ -76,7 +78,7 @@ class TConditional extends TControl { $result=$this->getTemplateControl()->evaluateExpression($this->_condition); } - catch(Exception $e) + catch(\Exception $e) { throw new TInvalidDataValueException('conditional_condition_invalid',$this->_condition,$e->getMessage()); } diff --git a/framework/Web/UI/WebControls/TContent.php b/framework/Web/UI/WebControls/TContent.php index 40eb988e..e75b6b81 100644 --- a/framework/Web/UI/WebControls/TContent.php +++ b/framework/Web/UI/WebControls/TContent.php @@ -10,6 +10,8 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Web\UI\TControl; +use Prado\Web\UI\INamingContainer; /** * TContent class @@ -29,7 +31,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TContent extends TControl implements INamingContainer +class TContent extends \Prado\Web\UI\TControl implements \Prado\Web\UI\INamingContainer { /** * This method is invoked after the control is instantiated on a template. diff --git a/framework/Web/UI/WebControls/TContentDirection.php b/framework/Web/UI/WebControls/TContentDirection.php index 5e5254f7..8c83d32e 100644 --- a/framework/Web/UI/WebControls/TContentDirection.php +++ b/framework/Web/UI/WebControls/TContentDirection.php @@ -24,7 +24,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TContentDirection extends TEnumerable +class TContentDirection extends \Prado\TEnumerable { const NotSet='NotSet'; const LeftToRight='LeftToRight'; diff --git a/framework/Web/UI/WebControls/TContentPlaceHolder.php b/framework/Web/UI/WebControls/TContentPlaceHolder.php index b5e53279..380a33fd 100644 --- a/framework/Web/UI/WebControls/TContentPlaceHolder.php +++ b/framework/Web/UI/WebControls/TContentPlaceHolder.php @@ -28,7 +28,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TContentPlaceHolder extends TControl +class TContentPlaceHolder extends \Prado\Web\UI\TControl { /** * This method is invoked after the control is instantiated on a template. diff --git a/framework/Web/UI/WebControls/TCustomValidator.php b/framework/Web/UI/WebControls/TCustomValidator.php index d5f172ff..b02d8f70 100644 --- a/framework/Web/UI/WebControls/TCustomValidator.php +++ b/framework/Web/UI/WebControls/TCustomValidator.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Using TBaseValidator class - */ -Prado::using('System.Web.UI.WebControls.TBaseValidator'); +use Prado\Exceptions\TInvalidDataTypeException; /** * TCustomValidator class diff --git a/framework/Web/UI/WebControls/TDataBoundControl.php b/framework/Web/UI/WebControls/TDataBoundControl.php index a694f47d..bf3778cf 100644 --- a/framework/Web/UI/WebControls/TDataBoundControl.php +++ b/framework/Web/UI/WebControls/TDataBoundControl.php @@ -10,10 +10,11 @@ */ namespace Prado\Web\UI\WebControls; - -Prado::using('System.Web.UI.WebControls.TDataSourceControl'); -Prado::using('System.Web.UI.WebControls.TDataSourceView'); -Prado::using('System.Collections.TPagedDataSource'); +use Prado\TPropertyValue; +use Prado\Exceptions\TInvalidDataValueException; +use Prado\Exceptions\TInvalidDataTypeException; +use Prado\Collections\TList; +use Prado\Collections\TMap; /** * TDataBoundControl class. @@ -43,7 +44,7 @@ Prado::using('System.Collections.TPagedDataSource'); * @package Prado\Web\UI\WebControls * @since 3.0 */ -abstract class TDataBoundControl extends TWebControl +abstract class TDataBoundControl extends \Prado\Web\UI\WebControls\TWebControl { private $_initialized=false; private $_dataSource=null; @@ -334,7 +335,7 @@ abstract class TDataBoundControl extends TWebControl else $data=null; - if($data instanceof Traversable) + if($data instanceof \Traversable) { if($this->getAllowPaging()) { @@ -486,7 +487,7 @@ abstract class TDataBoundControl extends TWebControl // read array from TDbDataReader since it's forward-only stream and can only be traversed once return $value->readAll(); } - else if(($value instanceof Traversable) || $value===null) + else if(($value instanceof \Traversable) || $value===null) return $value; else throw new TInvalidDataTypeException('databoundcontrol_datasource_invalid',get_class($this)); diff --git a/framework/Web/UI/WebControls/TDataGrid.php b/framework/Web/UI/WebControls/TDataGrid.php index 3b609732..56bb5fa2 100644 --- a/framework/Web/UI/WebControls/TDataGrid.php +++ b/framework/Web/UI/WebControls/TDataGrid.php @@ -15,16 +15,8 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TBaseList, TPagedDataSource, TDummyDataSource and TTable classes - */ -Prado::using('System.Web.UI.WebControls.TBaseDataList'); -Prado::using('System.Collections.TPagedDataSource'); -Prado::using('System.Collections.TDummyDataSource'); -Prado::using('System.Web.UI.WebControls.TTable'); -Prado::using('System.Web.UI.WebControls.TPanel'); -Prado::using('System.Web.UI.WebControls.TDataGridPagerStyle'); +use Prado\TPropertyValue; +use Prado\Exceptions\TInvalidDataTypeException; /** * TDataGrid class @@ -149,7 +141,7 @@ Prado::using('System.Web.UI.WebControls.TDataGridPagerStyle'); * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TDataGrid extends TBaseDataList implements INamingContainer +class TDataGrid extends TBaseDataList implements \Prado\Web\UI\INamingContainer { /** * datagrid item types @@ -1139,7 +1131,7 @@ class TDataGrid extends TBaseDataList implements INamingContainer $controls=$cell->getControls(); foreach($controls as $control) { - if($control instanceof IDataRenderer) + if($control instanceof \Prado\IDataRenderer) return $control->getData(); } } diff --git a/framework/Web/UI/WebControls/TDataGridColumn.php b/framework/Web/UI/WebControls/TDataGridColumn.php index 3325b97c..0617782b 100644 --- a/framework/Web/UI/WebControls/TDataGridColumn.php +++ b/framework/Web/UI/WebControls/TDataGridColumn.php @@ -10,9 +10,8 @@ */ namespace Prado\Web\UI\WebControls; - -Prado::using('System.Util.TDataFieldAccessor'); -Prado::using('System.Web.UI.WebControls.TDataGrid'); +use Prado\TPropertyValue; +use Prado\Exceptions\TInvalidDataValueException; /** * TDataGridColumn class @@ -43,8 +42,8 @@ Prado::using('System.Web.UI.WebControls.TDataGrid'); * column will be grouped into one cell. * Note, there are some limitations to cell grouping. We determine the cell content according to * the cell's {@link TTableCell::getText Text} property. If the text is empty and the cell has - * some child controls, we will pick up the first control who implements {@link IDataRenderer} - * and obtain its {@link IDataRenderer::getData Data} property. + * some child controls, we will pick up the first control who implements {@link \Prado\IDataRenderer} + * and obtain its {@link \Prado\IDataRenderer::getData Data} property. * * The following datagrid column types are provided by the framework currently, * - {@link TBoundColumn}, associated with a specific field in datasource and displays the corresponding data. @@ -135,7 +134,7 @@ abstract class TDataGridColumn extends \Prado\TApplicationComponent * Sets the column header cell renderer class. * * If not empty, the class will be used to instantiate as a child control in the column header cell. - * If the class implements {@link IDataRenderer}, the Data property + * If the class implements {@link \Prado\IDataRenderer}, the Data property * will be set as the {@link getFooterText FooterText}. * * @param string the renderer class name in namespace format. @@ -189,7 +188,7 @@ abstract class TDataGridColumn extends \Prado\TApplicationComponent * Sets the column footer cell renderer class. * * If not empty, the class will be used to instantiate as a child control in the column footer cell. - * If the class implements {@link IDataRenderer}, the Data property + * If the class implements {@link \Prado\IDataRenderer}, the Data property * will be set as the {@link getFooterText FooterText}. * * @param string the renderer class name in namespace format. @@ -419,7 +418,7 @@ abstract class TDataGridColumn extends \Prado\TApplicationComponent { $control=Prado::createComponent($classPath); $cell->getControls()->add($control); - if($control instanceof IDataRenderer) + if($control instanceof \Prado\IDataRenderer) { if($control instanceof IItemDataRenderer) { @@ -435,7 +434,7 @@ abstract class TDataGridColumn extends \Prado\TApplicationComponent $sortExpression=$this->getSortExpression(); if(($url=$this->getHeaderImageUrl())!=='') { - $button=Prado::createComponent('System.Web.UI.WebControls.TImageButton'); + $button=Prado::createComponent('\\Prado\\Web\\UI\\WebControls\\TImageButton'); $button->setImageUrl($url); $button->setCommandName(TDataGrid::CMD_SORT); $button->setCommandParameter($sortExpression); @@ -446,7 +445,7 @@ abstract class TDataGridColumn extends \Prado\TApplicationComponent } else if($text!=='') { - $button=Prado::createComponent('System.Web.UI.WebControls.TLinkButton'); + $button=Prado::createComponent('\\Prado\\Web\\UI\\WebControls\\TLinkButton'); $button->setText($text); $button->setCommandName(TDataGrid::CMD_SORT); $button->setCommandParameter($sortExpression); @@ -460,7 +459,7 @@ abstract class TDataGridColumn extends \Prado\TApplicationComponent { if(($url=$this->getHeaderImageUrl())!=='') { - $image=Prado::createComponent('System.Web.UI.WebControls.TImage'); + $image=Prado::createComponent('\\Prado\\Web\\UI\\WebControls\\TImage'); $image->setImageUrl($url); if($text!=='') $image->setAlternateText($text); @@ -490,7 +489,7 @@ abstract class TDataGridColumn extends \Prado\TApplicationComponent { $control=Prado::createComponent($classPath); $cell->getControls()->add($control); - if($control instanceof IDataRenderer) + if($control instanceof \Prado\IDataRenderer) { if($control instanceof IItemDataRenderer) { diff --git a/framework/Web/UI/WebControls/TDataGridColumnCollection.php b/framework/Web/UI/WebControls/TDataGridColumnCollection.php index b798641d..e38bfef0 100644 --- a/framework/Web/UI/WebControls/TDataGridColumnCollection.php +++ b/framework/Web/UI/WebControls/TDataGridColumnCollection.php @@ -15,6 +15,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Exceptions\TInvalidDataTypeException; /** * TDataGridColumnCollection class. @@ -25,7 +26,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TDataGridColumnCollection extends TList +class TDataGridColumnCollection extends \Prado\Collections\TList { /** * the control that owns this collection. diff --git a/framework/Web/UI/WebControls/TDataGridCommandEventParameter.php b/framework/Web/UI/WebControls/TDataGridCommandEventParameter.php index 7f297db7..854799ae 100644 --- a/framework/Web/UI/WebControls/TDataGridCommandEventParameter.php +++ b/framework/Web/UI/WebControls/TDataGridCommandEventParameter.php @@ -30,7 +30,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TDataGridCommandEventParameter extends TCommandEventParameter +class TDataGridCommandEventParameter extends \Prado\Web\UI\TCommandEventParameter { /** * @var TDataGridItem the TDataGridItem control responsible for the event. @@ -45,9 +45,9 @@ class TDataGridCommandEventParameter extends TCommandEventParameter * Constructor. * @param TDataGridItem datagrid item responsible for the event * @param TControl original event sender - * @param TCommandEventParameter original event parameter + * @param \Prado\Web\UI\TCommandEventParameter original event parameter */ - public function __construct($item,$source,TCommandEventParameter $param) + public function __construct($item,$source,\Prado\Web\UI\TCommandEventParameter $param) { $this->_item=$item; $this->_source=$source; diff --git a/framework/Web/UI/WebControls/TDataGridItem.php b/framework/Web/UI/WebControls/TDataGridItem.php index c55bc723..ee645138 100644 --- a/framework/Web/UI/WebControls/TDataGridItem.php +++ b/framework/Web/UI/WebControls/TDataGridItem.php @@ -15,6 +15,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TDataGridItem class @@ -30,7 +31,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TDataGridItem extends TTableRow implements INamingContainer +class TDataGridItem extends TTableRow implements \Prado\Web\UI\INamingContainer { /** * @var integer index of the data item in the Items collection of datagrid @@ -146,7 +147,7 @@ class TDataGridItem extends TTableRow implements INamingContainer */ public function bubbleEvent($sender,$param) { - if($param instanceof TCommandEventParameter) + if($param instanceof \Prado\Web\UI\TCommandEventParameter) { $this->raiseBubbleEvent($this,new TDataGridCommandEventParameter($this,$sender,$param)); return true; diff --git a/framework/Web/UI/WebControls/TDataGridItemCollection.php b/framework/Web/UI/WebControls/TDataGridItemCollection.php index 33ce12dc..7495dfad 100644 --- a/framework/Web/UI/WebControls/TDataGridItemCollection.php +++ b/framework/Web/UI/WebControls/TDataGridItemCollection.php @@ -15,6 +15,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Exceptions\TInvalidDataTypeException; /** * TDataGridItemCollection class. @@ -25,7 +26,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TDataGridItemCollection extends TList +class TDataGridItemCollection extends \Prado\Collections\TList { /** * Inserts an item at the specified position. diff --git a/framework/Web/UI/WebControls/TDataGridItemRenderer.php b/framework/Web/UI/WebControls/TDataGridItemRenderer.php index 6b11e890..fab2a2fc 100644 --- a/framework/Web/UI/WebControls/TDataGridItemRenderer.php +++ b/framework/Web/UI/WebControls/TDataGridItemRenderer.php @@ -11,9 +11,6 @@ namespace Prado\Web\UI\WebControls; -Prado::using('System.Web.UI.WebControls.TDataGrid'); -Prado::using('System.Web.UI.WebControls.TItemDataRenderer'); - /** * TDataGridItemRenderer class * diff --git a/framework/Web/UI/WebControls/TDataGridPager.php b/framework/Web/UI/WebControls/TDataGridPager.php index aaf44f82..d06cec1d 100644 --- a/framework/Web/UI/WebControls/TDataGridPager.php +++ b/framework/Web/UI/WebControls/TDataGridPager.php @@ -25,7 +25,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TDataGridPager extends TPanel implements INamingContainer +class TDataGridPager extends TPanel implements \Prado\Web\UI\INamingContainer { private $_dataGrid; @@ -47,7 +47,7 @@ class TDataGridPager extends TPanel implements INamingContainer */ public function bubbleEvent($sender,$param) { - if($param instanceof TCommandEventParameter) + if($param instanceof \Prado\Web\UI\TCommandEventParameter) { $this->raiseBubbleEvent($this,new TDataGridCommandEventParameter($this,$sender,$param)); return true; diff --git a/framework/Web/UI/WebControls/TDataGridPagerButtonType.php b/framework/Web/UI/WebControls/TDataGridPagerButtonType.php index 8a03955f..bd13141a 100644 --- a/framework/Web/UI/WebControls/TDataGridPagerButtonType.php +++ b/framework/Web/UI/WebControls/TDataGridPagerButtonType.php @@ -28,7 +28,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TDataGridPagerButtonType extends TEnumerable +class TDataGridPagerButtonType extends \Prado\TEnumerable { const LinkButton='LinkButton'; const PushButton='PushButton'; diff --git a/framework/Web/UI/WebControls/TDataGridPagerMode.php b/framework/Web/UI/WebControls/TDataGridPagerMode.php index fdaf830d..b30f0adf 100644 --- a/framework/Web/UI/WebControls/TDataGridPagerMode.php +++ b/framework/Web/UI/WebControls/TDataGridPagerMode.php @@ -28,7 +28,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TDataGridPagerMode extends TEnumerable +class TDataGridPagerMode extends \Prado\TEnumerable { const NextPrev='NextPrev'; const Numeric='Numeric'; diff --git a/framework/Web/UI/WebControls/TDataGridPagerPosition.php b/framework/Web/UI/WebControls/TDataGridPagerPosition.php index 888d76d4..f40ccc1e 100644 --- a/framework/Web/UI/WebControls/TDataGridPagerPosition.php +++ b/framework/Web/UI/WebControls/TDataGridPagerPosition.php @@ -29,7 +29,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TDataGridPagerPosition extends TEnumerable +class TDataGridPagerPosition extends \Prado\TEnumerable { const Bottom='Bottom'; const Top='Top'; diff --git a/framework/Web/UI/WebControls/TDataGridPagerStyle.php b/framework/Web/UI/WebControls/TDataGridPagerStyle.php index f9bb72d3..8164ff86 100644 --- a/framework/Web/UI/WebControls/TDataGridPagerStyle.php +++ b/framework/Web/UI/WebControls/TDataGridPagerStyle.php @@ -10,8 +10,8 @@ */ namespace Prado\Web\UI\WebControls; - -Prado::using('System.Web.UI.WebControls.TDataGrid'); +use Prado\TPropertyValue; +use Prado\Exceptions\TInvalidDataValueException; /** * TDataGridPagerStyle class. diff --git a/framework/Web/UI/WebControls/TDataList.php b/framework/Web/UI/WebControls/TDataList.php index ce2e64a6..1b1a3bfd 100644 --- a/framework/Web/UI/WebControls/TDataList.php +++ b/framework/Web/UI/WebControls/TDataList.php @@ -10,15 +10,9 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TBaseDataList class - */ -Prado::using('System.Web.UI.WebControls.TBaseDataList'); -/** - * Includes TRepeatInfo class - */ -Prado::using('System.Web.UI.WebControls.TRepeatInfo'); +use Prado\TPropertyValue; +use Prado\Exceptions\TInvalidDataValueException; +use Prado\Exceptions\TInvalidDataTypeException; /** * TDataList class @@ -45,7 +39,7 @@ Prado::using('System.Web.UI.WebControls.TRepeatInfo'); * as an external template (in fact, it can also be non-templated controls). * * A renderer can be any control class. - * - If the class implements {@link IDataRenderer}, the Data + * - If the class implements {@link \Prado\IDataRenderer}, the Data * property will be set as the data row during databinding. Many PRADO controls * implement this interface, such as {@link TLabel}, {@link TTextBox}, etc. * - If the class implements {@link IItemDataRenderer}, the ItemIndex property will be set @@ -150,7 +144,7 @@ Prado::using('System.Web.UI.WebControls.TRepeatInfo'); * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TDataList extends TBaseDataList implements INamingContainer, IRepeatInfoUser +class TDataList extends TBaseDataList implements \Prado\Web\UI\INamingContainer, IRepeatInfoUser { /** * Command name that TDataList understands. They are case-insensitive. @@ -1161,7 +1155,7 @@ class TDataList extends TBaseDataList implements INamingContainer, IRepeatInfoUs if(($item=$this->createItem($itemIndex,$itemType))!==null) { $param=new TDataListItemEventParameter($item); - if($item instanceof IDataRenderer) + if($item instanceof \Prado\IDataRenderer) $item->setData($dataItem); $this->onItemCreated($param); $this->getControls()->add($item); diff --git a/framework/Web/UI/WebControls/TDataListCommandEventParameter.php b/framework/Web/UI/WebControls/TDataListCommandEventParameter.php index be377f14..9c308521 100644 --- a/framework/Web/UI/WebControls/TDataListCommandEventParameter.php +++ b/framework/Web/UI/WebControls/TDataListCommandEventParameter.php @@ -25,7 +25,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TDataListCommandEventParameter extends TCommandEventParameter +class TDataListCommandEventParameter extends \Prado\Web\UI\TCommandEventParameter { /** * @var TControl the datalist item control responsible for the event. @@ -40,9 +40,9 @@ class TDataListCommandEventParameter extends TCommandEventParameter * Constructor. * @param TControl datalist item responsible for the event * @param TControl original event sender - * @param TCommandEventParameter original event parameter + * @param \Prado\Web\UI\TCommandEventParameter original event parameter */ - public function __construct($item,$source,TCommandEventParameter $param) + public function __construct($item,$source,\Prado\Web\UI\TCommandEventParameter $param) { $this->_item=$item; $this->_source=$source; diff --git a/framework/Web/UI/WebControls/TDataListItem.php b/framework/Web/UI/WebControls/TDataListItem.php index bc0eb3a3..ba28ee86 100644 --- a/framework/Web/UI/WebControls/TDataListItem.php +++ b/framework/Web/UI/WebControls/TDataListItem.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TDataListItem class @@ -24,7 +25,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TDataListItem extends TWebControl implements INamingContainer, IItemDataRenderer +class TDataListItem extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\Web\UI\INamingContainer, IItemDataRenderer { /** * index of the data item in the Items collection of DataList @@ -151,7 +152,7 @@ class TDataListItem extends TWebControl implements INamingContainer, IItemDataRe */ public function bubbleEvent($sender,$param) { - if($param instanceof TCommandEventParameter) + if($param instanceof \Prado\Web\UI\TCommandEventParameter) { $this->raiseBubbleEvent($this,new TDataListCommandEventParameter($this,$sender,$param)); return true; diff --git a/framework/Web/UI/WebControls/TDataListItemCollection.php b/framework/Web/UI/WebControls/TDataListItemCollection.php index 5e6997c7..3015e5e7 100644 --- a/framework/Web/UI/WebControls/TDataListItemCollection.php +++ b/framework/Web/UI/WebControls/TDataListItemCollection.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Exceptions\TInvalidDataTypeException; /** * TDataListItemCollection class. @@ -20,7 +21,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TDataListItemCollection extends TList +class TDataListItemCollection extends \Prado\Collections\TList { /** * Inserts an item at the specified position. diff --git a/framework/Web/UI/WebControls/TDataListItemRenderer.php b/framework/Web/UI/WebControls/TDataListItemRenderer.php index fda43076..578b4715 100644 --- a/framework/Web/UI/WebControls/TDataListItemRenderer.php +++ b/framework/Web/UI/WebControls/TDataListItemRenderer.php @@ -11,9 +11,6 @@ namespace Prado\Web\UI\WebControls; -Prado::using('System.Web.UI.WebControls.TDataList'); -Prado::using('System.Web.UI.WebControls.TItemDataRenderer'); - /** * TDataListItemRenderer class * @@ -82,7 +79,7 @@ class TDataListItemRenderer extends TItemDataRenderer implements IStyleable */ public function bubbleEvent($sender,$param) { - if($param instanceof TCommandEventParameter) + if($param instanceof \Prado\Web\UI\TCommandEventParameter) { $this->raiseBubbleEvent($this,new TDataListCommandEventParameter($this,$sender,$param)); return true; diff --git a/framework/Web/UI/WebControls/TDataRenderer.php b/framework/Web/UI/WebControls/TDataRenderer.php index 4174e22d..32c10d8a 100644 --- a/framework/Web/UI/WebControls/TDataRenderer.php +++ b/framework/Web/UI/WebControls/TDataRenderer.php @@ -17,7 +17,7 @@ namespace Prado\Web\UI\WebControls; * * TDataRenderer is the convenient base class for template-based renderer controls. * It extends {@link TTemplateControl} and implements the methods required - * by the {@link IDataRenderer} interface. + * by the {@link \Prado\IDataRenderer} interface. * * The following property is provided by TDataRenderer: * - {@link getData Data}: data associated with this renderer. @@ -26,7 +26,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.1.2 */ -abstract class TDataRenderer extends TTemplateControl implements IDataRenderer +abstract class TDataRenderer extends TTemplateControl implements \Prado\IDataRenderer { /** * @var mixed data associated with this renderer diff --git a/framework/Web/UI/WebControls/TDataSourceControl.php b/framework/Web/UI/WebControls/TDataSourceControl.php index 458f6b54..e4a405c2 100644 --- a/framework/Web/UI/WebControls/TDataSourceControl.php +++ b/framework/Web/UI/WebControls/TDataSourceControl.php @@ -18,7 +18,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -abstract class TDataSourceControl extends TControl implements IDataSource +abstract class TDataSourceControl extends \Prado\Web\UI\TControl implements IDataSource { public function getView($viewName) { diff --git a/framework/Web/UI/WebControls/TDataSourceSelectParameters.php b/framework/Web/UI/WebControls/TDataSourceSelectParameters.php index 2c4a6d3e..abc2b18a 100644 --- a/framework/Web/UI/WebControls/TDataSourceSelectParameters.php +++ b/framework/Web/UI/WebControls/TDataSourceSelectParameters.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TDataSourceSelectParameters class diff --git a/framework/Web/UI/WebControls/TDataTypeValidator.php b/framework/Web/UI/WebControls/TDataTypeValidator.php index 9707905b..4ff2f89b 100644 --- a/framework/Web/UI/WebControls/TDataTypeValidator.php +++ b/framework/Web/UI/WebControls/TDataTypeValidator.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Using TBaseValidator class - */ -Prado::using('System.Web.UI.WebControls.TBaseValidator'); +use Prado\TPropertyValue; /** * TDataTypeValidator class @@ -101,7 +97,7 @@ class TDataTypeValidator extends TBaseValidator $dateFormat = $this->getDateFormat(); if(strlen($dateFormat)) { - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter',$dateFormat); + $formatter = Prado::createComponent('\\Prado\\Util\\TSimpleDateFormatter',$dateFormat); return $formatter->isValidDate($value); } else diff --git a/framework/Web/UI/WebControls/TDatePicker.php b/framework/Web/UI/WebControls/TDatePicker.php index f24d760f..a1a2b19d 100644 --- a/framework/Web/UI/WebControls/TDatePicker.php +++ b/framework/Web/UI/WebControls/TDatePicker.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TTextBox class - */ -Prado::using('System.Web.UI.WebControls.TTextBox'); +use Prado\TPropertyValue; /** * @@ -315,14 +311,14 @@ class TDatePicker extends TTextBox else { $date = TPropertyValue::ensureFloat($value); - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter',$this->getDateFormat()); + $formatter = Prado::createComponent('\\Prado\\Util\\TSimpleDateFormatter',$this->getDateFormat()); $this->setText($formatter->format($date)); } } /** * Returns the timestamp selected by the user. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link getTimeStamp()}. * @return integer the timestamp of the TDatePicker control. * @see getTimeStamp @@ -335,7 +331,7 @@ class TDatePicker extends TTextBox /** * Sets the timestamp represented by this control. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link setTimeStamp()}. * @param integer the timestamp of the TDatePicker control. * @see setTimeStamp @@ -389,7 +385,7 @@ class TDatePicker extends TTextBox /** * Returns the value to be validated. - * This methid is required by IValidatable interface. + * This methid is required by \Prado\Web\UI\IValidatable interface. * @return integer the interger timestamp if valid, otherwise the original text. */ public function getValidationPropertyValue() @@ -506,7 +502,7 @@ class TDatePicker extends TTextBox $pattern = $this->getDateFormat(); $pattern = str_replace(array('MMMM', 'MMM'), array('MM','MM'), $pattern); - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter', $pattern); + $formatter = Prado::createComponent('\\Prado\\Util\\TSimpleDateFormatter', $pattern); return $formatter->format($date); } @@ -579,7 +575,6 @@ class TDatePicker extends TTextBox { //expensive operations $culture = $this->getCurrentCulture(); - Prado::using('System.I18N.core.DateTimeFormatInfo'); $info = Prado::createComponent('System.I18N.core.CultureInfo', $culture); return $info->getDateTimeFormat(); } @@ -618,7 +613,7 @@ class TDatePicker extends TTextBox protected function hasDayPattern() { - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter', + $formatter = Prado::createComponent('\\Prado\\Util\\TSimpleDateFormatter', $this->getDateFormat()); return ($formatter->getDayPattern()!==null); } @@ -630,7 +625,7 @@ class TDatePicker extends TTextBox */ protected function renderCalendarSelections($writer, $date) { - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter', + $formatter = Prado::createComponent('\\Prado\\Util\\TSimpleDateFormatter', $this->getDateFormat()); foreach($formatter->getDayMonthYearOrdering() as $type) @@ -652,7 +647,7 @@ class TDatePicker extends TTextBox { $pattern = $this->getDateFormat(); $pattern = str_replace(array('MMMM', 'MMM'), array('MM','MM'), $pattern); - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter',$pattern); + $formatter = Prado::createComponent('\\Prado\\Util\\TSimpleDateFormatter',$pattern); return $formatter->parse($this->getText()); } @@ -698,7 +693,7 @@ class TDatePicker extends TTextBox */ protected function getDropDownDayOptions() { - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter', + $formatter = Prado::createComponent('\\Prado\\Util\\TSimpleDateFormatter', $this->getDateFormat()); $days = array(); $requiresPadding = $formatter->getDayPattern() === 'dd'; @@ -737,7 +732,7 @@ class TDatePicker extends TTextBox */ protected function getLocalizedMonthNames($info) { - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter', + $formatter = Prado::createComponent('\\Prado\\Util\\TSimpleDateFormatter', $this->getDateFormat()); switch($formatter->getMonthPattern()) { diff --git a/framework/Web/UI/WebControls/TDatePickerInputMode.php b/framework/Web/UI/WebControls/TDatePickerInputMode.php index 324a9023..d81de3cd 100644 --- a/framework/Web/UI/WebControls/TDatePickerInputMode.php +++ b/framework/Web/UI/WebControls/TDatePickerInputMode.php @@ -23,7 +23,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TDatePickerInputMode extends TEnumerable +class TDatePickerInputMode extends \Prado\TEnumerable { const TextBox='TextBox'; const DropDownList='DropDownList'; diff --git a/framework/Web/UI/WebControls/TDatePickerMode.php b/framework/Web/UI/WebControls/TDatePickerMode.php index d3cf9398..8cdf1221 100644 --- a/framework/Web/UI/WebControls/TDatePickerMode.php +++ b/framework/Web/UI/WebControls/TDatePickerMode.php @@ -26,7 +26,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TDatePickerMode extends TEnumerable +class TDatePickerMode extends \Prado\TEnumerable { const Basic='Basic'; const Clickable='Clickable'; diff --git a/framework/Web/UI/WebControls/TDatePickerPositionMode.php b/framework/Web/UI/WebControls/TDatePickerPositionMode.php index 66ddc180..821b8eb6 100644 --- a/framework/Web/UI/WebControls/TDatePickerPositionMode.php +++ b/framework/Web/UI/WebControls/TDatePickerPositionMode.php @@ -23,7 +23,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.1.4 */ -class TDatePickerPositionMode extends TEnumerable +class TDatePickerPositionMode extends \Prado\TEnumerable { const Top='Top'; const Bottom='Bottom'; diff --git a/framework/Web/UI/WebControls/TDisplayStyle.php b/framework/Web/UI/WebControls/TDisplayStyle.php index fdc47850..3b1a5e76 100644 --- a/framework/Web/UI/WebControls/TDisplayStyle.php +++ b/framework/Web/UI/WebControls/TDisplayStyle.php @@ -25,7 +25,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.1 */ -class TDisplayStyle extends TEnumerable +class TDisplayStyle extends \Prado\TEnumerable { const None='None'; const Dynamic='Dynamic'; diff --git a/framework/Web/UI/WebControls/TDropDownList.php b/framework/Web/UI/WebControls/TDropDownList.php index 9d00e717..cc1a7a9f 100644 --- a/framework/Web/UI/WebControls/TDropDownList.php +++ b/framework/Web/UI/WebControls/TDropDownList.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TListControl class - */ -Prado::using('System.Web.UI.WebControls.TListControl'); +use Prado\TPropertyValue; /** * TDropDownList class @@ -43,7 +39,7 @@ Prado::using('System.Web.UI.WebControls.TListControl'); * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TDropDownList extends TListControl implements IPostBackDataHandler, IValidatable +class TDropDownList extends TListControl implements \Prado\Web\UI\IPostBackDataHandler, \Prado\Web\UI\IValidatable { private $_dataChanged=false; private $_isValid=true; @@ -95,7 +91,7 @@ class TDropDownList extends TListControl implements IPostBackDataHandler, IValid /** * Raises postdata changed event. - * This method is required by {@link IPostBackDataHandler} interface. + * This method is required by {@link \Prado\Web\UI\IPostBackDataHandler} interface. * It is invoked by the framework when {@link getSelectedIndex SelectedIndex} property * is changed on postback. * This method is primarly used by framework developers. @@ -109,7 +105,7 @@ class TDropDownList extends TListControl implements IPostBackDataHandler, IValid /** * Returns a value indicating whether postback has caused the control data change. - * This method is required by the IPostBackDataHandler interface. + * This method is required by the \Prado\Web\UI\IPostBackDataHandler interface. * @return boolean whether postback has caused the control data change. False if the page is not in postback mode. */ public function getDataChanged() @@ -127,7 +123,7 @@ class TDropDownList extends TListControl implements IPostBackDataHandler, IValid /** * Returns the value to be validated. - * This methid is required by IValidatable interface. + * This methid is required by \Prado\Web\UI\IValidatable interface. * @return mixed the value of the property to be validated. */ public function getValidationPropertyValue() diff --git a/framework/Web/UI/WebControls/TDropDownListColumn.php b/framework/Web/UI/WebControls/TDropDownListColumn.php index efe2b43d..53639b90 100644 --- a/framework/Web/UI/WebControls/TDropDownListColumn.php +++ b/framework/Web/UI/WebControls/TDropDownListColumn.php @@ -10,9 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -Prado::using('System.Web.UI.WebControls.TDataGridColumn'); -Prado::using('System.Web.UI.WebControls.TDropDownList'); +use Prado\TPropertyValue; /** * TDropDownListColumn class diff --git a/framework/Web/UI/WebControls/TEditCommandColumn.php b/framework/Web/UI/WebControls/TEditCommandColumn.php index bea88144..07eec55b 100644 --- a/framework/Web/UI/WebControls/TEditCommandColumn.php +++ b/framework/Web/UI/WebControls/TEditCommandColumn.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * TDataGridColumn class file - */ -Prado::using('System.Web.UI.WebControls.TDataGridColumn'); +use Prado\TPropertyValue; /** * TEditCommandColumn class @@ -241,12 +237,12 @@ class TEditCommandColumn extends TDataGridColumn protected function createButton($commandName,$text,$causesValidation,$validationGroup) { if($this->getButtonType()===TButtonColumnType::LinkButton) - $button=Prado::createComponent('System.Web.UI.WebControls.TLinkButton'); + $button=Prado::createComponent('\\Prado\\Web\\UI\\WebControls\\TLinkButton'); else if($this->getButtonType()===TButtonColumnType::PushButton) - $button=Prado::createComponent('System.Web.UI.WebControls.TButton'); + $button=Prado::createComponent('\\Prado\\Web\\UI\\WebControls\\TButton'); else // image buttons { - $button=Prado::createComponent('System.Web.UI.WebControls.TImageButton'); + $button=Prado::createComponent('\\Prado\\Web\\UI\\WebControls\\TImageButton'); if(strcasecmp($commandName,'Update')===0) $url=$this->getUpdateImageUrl(); else if(strcasecmp($commandName,'Cancel')===0) diff --git a/framework/Web/UI/WebControls/TEmailAddressValidator.php b/framework/Web/UI/WebControls/TEmailAddressValidator.php index affaaede..fb7977a7 100644 --- a/framework/Web/UI/WebControls/TEmailAddressValidator.php +++ b/framework/Web/UI/WebControls/TEmailAddressValidator.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Using TRegularExpressionValidator class - */ -Prado::using('System.Web.UI.WebControls.TRegularExpressionValidator'); +use Prado\TPropertyValue; /** * TEmailAddressValidator class diff --git a/framework/Web/UI/WebControls/TExpression.php b/framework/Web/UI/WebControls/TExpression.php index aa97220d..21ad6c4b 100644 --- a/framework/Web/UI/WebControls/TExpression.php +++ b/framework/Web/UI/WebControls/TExpression.php @@ -26,7 +26,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TExpression extends TControl +class TExpression extends \Prado\Web\UI\TControl { /** * @var string PHP expression to be evaluated diff --git a/framework/Web/UI/WebControls/TFileUpload.php b/framework/Web/UI/WebControls/TFileUpload.php index 13afa997..07daae3a 100644 --- a/framework/Web/UI/WebControls/TFileUpload.php +++ b/framework/Web/UI/WebControls/TFileUpload.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TFileUpload class @@ -32,7 +33,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TFileUpload extends TWebControl implements IPostBackDataHandler, IValidatable +class TFileUpload extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\Web\UI\IPostBackDataHandler, \Prado\Web\UI\IValidatable { /** * Maximum file size (in bytes) allowed to be uploaded, defaults to 1MB. @@ -242,7 +243,7 @@ class TFileUpload extends TWebControl implements IPostBackDataHandler, IValidata /** * Returns a value indicating whether postback has caused the control data change. - * This method is required by the IPostBackDataHandler interface. + * This method is required by the \Prado\Web\UI\IPostBackDataHandler interface. * @return boolean whether postback has caused the control data change. False if the page is not in postback mode. */ public function getDataChanged() @@ -252,7 +253,7 @@ class TFileUpload extends TWebControl implements IPostBackDataHandler, IValidata /** * Returns the original file name as the property value to be validated. - * This method is required by IValidatable property. + * This method is required by \Prado\Web\UI\IValidatable property. * @return mixed the property value to be validated */ public function getValidationPropertyValue() diff --git a/framework/Web/UI/WebControls/TFlushOutput.php b/framework/Web/UI/WebControls/TFlushOutput.php index 65477ef2..f035c55f 100644 --- a/framework/Web/UI/WebControls/TFlushOutput.php +++ b/framework/Web/UI/WebControls/TFlushOutput.php @@ -9,6 +9,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TFlushOutput class. @@ -33,7 +34,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.1 */ -class TFlushOutput extends TControl +class TFlushOutput extends \Prado\Web\UI\TControl { /** * @var boolean whether to continue buffering of output diff --git a/framework/Web/UI/WebControls/TFont.php b/framework/Web/UI/WebControls/TFont.php index 82a8ed38..2f418c30 100644 --- a/framework/Web/UI/WebControls/TFont.php +++ b/framework/Web/UI/WebControls/TFont.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TFont class diff --git a/framework/Web/UI/WebControls/THead.php b/framework/Web/UI/WebControls/THead.php index 75859549..c67998f9 100644 --- a/framework/Web/UI/WebControls/THead.php +++ b/framework/Web/UI/WebControls/THead.php @@ -6,10 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package Prado\Web\UI + * @package Prado\Web\UI\WebControls */ -namespace Prado\Web\UI; +namespace Prado\Web\UI\WebControls; +use Prado\Web\THttpUtility; /** * THead class @@ -38,10 +39,10 @@ namespace Prado\Web\UI; * theme will not be rendered. * * @author Marcus Nyeholt and Qiang Xue - * @package Prado\Web\UI + * @package Prado\Web\UI\WebControls * @since 3.0 */ -class THead extends TControl +class THead extends \Prado\Web\UI\TControl { /** * @var TList list of meta name tags to be loaded by {@link THead} diff --git a/framework/Web/UI/WebControls/THiddenField.php b/framework/Web/UI/WebControls/THiddenField.php index edf8e616..b9138e7c 100644 --- a/framework/Web/UI/WebControls/THiddenField.php +++ b/framework/Web/UI/WebControls/THiddenField.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * THiddenField class @@ -23,7 +24,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class THiddenField extends TControl implements IPostBackDataHandler, IValidatable, IDataRenderer +class THiddenField extends \Prado\Web\UI\TControl implements \Prado\Web\UI\IPostBackDataHandler, \Prado\Web\UI\IValidatable, \Prado\IDataRenderer { private $_dataChanged=false; private $_isValid=true; @@ -94,7 +95,7 @@ class THiddenField extends TControl implements IPostBackDataHandler, IValidatabl /** * Returns a value indicating whether postback has caused the control data change. - * This method is required by the IPostBackDataHandler interface. + * This method is required by the \Prado\Web\UI\IPostBackDataHandler interface. * @return boolean whether postback has caused the control data change. False if the page is not in postback mode. */ public function getDataChanged() @@ -104,7 +105,7 @@ class THiddenField extends TControl implements IPostBackDataHandler, IValidatabl /** * Returns the value to be validated. - * This methid is required by IValidatable interface. + * This methid is required by \Prado\Web\UI\IValidatable interface. * @return mixed the value of the property to be validated. */ public function getValidationPropertyValue() @@ -170,7 +171,7 @@ class THiddenField extends TControl implements IPostBackDataHandler, IValidatabl /** * Returns the value of the hidden field. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link getValue()}. * @return string value of the hidden field * @see getValue @@ -183,7 +184,7 @@ class THiddenField extends TControl implements IPostBackDataHandler, IValidatabl /** * Sets the value of the hidden field. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link setValue()}. * @param string value of the hidden field * @see setValue diff --git a/framework/Web/UI/WebControls/THorizontalAlign.php b/framework/Web/UI/WebControls/THorizontalAlign.php index bf11351f..c041a872 100644 --- a/framework/Web/UI/WebControls/THorizontalAlign.php +++ b/framework/Web/UI/WebControls/THorizontalAlign.php @@ -26,7 +26,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class THorizontalAlign extends TEnumerable +class THorizontalAlign extends \Prado\TEnumerable { const NotSet='NotSet'; const Left='Left'; diff --git a/framework/Web/UI/WebControls/THotSpot.php b/framework/Web/UI/WebControls/THotSpot.php index 45fd6ae5..fe267a75 100644 --- a/framework/Web/UI/WebControls/THotSpot.php +++ b/framework/Web/UI/WebControls/THotSpot.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * THotSpot class. diff --git a/framework/Web/UI/WebControls/THotSpotCollection.php b/framework/Web/UI/WebControls/THotSpotCollection.php index 0b20bc4c..5ee9172b 100644 --- a/framework/Web/UI/WebControls/THotSpotCollection.php +++ b/framework/Web/UI/WebControls/THotSpotCollection.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Exceptions\TInvalidDataTypeException; /** * THotSpotCollection class. @@ -20,7 +21,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class THotSpotCollection extends TList +class THotSpotCollection extends \Prado\Collections\TList { /** * Inserts an item at the specified position. diff --git a/framework/Web/UI/WebControls/THotSpotMode.php b/framework/Web/UI/WebControls/THotSpotMode.php index 73d0a0d5..d2076e2f 100644 --- a/framework/Web/UI/WebControls/THotSpotMode.php +++ b/framework/Web/UI/WebControls/THotSpotMode.php @@ -25,7 +25,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class THotSpotMode extends TEnumerable +class THotSpotMode extends \Prado\TEnumerable { const NotSet='NotSet'; const Navigate='Navigate'; diff --git a/framework/Web/UI/WebControls/THtmlArea.php b/framework/Web/UI/WebControls/THtmlArea.php index b851d725..8535c3cf 100644 --- a/framework/Web/UI/WebControls/THtmlArea.php +++ b/framework/Web/UI/WebControls/THtmlArea.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TTextBox class - */ -Prado::using('System.Web.UI.WebControls.TTextBox'); +use Prado\TPropertyValue; /** * THtmlArea class diff --git a/framework/Web/UI/WebControls/THtmlArea4.php b/framework/Web/UI/WebControls/THtmlArea4.php index 92464d64..ae11ab8c 100644 --- a/framework/Web/UI/WebControls/THtmlArea4.php +++ b/framework/Web/UI/WebControls/THtmlArea4.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TTextBox class - */ -Prado::using('System.Web.UI.WebControls.TTextBox'); +use Prado\TPropertyValue; /** * THtmlArea4 class diff --git a/framework/Web/UI/WebControls/THtmlElement.php b/framework/Web/UI/WebControls/THtmlElement.php index dc0d50a0..566223e1 100644 --- a/framework/Web/UI/WebControls/THtmlElement.php +++ b/framework/Web/UI/WebControls/THtmlElement.php @@ -9,9 +9,7 @@ * @package Prado\Web\UI\WebControls */ namespace Prado\Web\UI\WebControls; - - -Prado::using('System.Web.UI.WebControls.TWebControl'); +use Prado\TPropertyValue; /** * THtmlElement class. @@ -27,7 +25,7 @@ Prado::using('System.Web.UI.WebControls.TWebControl'); * @package Prado\Web\UI\WebControls * @since 3.1.2 */ -class THtmlElement extends TWebControl +class THtmlElement extends \Prado\Web\UI\WebControls\TWebControl { /** * @var the tag of this element diff --git a/framework/Web/UI/WebControls/THyperLink.php b/framework/Web/UI/WebControls/THyperLink.php index 44ba9e41..f265e722 100644 --- a/framework/Web/UI/WebControls/THyperLink.php +++ b/framework/Web/UI/WebControls/THyperLink.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Web\THttpUtility; /** * THyperLink class @@ -30,7 +31,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class THyperLink extends TWebControl implements IDataRenderer +class THyperLink extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\IDataRenderer { /** * @return string tag name of the hyperlink @@ -85,7 +86,7 @@ class THyperLink extends TWebControl implements IDataRenderer */ protected function createImage($imageUrl) { - $image=Prado::createComponent('System.Web.UI.WebControls.TImage'); + $image=Prado::createComponent('\\Prado\\Web\\UI\\WebControls\\TImage'); $image->setImageUrl($imageUrl); if(($width=$this->getImageWidth())!=='') $image->setWidth($width); @@ -208,7 +209,7 @@ class THyperLink extends TWebControl implements IDataRenderer /** * Returns the URL to link to when the THyperLink component is clicked. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link getText()}. * @return string the text caption * @see getText @@ -221,7 +222,7 @@ class THyperLink extends TWebControl implements IDataRenderer /** * Sets the URL to link to when the THyperLink component is clicked. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link setText()}. * @param string the text caption to be set * @see setText diff --git a/framework/Web/UI/WebControls/THyperLinkColumn.php b/framework/Web/UI/WebControls/THyperLinkColumn.php index 74cfa878..85ecf9f5 100644 --- a/framework/Web/UI/WebControls/THyperLinkColumn.php +++ b/framework/Web/UI/WebControls/THyperLinkColumn.php @@ -11,15 +11,6 @@ namespace Prado\Web\UI\WebControls; -/** - * TDataGridColumn class file - */ -Prado::using('System.Web.UI.WebControls.TDataGridColumn'); -/** - * THyperLink class file - */ -Prado::using('System.Web.UI.WebControls.THyperLink'); - /** * THyperLinkColumn class * diff --git a/framework/Web/UI/WebControls/TImage.php b/framework/Web/UI/WebControls/TImage.php index 50457135..5657c85b 100644 --- a/framework/Web/UI/WebControls/TImage.php +++ b/framework/Web/UI/WebControls/TImage.php @@ -25,7 +25,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TImage extends TWebControl implements IDataRenderer +class TImage extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\IDataRenderer { /** * @return string tag name of image control @@ -114,7 +114,7 @@ class TImage extends TWebControl implements IDataRenderer /** * Returns the URL of the image file. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link getImageUrl()}. * @return string the URL of the image file. * @see getImageUrl @@ -127,7 +127,7 @@ class TImage extends TWebControl implements IDataRenderer /** * Sets the URL of the image. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link setImageUrl()}. * @param string the URL of the image file. * @see setImageUrl diff --git a/framework/Web/UI/WebControls/TImageButton.php b/framework/Web/UI/WebControls/TImageButton.php index d4a5cddc..0a0b7ec7 100644 --- a/framework/Web/UI/WebControls/TImageButton.php +++ b/framework/Web/UI/WebControls/TImageButton.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TImage class file - */ -Prado::using('System.Web.UI.WebControls.TImage'); +use Prado\TPropertyValue; /** * TImageButton class @@ -34,7 +30,7 @@ Prado::using('System.Web.UI.WebControls.TImage'); * the {@link setCommandParameter CommandParameter} property value * through the {@link TCommandParameter::getName Name} and * {@link TCommandParameter::getParameter Parameter} properties of the event - * parameter which is of type {@link TCommandEventParameter}. + * parameter which is of type {@link \Prado\Web\UI\TCommandEventParameter}. * * A submit button does not have a command name associated with the button * and clicking on it simply posts the Web page back to the server. @@ -56,7 +52,7 @@ Prado::using('System.Web.UI.WebControls.TImage'); * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEventHandler, IButtonControl +class TImageButton extends TImage implements \Prado\Web\UI\IPostBackDataHandler, IPostBackEventHandler, \Prado\Web\UI\IButtonControl { /** * @var integer x coordinate that the image is being clicked at @@ -209,7 +205,7 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven } /** - * A dummy implementation for the IPostBackDataHandler interface. + * A dummy implementation for the \Prado\Web\UI\IPostBackDataHandler interface. */ public function raisePostDataChangedEvent() { @@ -233,7 +229,7 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven * The method raises 'OnCommand' event to fire up the event handlers. * If you override this method, be sure to call the parent implementation * so that the event handlers can be invoked. - * @param TCommandEventParameter event parameter to be passed to the event handlers + * @param \Prado\Web\UI\TCommandEventParameter event parameter to be passed to the event handlers */ public function onCommand($param) { @@ -255,12 +251,12 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven if($this->getCausesValidation()) $this->getPage()->validate($this->getValidationGroup()); $this->onClick(new TImageClickEventParameter($this->_x,$this->_y)); - $this->onCommand(new TCommandEventParameter($this->getCommandName(),$this->getCommandParameter())); + $this->onCommand(new \Prado\Web\UI\TCommandEventParameter($this->getCommandName(),$this->getCommandParameter())); } /** * Returns a value indicating whether postback has caused the control data change. - * This method is required by the IPostBackDataHandler interface. + * This method is required by the \Prado\Web\UI\IPostBackDataHandler interface. * @return boolean whether postback has caused the control data change. False if the page is not in postback mode. */ public function getDataChanged() diff --git a/framework/Web/UI/WebControls/TImageClickEventParameter.php b/framework/Web/UI/WebControls/TImageClickEventParameter.php index 4dac6009..3193641f 100644 --- a/framework/Web/UI/WebControls/TImageClickEventParameter.php +++ b/framework/Web/UI/WebControls/TImageClickEventParameter.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TImageClickEventParameter class diff --git a/framework/Web/UI/WebControls/TImageMap.php b/framework/Web/UI/WebControls/TImageMap.php index 5be44d62..53a2f660 100644 --- a/framework/Web/UI/WebControls/TImageMap.php +++ b/framework/Web/UI/WebControls/TImageMap.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TImage class file - */ -Prado::using('System.Web.UI.WebControls.TImage'); +use Prado\TPropertyValue; /** * TImageMap class @@ -37,7 +33,7 @@ Prado::using('System.Web.UI.WebControls.TImage'); * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TImageMap extends TImage implements IPostBackEventHandler +class TImageMap extends TImage implements \Prado\Web\UI\IPostBackEventHandler { const MAP_NAME_PREFIX='ImageMap'; diff --git a/framework/Web/UI/WebControls/TInlineFrame.php b/framework/Web/UI/WebControls/TInlineFrame.php index ba590c06..b299678b 100644 --- a/framework/Web/UI/WebControls/TInlineFrame.php +++ b/framework/Web/UI/WebControls/TInlineFrame.php @@ -11,6 +11,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TInlineFrame class @@ -31,7 +32,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TInlineFrame extends TWebControl implements IDataRenderer +class TInlineFrame extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\IDataRenderer { /** * @return string tag name of the iframe. @@ -107,7 +108,7 @@ class TInlineFrame extends TWebControl implements IDataRenderer /** * Returns the URL that this iframe will load content from - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link getFrameUrl()}. * @return string the URL that this iframe will load content from * @see getFrameUrl @@ -120,7 +121,7 @@ class TInlineFrame extends TWebControl implements IDataRenderer /** * Sets the URL that this iframe will load content from. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link setFrameUrl()}. * @param string the URL that this iframe will load content from * @see setFrameUrl diff --git a/framework/Web/UI/WebControls/TInlineFrameAlign.php b/framework/Web/UI/WebControls/TInlineFrameAlign.php index 6db3151a..b3d15dcc 100644 --- a/framework/Web/UI/WebControls/TInlineFrameAlign.php +++ b/framework/Web/UI/WebControls/TInlineFrameAlign.php @@ -29,7 +29,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TInlineFrameAlign extends TEnumerable +class TInlineFrameAlign extends \Prado\TEnumerable { const NotSet='NotSet'; const Left='Left'; diff --git a/framework/Web/UI/WebControls/TInlineFrameScrollBars.php b/framework/Web/UI/WebControls/TInlineFrameScrollBars.php index b23ae2cf..d552c7b9 100644 --- a/framework/Web/UI/WebControls/TInlineFrameScrollBars.php +++ b/framework/Web/UI/WebControls/TInlineFrameScrollBars.php @@ -26,7 +26,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TInlineFrameScrollBars extends TEnumerable +class TInlineFrameScrollBars extends \Prado\TEnumerable { const None='None'; const Auto='Auto'; diff --git a/framework/Web/UI/WebControls/TItemDataRenderer.php b/framework/Web/UI/WebControls/TItemDataRenderer.php index a2e19544..8dd3d51c 100644 --- a/framework/Web/UI/WebControls/TItemDataRenderer.php +++ b/framework/Web/UI/WebControls/TItemDataRenderer.php @@ -11,9 +11,7 @@ */ namespace Prado\Web\UI\WebControls; - -Prado::using('System.Web.UI.WebControls.TDataBoundControl'); -Prado::using('System.Web.UI.WebControls.TDataRenderer'); +use Prado\TPropertyValue; /** * TItemDataRenderer class diff --git a/framework/Web/UI/WebControls/TJavascriptLogger.php b/framework/Web/UI/WebControls/TJavascriptLogger.php index 2ca01502..0a4140a5 100644 --- a/framework/Web/UI/WebControls/TJavascriptLogger.php +++ b/framework/Web/UI/WebControls/TJavascriptLogger.php @@ -30,7 +30,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TJavascriptLogger extends TWebControl +class TJavascriptLogger extends \Prado\Web\UI\WebControls\TWebControl { private static $_keyCodes = array( '0'=>48, '1'=>49, '2'=>50, '3'=>51, '4'=>52, '5'=>53, '6'=>54, '7'=>55, '8'=>56, '9'=>57, diff --git a/framework/Web/UI/WebControls/TKeyboard.php b/framework/Web/UI/WebControls/TKeyboard.php index 172f5b9f..e075a624 100644 --- a/framework/Web/UI/WebControls/TKeyboard.php +++ b/framework/Web/UI/WebControls/TKeyboard.php @@ -11,6 +11,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * Class TKeyboard. @@ -37,7 +38,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.1.1 */ -class TKeyboard extends TWebControl +class TKeyboard extends \Prado\Web\UI\WebControls\TWebControl { /** * @return string the ID path of the {@link TTextBox} control diff --git a/framework/Web/UI/WebControls/TLabel.php b/framework/Web/UI/WebControls/TLabel.php index 1695aa91..c7467a88 100644 --- a/framework/Web/UI/WebControls/TLabel.php +++ b/framework/Web/UI/WebControls/TLabel.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Exceptions\TInvalidDataValueException; /** * TLabel class @@ -30,7 +31,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TLabel extends TWebControl implements IDataRenderer +class TLabel extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\IDataRenderer { private $_forControl=''; @@ -109,7 +110,7 @@ class TLabel extends TWebControl implements IDataRenderer /** * Returns the text value of the label. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link getText()}. * @return string the text value of the label * @see getText @@ -122,7 +123,7 @@ class TLabel extends TWebControl implements IDataRenderer /** * Sets the text value of the label. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link setText()}. * @param string the text value of the label * @see setText diff --git a/framework/Web/UI/WebControls/TLinkButton.php b/framework/Web/UI/WebControls/TLinkButton.php index 5897d25c..8913cb0d 100644 --- a/framework/Web/UI/WebControls/TLinkButton.php +++ b/framework/Web/UI/WebControls/TLinkButton.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TLinkButton class @@ -31,7 +32,7 @@ namespace Prado\Web\UI\WebControls; * the {@link setCommandParameter CommandParameter} property value * through the {@link TCommandParameter::getName Name} and * {@link TCommandParameter::getParameter Parameter} properties of the event - * parameter which is of type {@link TCommandEventParameter}. + * parameter which is of type {@link \Prado\Web\UI\TCommandEventParameter}. * * A submit button does not have a command name associated with the button * and clicking on it simply posts the Web page back to the server. @@ -54,7 +55,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TLinkButton extends TWebControl implements IPostBackEventHandler, IButtonControl, IDataRenderer +class TLinkButton extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\Web\UI\IPostBackEventHandler, \Prado\Web\UI\IButtonControl, \Prado\IDataRenderer { /** * @return string tag name of the button @@ -200,7 +201,7 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler, IButtonC /** * Returns the caption of the button. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link getText()}. * @return string caption of the button. * @see getText @@ -213,7 +214,7 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler, IButtonC /** * Sets the caption of the button. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link setText()}. * @param string caption of the button * @see setText @@ -303,7 +304,7 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler, IButtonC if($this->getCausesValidation()) $this->getPage()->validate($this->getValidationGroup()); $this->onClick(null); - $this->onCommand(new TCommandEventParameter($this->getCommandName(),$this->getCommandParameter())); + $this->onCommand(new \Prado\Web\UI\TCommandEventParameter($this->getCommandName(),$this->getCommandParameter())); } /** @@ -323,7 +324,7 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler, IButtonC * The method raises 'OnCommand' event to fire up the event handlers. * If you override this method, be sure to call the parent implementation * so that the event handlers can be invoked. - * @param TCommandEventParameter event parameter to be passed to the event handlers + * @param \Prado\Web\UI\TCommandEventParameter event parameter to be passed to the event handlers */ public function onCommand($param) { diff --git a/framework/Web/UI/WebControls/TListBox.php b/framework/Web/UI/WebControls/TListBox.php index 537f5572..a9dd8953 100644 --- a/framework/Web/UI/WebControls/TListBox.php +++ b/framework/Web/UI/WebControls/TListBox.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TListControl class - */ -Prado::using('System.Web.UI.WebControls.TListControl'); +use Prado\TPropertyValue; /** * TListBox class @@ -36,7 +32,7 @@ Prado::using('System.Web.UI.WebControls.TListControl'); * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TListBox extends TListControl implements IPostBackDataHandler, IValidatable +class TListBox extends TListControl implements \Prado\Web\UI\IPostBackDataHandler, \Prado\Web\UI\IValidatable { private $_dataChanged=false; private $_isValid=true; @@ -147,7 +143,7 @@ class TListBox extends TListControl implements IPostBackDataHandler, IValidatabl /** * Raises postdata changed event. - * This method is required by {@link IPostBackDataHandler} interface. + * This method is required by {@link \Prado\Web\UI\IPostBackDataHandler} interface. * It is invoked by the framework when {@link getSelectedIndices SelectedIndices} property * is changed on postback. * This method is primarly used by framework developers. @@ -161,7 +157,7 @@ class TListBox extends TListControl implements IPostBackDataHandler, IValidatabl /** * Returns a value indicating whether postback has caused the control data change. - * This method is required by the IPostBackDataHandler interface. + * This method is required by the \Prado\Web\UI\IPostBackDataHandler interface. * @return boolean whether postback has caused the control data change. False if the page is not in postback mode. */ public function getDataChanged() @@ -214,7 +210,7 @@ class TListBox extends TListControl implements IPostBackDataHandler, IValidatabl /** * Returns the value to be validated. - * This methid is required by IValidatable interface. + * This methid is required by \Prado\Web\UI\IValidatable interface. * @return mixed the value of the property to be validated. */ public function getValidationPropertyValue() diff --git a/framework/Web/UI/WebControls/TListControl.php b/framework/Web/UI/WebControls/TListControl.php index 56bd9ac8..dac9a196 100644 --- a/framework/Web/UI/WebControls/TListControl.php +++ b/framework/Web/UI/WebControls/TListControl.php @@ -11,15 +11,9 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes the supporting classes - */ -Prado::using('System.Web.UI.WebControls.TDataBoundControl'); -Prado::using('System.Web.UI.WebControls.TListItem'); -Prado::using('System.Collections.TListItemCollection'); -Prado::using('System.Collections.TAttributeCollection'); -Prado::using('System.Util.TDataFieldAccessor'); +use Prado\TPropertyValue; +use Prado\Web\THttpUtility; +use Prado\Exceptions\TInvalidDataValueException; /** * TListControl class @@ -82,7 +76,7 @@ Prado::using('System.Util.TDataFieldAccessor'); * @package Prado\Web\UI\WebControls * @since 3.0 */ -abstract class TListControl extends TDataBoundControl implements IDataRenderer +abstract class TListControl extends TDataBoundControl implements \Prado\IDataRenderer { /** * @var TListItemCollection item list @@ -277,7 +271,7 @@ abstract class TListControl extends TDataBoundControl implements IDataRenderer */ protected function createListItemCollection() { - return new TListItemCollection; + return new \Prado\Collections\TListItemCollection; } /** @@ -552,7 +546,7 @@ abstract class TListControl extends TDataBoundControl implements IDataRenderer /** * Returns the value of the selected item with the lowest cardinal index. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link getSelectedValue()}. * @return string the value of the selected item with the lowest cardinal index, empty if no selection. * @see getSelectedValue @@ -565,7 +559,7 @@ abstract class TListControl extends TDataBoundControl implements IDataRenderer /** * Selects an item by the specified value. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link setSelectedValue()}. * @param string the value of the item to be selected. * @see setSelectedValue diff --git a/framework/Web/UI/WebControls/TListControlValidator.php b/framework/Web/UI/WebControls/TListControlValidator.php index 72522952..41c5636e 100644 --- a/framework/Web/UI/WebControls/TListControlValidator.php +++ b/framework/Web/UI/WebControls/TListControlValidator.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Using TBaseValidator class - */ -Prado::using('System.Web.UI.WebControls.TBaseValidator'); +use Prado\TPropertyValue; /** * TListControlValidator class. diff --git a/framework/Web/UI/WebControls/TListItem.php b/framework/Web/UI/WebControls/TListItem.php index 11fede51..9e93b338 100644 --- a/framework/Web/UI/WebControls/TListItem.php +++ b/framework/Web/UI/WebControls/TListItem.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TListItem class. diff --git a/framework/Web/UI/WebControls/TListItemType.php b/framework/Web/UI/WebControls/TListItemType.php index b2997b49..489bdd12 100644 --- a/framework/Web/UI/WebControls/TListItemType.php +++ b/framework/Web/UI/WebControls/TListItemType.php @@ -30,7 +30,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TListItemType extends TEnumerable +class TListItemType extends \Prado\TEnumerable { const Header='Header'; const Footer='Footer'; diff --git a/framework/Web/UI/WebControls/TListSelectionMode.php b/framework/Web/UI/WebControls/TListSelectionMode.php index 1f6335ec..8f167ab8 100644 --- a/framework/Web/UI/WebControls/TListSelectionMode.php +++ b/framework/Web/UI/WebControls/TListSelectionMode.php @@ -23,7 +23,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TListSelectionMode extends TEnumerable +class TListSelectionMode extends \Prado\TEnumerable { const Single='Single'; const Multiple='Multiple'; diff --git a/framework/Web/UI/WebControls/TLiteral.php b/framework/Web/UI/WebControls/TLiteral.php index b9bc65ce..dc15ad0c 100644 --- a/framework/Web/UI/WebControls/TLiteral.php +++ b/framework/Web/UI/WebControls/TLiteral.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TLiteral class @@ -31,7 +32,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TLiteral extends TControl implements IDataRenderer +class TLiteral extends \Prado\Web\UI\TControl implements \Prado\IDataRenderer { /** * @return string the static text of the TLiteral @@ -52,7 +53,7 @@ class TLiteral extends TControl implements IDataRenderer /** * Returns the static text of the TLiteral. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link getText()}. * @return string the static text of the TLiteral * @see getText @@ -65,7 +66,7 @@ class TLiteral extends TControl implements IDataRenderer /** * Sets the static text of the TLiteral. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link setText()}. * @param string the static text of the TLiteral * @see setText diff --git a/framework/Web/UI/WebControls/TLiteralColumn.php b/framework/Web/UI/WebControls/TLiteralColumn.php index e5d7babf..ca6e1fce 100644 --- a/framework/Web/UI/WebControls/TLiteralColumn.php +++ b/framework/Web/UI/WebControls/TLiteralColumn.php @@ -10,11 +10,8 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * TDataGridColumn class file - */ -Prado::using('System.Web.UI.WebControls.TDataGridColumn'); +use Prado\TPropertyValue; +use Prado\Web\THttpUtility; /** * TLiteralColumn class diff --git a/framework/Web/UI/WebControls/TMarkdown.php b/framework/Web/UI/WebControls/TMarkdown.php index 44177672..8d234820 100644 --- a/framework/Web/UI/WebControls/TMarkdown.php +++ b/framework/Web/UI/WebControls/TMarkdown.php @@ -11,12 +11,6 @@ namespace Prado\Web\UI\WebControls; -/** - * Using TTextHighlighter and MarkdownParser classes - */ -Prado::using('System.Web.UI.WebControls.TTextHighlighter'); -Prado::using('System.3rdParty.Parsedown.Parsedown'); - /** * TMarkdown class * diff --git a/framework/Web/UI/WebControls/TMetaTagCollection.php b/framework/Web/UI/WebControls/TMetaTagCollection.php index 6e2ce03a..d3b9cfa2 100644 --- a/framework/Web/UI/WebControls/TMetaTagCollection.php +++ b/framework/Web/UI/WebControls/TMetaTagCollection.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Exceptions\TInvalidDataTypeException; /** * TMetaTagCollection class @@ -21,7 +22,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TMetaTagCollection extends TList +class TMetaTagCollection extends \Prado\Collections\TList { /** * Inserts an item at the specified position. diff --git a/framework/Web/UI/WebControls/TMultiView.php b/framework/Web/UI/WebControls/TMultiView.php index d601c66e..b3995c3e 100644 --- a/framework/Web/UI/WebControls/TMultiView.php +++ b/framework/Web/UI/WebControls/TMultiView.php @@ -10,6 +10,8 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; +use Prado\Exceptions\TInvalidDataValueException; /** * TMultiView class @@ -36,7 +38,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TMultiView extends TControl +class TMultiView extends \Prado\Web\UI\TControl { const CMD_NEXTVIEW='NextView'; const CMD_PREVIOUSVIEW='PreviousView'; @@ -144,7 +146,7 @@ class TMultiView extends TControl { if($view->getActive()) return; - $triggerEvent=$triggerViewChangedEvent && ($this->getControlStage()>=TControl::CS_STATE_LOADED || ($this->getPage() && !$this->getPage()->getIsPostBack())); + $triggerEvent=$triggerViewChangedEvent && ($this->getControlStage()>=\Prado\Web\UI\TControl::CS_STATE_LOADED || ($this->getPage() && !$this->getPage()->getIsPostBack())); foreach($this->getViews() as $v) { if($v===$view) @@ -214,7 +216,7 @@ class TMultiView extends TControl */ public function bubbleEvent($sender,$param) { - if(!$this->_ignoreBubbleEvents && ($param instanceof TCommandEventParameter)) + if(!$this->_ignoreBubbleEvents && ($param instanceof \Prado\Web\UI\TCommandEventParameter)) { switch($param->getCommandName()) { diff --git a/framework/Web/UI/WebControls/TOutputCache.php b/framework/Web/UI/WebControls/TOutputCache.php index 176ff811..8ff22157 100644 --- a/framework/Web/UI/WebControls/TOutputCache.php +++ b/framework/Web/UI/WebControls/TOutputCache.php @@ -10,6 +10,8 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; +use Prado\Exceptions\TInvalidDataValueException; /** * TOutputCache class. @@ -67,7 +69,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.1 */ -class TOutputCache extends TControl implements INamingContainer +class TOutputCache extends \Prado\Web\UI\TControl implements \Prado\Web\UI\INamingContainer { const CACHE_ID_PREFIX='prado:outputcache'; private $_cacheModuleID=''; diff --git a/framework/Web/UI/WebControls/TOutputCacheCalculateKeyEventParameter.php b/framework/Web/UI/WebControls/TOutputCacheCalculateKeyEventParameter.php index 404751a2..e09e0911 100644 --- a/framework/Web/UI/WebControls/TOutputCacheCalculateKeyEventParameter.php +++ b/framework/Web/UI/WebControls/TOutputCacheCalculateKeyEventParameter.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TOutputCacheCalculateKeyEventParameter class diff --git a/framework/Web/UI/WebControls/TOutputCacheCheckDependencyEventParameter.php b/framework/Web/UI/WebControls/TOutputCacheCheckDependencyEventParameter.php index fd2451fd..82d3d5d5 100644 --- a/framework/Web/UI/WebControls/TOutputCacheCheckDependencyEventParameter.php +++ b/framework/Web/UI/WebControls/TOutputCacheCheckDependencyEventParameter.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TOutputCacheCheckDependencyEventParameter class diff --git a/framework/Web/UI/WebControls/TPager.php b/framework/Web/UI/WebControls/TPager.php index e54f7798..aa7cda29 100644 --- a/framework/Web/UI/WebControls/TPager.php +++ b/framework/Web/UI/WebControls/TPager.php @@ -10,6 +10,8 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; +use Prado\Exceptions\TInvalidDataValueException; /** * TPager class. @@ -49,7 +51,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.2 */ -class TPager extends TWebControl implements INamingContainer +class TPager extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\Web\UI\INamingContainer { /** * Command name that TPager understands. @@ -678,7 +680,7 @@ class TPager extends TWebControl implements INamingContainer */ public function bubbleEvent($sender,$param) { - if($param instanceof TCommandEventParameter) + if($param instanceof \Prado\Web\UI\TCommandEventParameter) { $command=$param->getCommandName(); if(strcasecmp($command,self::CMD_PAGE)===0) diff --git a/framework/Web/UI/WebControls/TPagerButtonType.php b/framework/Web/UI/WebControls/TPagerButtonType.php index 359558a5..b2947263 100644 --- a/framework/Web/UI/WebControls/TPagerButtonType.php +++ b/framework/Web/UI/WebControls/TPagerButtonType.php @@ -23,7 +23,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TPagerButtonType extends TEnumerable +class TPagerButtonType extends \Prado\TEnumerable { const LinkButton='LinkButton'; const PushButton='PushButton'; diff --git a/framework/Web/UI/WebControls/TPagerMode.php b/framework/Web/UI/WebControls/TPagerMode.php index 9ea80fd3..82df8dac 100644 --- a/framework/Web/UI/WebControls/TPagerMode.php +++ b/framework/Web/UI/WebControls/TPagerMode.php @@ -24,7 +24,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TPagerMode extends TEnumerable +class TPagerMode extends \Prado\TEnumerable { const NextPrev='NextPrev'; const Numeric='Numeric'; diff --git a/framework/Web/UI/WebControls/TPanel.php b/framework/Web/UI/WebControls/TPanel.php index 772699e9..8421fdb3 100644 --- a/framework/Web/UI/WebControls/TPanel.php +++ b/framework/Web/UI/WebControls/TPanel.php @@ -10,11 +10,8 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TPanelStyle class file - */ -Prado::using('System.Web.UI.WebControls.TPanelStyle'); +use Prado\Prado; +use Prado\Exceptions\TInvalidDataValueException; /** * TPanel class @@ -39,7 +36,7 @@ Prado::using('System.Web.UI.WebControls.TPanelStyle'); * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TPanel extends TWebControl +class TPanel extends \Prado\Web\UI\WebControls\TWebControl { /** * @var string ID path to the default button diff --git a/framework/Web/UI/WebControls/TPanelStyle.php b/framework/Web/UI/WebControls/TPanelStyle.php index e225995a..8185d453 100644 --- a/framework/Web/UI/WebControls/TPanelStyle.php +++ b/framework/Web/UI/WebControls/TPanelStyle.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TStyle class file - */ -Prado::using('System.Web.UI.WebControls.TStyle'); +use Prado\TPropertyValue; /** * TPanelStyle class. diff --git a/framework/Web/UI/WebControls/TPlaceHolder.php b/framework/Web/UI/WebControls/TPlaceHolder.php index 8c548128..e83b1def 100644 --- a/framework/Web/UI/WebControls/TPlaceHolder.php +++ b/framework/Web/UI/WebControls/TPlaceHolder.php @@ -22,7 +22,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TPlaceHolder extends TControl +class TPlaceHolder extends \Prado\Web\UI\TControl { } diff --git a/framework/Web/UI/WebControls/TRadioButton.php b/framework/Web/UI/WebControls/TRadioButton.php index 1b820c2f..35a64a2e 100644 --- a/framework/Web/UI/WebControls/TRadioButton.php +++ b/framework/Web/UI/WebControls/TRadioButton.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Using TCheckBox parent class - */ -Prado::using('System.Web.UI.WebControls.TCheckBox'); +use Prado\TPropertyValue; /** * TRadioButton class @@ -164,7 +160,7 @@ class TRadioButton extends TCheckBox $this->_previousUniqueID=$uniqueID; if($uniqueID!=='') { - if(($pos=strrpos($uniqueID,TControl::ID_SEPARATOR))!==false) + if(($pos=strrpos($uniqueID,\Prado\Web\UI\TControl::ID_SEPARATOR))!==false) { if($groupName!=='') $groupName=substr($uniqueID,0,$pos+1).$groupName; diff --git a/framework/Web/UI/WebControls/TRadioButtonList.php b/framework/Web/UI/WebControls/TRadioButtonList.php index f8c55be1..57368add 100644 --- a/framework/Web/UI/WebControls/TRadioButtonList.php +++ b/framework/Web/UI/WebControls/TRadioButtonList.php @@ -11,15 +11,6 @@ namespace Prado\Web\UI\WebControls; -/** - * Includes TRadioButton class - */ -Prado::using('System.Web.UI.WebControls.TRadioButton'); -/** - * Includes TCheckBoxList class - */ -Prado::using('System.Web.UI.WebControls.TCheckBoxList'); - /** * TRadioButtonList class * diff --git a/framework/Web/UI/WebControls/TRangeValidator.php b/framework/Web/UI/WebControls/TRangeValidator.php index 318c8b40..81ccd4da 100644 --- a/framework/Web/UI/WebControls/TRangeValidator.php +++ b/framework/Web/UI/WebControls/TRangeValidator.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Using TBaseValidator class - */ -Prado::using('System.Web.UI.WebControls.TBaseValidator'); +use Prado\TPropertyValue; /** * TRangeValidator class @@ -254,7 +250,7 @@ class TRangeValidator extends TBaseValidator $dateFormat = $this->getDateFormat(); if($dateFormat!=='') { - $formatter=Prado::createComponent('System.Util.TSimpleDateFormatter', $dateFormat); + $formatter=Prado::createComponent('\\Prado\\Util\\TSimpleDateFormatter', $dateFormat); $value = $formatter->parse($value); if($minValue!=='') $valid=$valid && $this->isGreaterThan($value,$formatter->parse($minValue)); diff --git a/framework/Web/UI/WebControls/TRatingList.php b/framework/Web/UI/WebControls/TRatingList.php index 13ce436b..17b6a373 100644 --- a/framework/Web/UI/WebControls/TRatingList.php +++ b/framework/Web/UI/WebControls/TRatingList.php @@ -10,11 +10,8 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TRadioButtonList class - */ -Prado::using('System.Web.UI.WebControls.TRadioButtonList'); +use Prado\TPropertyValue; +use Prado\Exceptions\TInvalidDataValueException; /** * TRatingList class. diff --git a/framework/Web/UI/WebControls/TReCaptcha.php b/framework/Web/UI/WebControls/TReCaptcha.php index 2ad6c49d..5af6b0c5 100644 --- a/framework/Web/UI/WebControls/TReCaptcha.php +++ b/framework/Web/UI/WebControls/TReCaptcha.php @@ -11,8 +11,7 @@ */ namespace Prado\Web\UI\WebControls; - -Prado::using('System.3rdParty.ReCaptcha.recaptchalib'); +use Prado\TPropertyValue; /** * TReCaptcha class. @@ -53,7 +52,7 @@ Prado::using('System.3rdParty.ReCaptcha.recaptchalib'); * @package Prado\Web\UI\WebControls * @since 3.2 */ -class TReCaptcha extends TWebControl implements IValidatable +class TReCaptcha extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\Web\UI\IValidatable { private $_isValid=true; diff --git a/framework/Web/UI/WebControls/TReCaptchaValidator.php b/framework/Web/UI/WebControls/TReCaptchaValidator.php index 1486c34d..84856c5c 100644 --- a/framework/Web/UI/WebControls/TReCaptchaValidator.php +++ b/framework/Web/UI/WebControls/TReCaptchaValidator.php @@ -12,9 +12,6 @@ namespace Prado\Web\UI\WebControls; -Prado::using('System.Web.UI.WebControls.TBaseValidator'); -Prado::using('System.Web.UI.WebControls.TReCaptcha'); - /** * TReCaptchaValidator class * diff --git a/framework/Web/UI/WebControls/TReadOnlyDataSource.php b/framework/Web/UI/WebControls/TReadOnlyDataSource.php index 4af50348..9a73aed8 100644 --- a/framework/Web/UI/WebControls/TReadOnlyDataSource.php +++ b/framework/Web/UI/WebControls/TReadOnlyDataSource.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Exceptions\TInvalidDataTypeException; /** * TDataSourceControl class @@ -25,7 +26,7 @@ class TReadOnlyDataSource extends TDataSourceControl public function __construct($dataSource,$dataMember) { - if(!is_array($dataSource) && !($dataSource instanceof IDataSource) && !($dataSource instanceof Traversable)) + if(!is_array($dataSource) && !($dataSource instanceof IDataSource) && !($dataSource instanceof \Traversable)) throw new TInvalidDataTypeException('readonlydatasource_datasource_invalid'); $this->_dataSource=$dataSource; $this->_dataMember=$dataMember; diff --git a/framework/Web/UI/WebControls/TReadOnlyDataSourceView.php b/framework/Web/UI/WebControls/TReadOnlyDataSourceView.php index 9c01ba98..15d1914c 100644 --- a/framework/Web/UI/WebControls/TReadOnlyDataSourceView.php +++ b/framework/Web/UI/WebControls/TReadOnlyDataSourceView.php @@ -10,6 +10,8 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Exceptions\TInvalidDataTypeException; +use Prado\Collections\TMap; /** * TReadOnlyDataSourceView class @@ -27,7 +29,7 @@ class TReadOnlyDataSourceView extends TDataSourceView parent::__construct($owner,$viewName); if($dataSource===null || is_array($dataSource)) $this->_dataSource=new TMap($dataSource); - else if($dataSource instanceof Traversable) + else if($dataSource instanceof \Traversable) $this->_dataSource=$dataSource; else throw new TInvalidDataTypeException('readonlydatasourceview_datasource_invalid'); diff --git a/framework/Web/UI/WebControls/TRectangleHotSpot.php b/framework/Web/UI/WebControls/TRectangleHotSpot.php index 28cc420e..8815e3f8 100644 --- a/framework/Web/UI/WebControls/TRectangleHotSpot.php +++ b/framework/Web/UI/WebControls/TRectangleHotSpot.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * Class TRectangleHotSpot. diff --git a/framework/Web/UI/WebControls/TRegularExpressionValidator.php b/framework/Web/UI/WebControls/TRegularExpressionValidator.php index 720a6195..50e7b4e9 100644 --- a/framework/Web/UI/WebControls/TRegularExpressionValidator.php +++ b/framework/Web/UI/WebControls/TRegularExpressionValidator.php @@ -11,11 +11,6 @@ namespace Prado\Web\UI\WebControls; -/** - * Using TBaseValidator class - */ -Prado::using('System.Web.UI.WebControls.TBaseValidator'); - /** * TRegularExpressionValidator class * diff --git a/framework/Web/UI/WebControls/TRepeatDirection.php b/framework/Web/UI/WebControls/TRepeatDirection.php index fae128f7..b21954fe 100644 --- a/framework/Web/UI/WebControls/TRepeatDirection.php +++ b/framework/Web/UI/WebControls/TRepeatDirection.php @@ -24,7 +24,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TRepeatDirection extends TEnumerable +class TRepeatDirection extends \Prado\TEnumerable { const Vertical='Vertical'; const Horizontal='Horizontal'; diff --git a/framework/Web/UI/WebControls/TRepeatInfo.php b/framework/Web/UI/WebControls/TRepeatInfo.php index c32d9d72..b90fa0d5 100644 --- a/framework/Web/UI/WebControls/TRepeatInfo.php +++ b/framework/Web/UI/WebControls/TRepeatInfo.php @@ -10,6 +10,8 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; +use Prado\Exceptions\TInvalidDataValueException; /** * TRepeatInfo class. diff --git a/framework/Web/UI/WebControls/TRepeatLayout.php b/framework/Web/UI/WebControls/TRepeatLayout.php index 8fec77de..e432438a 100644 --- a/framework/Web/UI/WebControls/TRepeatLayout.php +++ b/framework/Web/UI/WebControls/TRepeatLayout.php @@ -25,7 +25,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TRepeatLayout extends TEnumerable +class TRepeatLayout extends \Prado\TEnumerable { const Table='Table'; const Flow='Flow'; diff --git a/framework/Web/UI/WebControls/TRepeater.php b/framework/Web/UI/WebControls/TRepeater.php index 10ca69a0..d22a66ed 100644 --- a/framework/Web/UI/WebControls/TRepeater.php +++ b/framework/Web/UI/WebControls/TRepeater.php @@ -10,12 +10,10 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Using TDataBoundControl and TDataFieldAccessor cass - */ -Prado::using('System.Web.UI.WebControls.TDataBoundControl'); -Prado::using('System.Util.TDataFieldAccessor'); +use Prado\Exceptions\TInvalidDataTypeException; +use Prado\Exceptions\TInvalidDataValueException; +use Prado\Collections\TMap; +use Prado\Collections\TList; /** * TRepeater class. @@ -36,7 +34,7 @@ Prado::using('System.Util.TDataFieldAccessor'); * as an external template (in fact, it can also be non-templated controls). * * A renderer can be any control class. - * - If the class implements {@link IDataRenderer}, the Data + * - If the class implements {@link \Prado\IDataRenderer}, the Data * property will be set as the data row during databinding. Many PRADO controls * implement this interface, such as {@link TLabel}, {@link TTextBox}, etc. * - If the class implements {@link IItemDataRenderer}, the ItemIndex property will be set @@ -91,7 +89,7 @@ Prado::using('System.Util.TDataFieldAccessor'); * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TRepeater extends TDataBoundControl implements INamingContainer +class TRepeater extends TDataBoundControl implements \Prado\Web\UI\INamingContainer { /** * Repeater item types @@ -300,7 +298,7 @@ class TRepeater extends TDataBoundControl implements INamingContainer */ public function setItemTemplate($value) { - if($value instanceof ITemplate || $value===null) + if($value instanceof \Prado\Web\UI\ITemplate || $value===null) $this->_itemTemplate=$value; else throw new TInvalidDataTypeException('repeater_template_required','ItemTemplate'); @@ -320,7 +318,7 @@ class TRepeater extends TDataBoundControl implements INamingContainer */ public function setAlternatingItemTemplate($value) { - if($value instanceof ITemplate || $value===null) + if($value instanceof \Prado\Web\UI\ITemplate || $value===null) $this->_alternatingItemTemplate=$value; else throw new TInvalidDataTypeException('repeater_template_required','AlternatingItemTemplate'); @@ -340,7 +338,7 @@ class TRepeater extends TDataBoundControl implements INamingContainer */ public function setHeaderTemplate($value) { - if($value instanceof ITemplate || $value===null) + if($value instanceof \Prado\Web\UI\ITemplate || $value===null) $this->_headerTemplate=$value; else throw new TInvalidDataTypeException('repeater_template_required','HeaderTemplate'); @@ -360,7 +358,7 @@ class TRepeater extends TDataBoundControl implements INamingContainer */ public function setFooterTemplate($value) { - if($value instanceof ITemplate || $value===null) + if($value instanceof \Prado\Web\UI\ITemplate || $value===null) $this->_footerTemplate=$value; else throw new TInvalidDataTypeException('repeater_template_required','FooterTemplate'); @@ -380,7 +378,7 @@ class TRepeater extends TDataBoundControl implements INamingContainer */ public function setEmptyTemplate($value) { - if($value instanceof ITemplate || $value===null) + if($value instanceof \Prado\Web\UI\ITemplate || $value===null) $this->_emptyTemplate=$value; else throw new TInvalidDataTypeException('repeater_template_required','EmptyTemplate'); @@ -400,7 +398,7 @@ class TRepeater extends TDataBoundControl implements INamingContainer */ public function setSeparatorTemplate($value) { - if($value instanceof ITemplate || $value===null) + if($value instanceof \Prado\Web\UI\ITemplate || $value===null) $this->_separatorTemplate=$value; else throw new TInvalidDataTypeException('repeater_template_required','SeparatorTemplate'); @@ -494,7 +492,7 @@ class TRepeater extends TDataBoundControl implements INamingContainer if(($item=$this->createItem($itemIndex,$itemType))!==null) { $param=new TRepeaterItemEventParameter($item); - if($item instanceof IDataRenderer) + if($item instanceof \Prado\IDataRenderer) $item->setData($dataItem); $this->onItemCreated($param); $this->getControls()->add($item); diff --git a/framework/Web/UI/WebControls/TRepeaterCommandEventParameter.php b/framework/Web/UI/WebControls/TRepeaterCommandEventParameter.php index c41f8486..e6e9d240 100644 --- a/framework/Web/UI/WebControls/TRepeaterCommandEventParameter.php +++ b/framework/Web/UI/WebControls/TRepeaterCommandEventParameter.php @@ -25,7 +25,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TRepeaterCommandEventParameter extends TCommandEventParameter +class TRepeaterCommandEventParameter extends \Prado\Web\UI\TCommandEventParameter { /** * @var TControl the repeater item control responsible for the event. @@ -40,9 +40,9 @@ class TRepeaterCommandEventParameter extends TCommandEventParameter * Constructor. * @param TControl repeater item responsible for the event * @param TControl original event sender - * @param TCommandEventParameter original event parameter + * @param \Prado\Web\UI\TCommandEventParameter original event parameter */ - public function __construct($item,$source,TCommandEventParameter $param) + public function __construct($item,$source,\Prado\Web\UI\TCommandEventParameter $param) { $this->_item=$item; $this->_source=$source; diff --git a/framework/Web/UI/WebControls/TRepeaterItem.php b/framework/Web/UI/WebControls/TRepeaterItem.php index 24b3804d..23e00619 100644 --- a/framework/Web/UI/WebControls/TRepeaterItem.php +++ b/framework/Web/UI/WebControls/TRepeaterItem.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TRepeaterItem class @@ -24,7 +25,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TRepeaterItem extends TControl implements INamingContainer, IItemDataRenderer +class TRepeaterItem extends \Prado\Web\UI\TControl implements \Prado\Web\UI\INamingContainer, IItemDataRenderer { /** * index of the data item in the Items collection of repeater @@ -124,7 +125,7 @@ class TRepeaterItem extends TControl implements INamingContainer, IItemDataRende */ public function bubbleEvent($sender,$param) { - if($param instanceof TCommandEventParameter) + if($param instanceof \Prado\Web\UI\TCommandEventParameter) { $this->raiseBubbleEvent($this,new TRepeaterCommandEventParameter($this,$sender,$param)); return true; diff --git a/framework/Web/UI/WebControls/TRepeaterItemCollection.php b/framework/Web/UI/WebControls/TRepeaterItemCollection.php index 35715757..1f3a49af 100644 --- a/framework/Web/UI/WebControls/TRepeaterItemCollection.php +++ b/framework/Web/UI/WebControls/TRepeaterItemCollection.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Exceptions\TInvalidDataTypeException; /** * TRepeaterItemCollection class. @@ -20,7 +21,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TRepeaterItemCollection extends TList +class TRepeaterItemCollection extends \Prado\Collections\TList { /** * Inserts an item at the specified position. @@ -31,7 +32,7 @@ class TRepeaterItemCollection extends TList */ public function insertAt($index,$item) { - if($item instanceof TControl) + if($item instanceof \Prado\Web\UI\TControl) parent::insertAt($index,$item); else throw new TInvalidDataTypeException('repeateritemcollection_item_invalid'); diff --git a/framework/Web/UI/WebControls/TRepeaterItemRenderer.php b/framework/Web/UI/WebControls/TRepeaterItemRenderer.php index 2c2aea22..68931449 100644 --- a/framework/Web/UI/WebControls/TRepeaterItemRenderer.php +++ b/framework/Web/UI/WebControls/TRepeaterItemRenderer.php @@ -11,9 +11,6 @@ namespace Prado\Web\UI\WebControls; -Prado::using('System.Web.UI.WebControls.TRepeater'); -Prado::using('System.Web.UI.WebControls.TItemDataRenderer'); - /** * TRepeaterItemRenderer class * @@ -38,7 +35,7 @@ class TRepeaterItemRenderer extends TItemDataRenderer */ public function bubbleEvent($sender,$param) { - if($param instanceof TCommandEventParameter) + if($param instanceof \Prado\Web\UI\TCommandEventParameter) { $this->raiseBubbleEvent($this,new TRepeaterCommandEventParameter($this,$sender,$param)); return true; diff --git a/framework/Web/UI/WebControls/TRequiredFieldValidator.php b/framework/Web/UI/WebControls/TRequiredFieldValidator.php index 1b2f8839..7babe095 100644 --- a/framework/Web/UI/WebControls/TRequiredFieldValidator.php +++ b/framework/Web/UI/WebControls/TRequiredFieldValidator.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Using TBaseValidator class - */ -Prado::using('System.Web.UI.WebControls.TBaseValidator'); +use Prado\TPropertyValue; /** * TRequiredFieldValidator class diff --git a/framework/Web/UI/WebControls/TSafeHtml.php b/framework/Web/UI/WebControls/TSafeHtml.php index d5641119..1edce6de 100644 --- a/framework/Web/UI/WebControls/TSafeHtml.php +++ b/framework/Web/UI/WebControls/TSafeHtml.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TSafeHtml class @@ -38,7 +39,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TSafeHtml extends TControl +class TSafeHtml extends \Prado\Web\UI\TControl { /** * Sets whether to parse the contents as UTF-7. This property enables a routine diff --git a/framework/Web/UI/WebControls/TScrollBars.php b/framework/Web/UI/WebControls/TScrollBars.php index 54621bb2..cd8ceba1 100644 --- a/framework/Web/UI/WebControls/TScrollBars.php +++ b/framework/Web/UI/WebControls/TScrollBars.php @@ -27,7 +27,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TScrollBars extends TEnumerable +class TScrollBars extends \Prado\TEnumerable { const None='None'; const Auto='Auto'; diff --git a/framework/Web/UI/WebControls/TServerValidateEventParameter.php b/framework/Web/UI/WebControls/TServerValidateEventParameter.php index cc1f30f3..faac5750 100644 --- a/framework/Web/UI/WebControls/TServerValidateEventParameter.php +++ b/framework/Web/UI/WebControls/TServerValidateEventParameter.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TServerValidateEventParameter class diff --git a/framework/Web/UI/WebControls/TSlider.php b/framework/Web/UI/WebControls/TSlider.php index d516efe7..df36c9a8 100644 --- a/framework/Web/UI/WebControls/TSlider.php +++ b/framework/Web/UI/WebControls/TSlider.php @@ -11,6 +11,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TSlider class @@ -46,7 +47,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.1.1 */ -class TSlider extends TWebControl implements IPostBackDataHandler, IDataRenderer +class TSlider extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\Web\UI\IPostBackDataHandler, \Prado\IDataRenderer { const MAX_STEPS=200; /** @@ -179,7 +180,7 @@ class TSlider extends TWebControl implements IPostBackDataHandler, IDataRenderer /** * Returns the value of the TSlider control. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link getValue()}. * @return string the value of the TSlider control. * @see getValue @@ -191,7 +192,7 @@ class TSlider extends TWebControl implements IPostBackDataHandler, IDataRenderer /** * Sets the value of the TSlider control. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link setValue()}. * @param string the value of the TSlider control. * @see setValue @@ -252,7 +253,7 @@ class TSlider extends TWebControl implements IPostBackDataHandler, IDataRenderer /** * Returns a value indicating whether postback has caused the control data change. - * This method is required by the IPostBackDataHandler interface. + * This method is required by the \Prado\Web\UI\IPostBackDataHandler interface. * @return boolean whether postback has caused the control data change. False if the page is not in postback mode. */ public function getDataChanged() @@ -262,7 +263,7 @@ class TSlider extends TWebControl implements IPostBackDataHandler, IDataRenderer /** * Raises postdata changed event. - * This method is required by {@link IPostBackDataHandler} interface. + * This method is required by {@link \Prado\Web\UI\IPostBackDataHandler} interface. * It is invoked by the framework when {@link getValue Value} property * is changed on postback. * This method is primarly used by framework developers. diff --git a/framework/Web/UI/WebControls/TSliderDirection.php b/framework/Web/UI/WebControls/TSliderDirection.php index 7f5ed1fb..264a30fd 100644 --- a/framework/Web/UI/WebControls/TSliderDirection.php +++ b/framework/Web/UI/WebControls/TSliderDirection.php @@ -25,7 +25,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.1.1 */ -class TSliderDirection extends TEnumerable +class TSliderDirection extends \Prado\TEnumerable { const Horizontal='Horizontal'; const Vertical='Vertical'; diff --git a/framework/Web/UI/WebControls/TStatements.php b/framework/Web/UI/WebControls/TStatements.php index b605f27d..477b2c8d 100644 --- a/framework/Web/UI/WebControls/TStatements.php +++ b/framework/Web/UI/WebControls/TStatements.php @@ -27,7 +27,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TStatements extends TControl +class TStatements extends \Prado\Web\UI\TControl { /** * @var string PHP statements diff --git a/framework/Web/UI/WebControls/TStyle.php b/framework/Web/UI/WebControls/TStyle.php index 04fac62d..6e4cf826 100644 --- a/framework/Web/UI/WebControls/TStyle.php +++ b/framework/Web/UI/WebControls/TStyle.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TFont definition - */ -Prado::using('System.Web.UI.WebControls.TFont'); +use Prado\TPropertyValue; /** * TStyle class diff --git a/framework/Web/UI/WebControls/TStyleSheet.php b/framework/Web/UI/WebControls/TStyleSheet.php index b77adc0c..8f097acb 100644 --- a/framework/Web/UI/WebControls/TStyleSheet.php +++ b/framework/Web/UI/WebControls/TStyleSheet.php @@ -27,7 +27,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.2 */ -class TStyleSheet extends TControl +class TStyleSheet extends \Prado\Web\UI\TControl { /** * @param string URL to the stylesheet file diff --git a/framework/Web/UI/WebControls/TTabPanel.php b/framework/Web/UI/WebControls/TTabPanel.php index dd920124..97337fee 100644 --- a/framework/Web/UI/WebControls/TTabPanel.php +++ b/framework/Web/UI/WebControls/TTabPanel.php @@ -11,6 +11,8 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; +use Prado\Exceptions\TInvalidDataValueException; /** * Class TTabPanel. @@ -58,7 +60,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.1.1 */ -class TTabPanel extends TWebControl implements IPostBackDataHandler +class TTabPanel extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\Web\UI\IPostBackDataHandler { private $_dataChanged=false; @@ -353,7 +355,7 @@ class TTabPanel extends TWebControl implements IPostBackDataHandler /** * Raises postdata changed event. - * This method is required by {@link IPostBackDataHandler} interface. + * This method is required by {@link \Prado\Web\UI\IPostBackDataHandler} interface. * It is invoked by the framework when {@link getActiveViewIndex ActiveViewIndex} property * is changed on postback. * This method is primarly used by framework developers. @@ -365,7 +367,7 @@ class TTabPanel extends TWebControl implements IPostBackDataHandler /** * Returns a value indicating whether postback has caused the control data change. - * This method is required by the IPostBackDataHandler interface. + * This method is required by the \Prado\Web\UI\IPostBackDataHandler interface. * @return boolean whether postback has caused the control data change. False if the page is not in postback mode. */ public function getDataChanged() diff --git a/framework/Web/UI/WebControls/TTabView.php b/framework/Web/UI/WebControls/TTabView.php index 1cf1d2c1..f8c52fc0 100644 --- a/framework/Web/UI/WebControls/TTabView.php +++ b/framework/Web/UI/WebControls/TTabView.php @@ -11,6 +11,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TTabView class. @@ -33,7 +34,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.1.1 */ -class TTabView extends TWebControl +class TTabView extends \Prado\Web\UI\WebControls\TWebControl { private $_active=false; diff --git a/framework/Web/UI/WebControls/TTabViewCollection.php b/framework/Web/UI/WebControls/TTabViewCollection.php index 6e4b181f..3957462e 100644 --- a/framework/Web/UI/WebControls/TTabViewCollection.php +++ b/framework/Web/UI/WebControls/TTabViewCollection.php @@ -11,6 +11,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Exceptions\TInvalidDataTypeException; /** * TTabViewCollection class. @@ -21,7 +22,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.1.1 */ -class TTabViewCollection extends TControlCollection +class TTabViewCollection extends \Prado\Web\UI\TControlCollection { /** * Inserts an item at the specified position. diff --git a/framework/Web/UI/WebControls/TTable.php b/framework/Web/UI/WebControls/TTable.php index 47e2c85e..b189e058 100644 --- a/framework/Web/UI/WebControls/TTable.php +++ b/framework/Web/UI/WebControls/TTable.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TTableRow class - */ -Prado::using('System.Web.UI.WebControls.TTableRow'); +use Prado\TPropertyValue; /** * TTable class @@ -65,7 +61,7 @@ Prado::using('System.Web.UI.WebControls.TTableRow'); * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TTable extends TWebControl +class TTable extends \Prado\Web\UI\WebControls\TWebControl { /** * @return string tag name for the table diff --git a/framework/Web/UI/WebControls/TTableCaptionAlign.php b/framework/Web/UI/WebControls/TTableCaptionAlign.php index 3e6241c0..15b6ef83 100644 --- a/framework/Web/UI/WebControls/TTableCaptionAlign.php +++ b/framework/Web/UI/WebControls/TTableCaptionAlign.php @@ -27,7 +27,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TTableCaptionAlign extends TEnumerable +class TTableCaptionAlign extends \Prado\TEnumerable { const NotSet='NotSet'; const Top='Top'; diff --git a/framework/Web/UI/WebControls/TTableCell.php b/framework/Web/UI/WebControls/TTableCell.php index a61e1000..ede0e04c 100644 --- a/framework/Web/UI/WebControls/TTableCell.php +++ b/framework/Web/UI/WebControls/TTableCell.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TTableCell class. @@ -32,7 +33,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TTableCell extends TWebControl implements IDataRenderer +class TTableCell extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\IDataRenderer { /** * @return string tag name for the table cell @@ -168,7 +169,7 @@ class TTableCell extends TWebControl implements IDataRenderer /** * Returns the text content of the table cell. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link getText()}. * @return string the text content of the table cell. * @see getText @@ -181,7 +182,7 @@ class TTableCell extends TWebControl implements IDataRenderer /** * Sets the text content of the table cell. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link setText()}. * @param string the text content of the table cell. * @see setText diff --git a/framework/Web/UI/WebControls/TTableCellCollection.php b/framework/Web/UI/WebControls/TTableCellCollection.php index c8045259..d49e559a 100644 --- a/framework/Web/UI/WebControls/TTableCellCollection.php +++ b/framework/Web/UI/WebControls/TTableCellCollection.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Exceptions\TInvalidDataTypeException; /** * TTableCellCollection class. @@ -20,7 +21,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TTableCellCollection extends TControlCollection +class TTableCellCollection extends \Prado\Web\UI\TControlCollection { /** * Inserts an item at the specified position. diff --git a/framework/Web/UI/WebControls/TTableFooterRow.php b/framework/Web/UI/WebControls/TTableFooterRow.php index 398d2ebd..2414c613 100644 --- a/framework/Web/UI/WebControls/TTableFooterRow.php +++ b/framework/Web/UI/WebControls/TTableFooterRow.php @@ -11,11 +11,6 @@ namespace Prado\Web\UI\WebControls; -/** - * Includes TTableRow class. - */ -Prado::using('System.Web.UI.WebControls.TTableRow'); - /** * TTableFooterRow class. * diff --git a/framework/Web/UI/WebControls/TTableGridLines.php b/framework/Web/UI/WebControls/TTableGridLines.php index 4ab01a19..9d43e8b0 100644 --- a/framework/Web/UI/WebControls/TTableGridLines.php +++ b/framework/Web/UI/WebControls/TTableGridLines.php @@ -25,7 +25,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TTableGridLines extends TEnumerable +class TTableGridLines extends \Prado\TEnumerable { const None='None'; const Horizontal='Horizontal'; diff --git a/framework/Web/UI/WebControls/TTableHeaderCell.php b/framework/Web/UI/WebControls/TTableHeaderCell.php index dbe02452..22574eee 100644 --- a/framework/Web/UI/WebControls/TTableHeaderCell.php +++ b/framework/Web/UI/WebControls/TTableHeaderCell.php @@ -10,12 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TTableCell class - */ -Prado::using('System.Web.UI.WebControls.TTableCell'); - +use Prado\TPropertyValue; /** * TTableHeaderCell class. diff --git a/framework/Web/UI/WebControls/TTableHeaderRow.php b/framework/Web/UI/WebControls/TTableHeaderRow.php index 07f90cf8..d6ca6146 100644 --- a/framework/Web/UI/WebControls/TTableHeaderRow.php +++ b/framework/Web/UI/WebControls/TTableHeaderRow.php @@ -11,11 +11,6 @@ namespace Prado\Web\UI\WebControls; -/** - * Includes TTableRow class. - */ -Prado::using('System.Web.UI.WebControls.TTableRow'); - /** * TTableHeaderRow class. * diff --git a/framework/Web/UI/WebControls/TTableHeaderScope.php b/framework/Web/UI/WebControls/TTableHeaderScope.php index 0a9e2e0c..f3c8ccba 100644 --- a/framework/Web/UI/WebControls/TTableHeaderScope.php +++ b/framework/Web/UI/WebControls/TTableHeaderScope.php @@ -24,7 +24,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TTableHeaderScope extends TEnumerable +class TTableHeaderScope extends \Prado\TEnumerable { const NotSet='NotSet'; const Row='Row'; diff --git a/framework/Web/UI/WebControls/TTableItemStyle.php b/framework/Web/UI/WebControls/TTableItemStyle.php index c8838a31..acf58bd7 100644 --- a/framework/Web/UI/WebControls/TTableItemStyle.php +++ b/framework/Web/UI/WebControls/TTableItemStyle.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TTableItemStyle class. diff --git a/framework/Web/UI/WebControls/TTableRow.php b/framework/Web/UI/WebControls/TTableRow.php index c1d871ba..89988d9e 100644 --- a/framework/Web/UI/WebControls/TTableRow.php +++ b/framework/Web/UI/WebControls/TTableRow.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TTableCell class - */ -Prado::using('System.Web.UI.WebControls.TTableCell'); +use Prado\TPropertyValue; /** * TTableRow class. @@ -28,7 +24,7 @@ Prado::using('System.Web.UI.WebControls.TTableCell'); * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TTableRow extends TWebControl +class TTableRow extends \Prado\Web\UI\WebControls\TWebControl { /** * @return string tag name for the table diff --git a/framework/Web/UI/WebControls/TTableRowCollection.php b/framework/Web/UI/WebControls/TTableRowCollection.php index 01951f15..54aefac8 100644 --- a/framework/Web/UI/WebControls/TTableRowCollection.php +++ b/framework/Web/UI/WebControls/TTableRowCollection.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Exceptions\TInvalidDataTypeException; /** * TTableRowCollection class. @@ -20,7 +21,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TTableRowCollection extends TControlCollection +class TTableRowCollection extends \Prado\Web\UI\TControlCollection { /** * Inserts an item at the specified position. diff --git a/framework/Web/UI/WebControls/TTableRowSection.php b/framework/Web/UI/WebControls/TTableRowSection.php index 04353d8a..2cbe8625 100644 --- a/framework/Web/UI/WebControls/TTableRowSection.php +++ b/framework/Web/UI/WebControls/TTableRowSection.php @@ -25,7 +25,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TTableRowSection extends TEnumerable +class TTableRowSection extends \Prado\TEnumerable { const Header='Header'; const Body='Body'; diff --git a/framework/Web/UI/WebControls/TTableStyle.php b/framework/Web/UI/WebControls/TTableStyle.php index 41960938..97d91531 100644 --- a/framework/Web/UI/WebControls/TTableStyle.php +++ b/framework/Web/UI/WebControls/TTableStyle.php @@ -10,6 +10,8 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; +use Prado\Exceptions\TInvalidDataValueException; /** * TTableStyle class. diff --git a/framework/Web/UI/WebControls/TTemplateColumn.php b/framework/Web/UI/WebControls/TTemplateColumn.php index ee000a04..b0b7167a 100644 --- a/framework/Web/UI/WebControls/TTemplateColumn.php +++ b/framework/Web/UI/WebControls/TTemplateColumn.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * TDataGridColumn class file - */ -Prado::using('System.Web.UI.WebControls.TDataGridColumn'); +use Prado\Exceptions\TInvalidDataTypeException; /** * TTemplateColumn class @@ -63,7 +59,7 @@ class TTemplateColumn extends TDataGridColumn * * If not empty, the class will be used to instantiate as a child control in the item cells of the column. * - * If the class implements {@link IDataRenderer}, the Data property + * If the class implements {@link \Prado\IDataRenderer}, the Data property * will be set as the row of the data associated with the datagrid item that this cell resides in. * * @param string the renderer class name in namespace format. @@ -88,7 +84,7 @@ class TTemplateColumn extends TDataGridColumn * * If not empty, the class will be used to instantiate as a child control in the item cell that is in edit mode. * - * If the class implements {@link IDataRenderer}, the Data property + * If the class implements {@link \Prado\IDataRenderer}, the Data property * will be set as the row of the data associated with the datagrid item that this cell resides in. * * @param string the renderer class name in namespace format. @@ -214,7 +210,7 @@ class TTemplateColumn extends TDataGridColumn $control->setItemIndex($cell->getParent()->getItemIndex()); $control->setItemType($itemType); } - if($control instanceof IDataRenderer) + if($control instanceof \Prado\IDataRenderer) $control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); } else if($template!==null) diff --git a/framework/Web/UI/WebControls/TTemplatedWizardStep.php b/framework/Web/UI/WebControls/TTemplatedWizardStep.php index 91babd3a..c887d153 100644 --- a/framework/Web/UI/WebControls/TTemplatedWizardStep.php +++ b/framework/Web/UI/WebControls/TTemplatedWizardStep.php @@ -24,7 +24,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TTemplatedWizardStep extends TWizardStep implements INamingContainer +class TTemplatedWizardStep extends TWizardStep implements \Prado\Web\UI\INamingContainer { /** * @var ITemplate the template for displaying the navigation UI of a wizard step. diff --git a/framework/Web/UI/WebControls/TTextAlign.php b/framework/Web/UI/WebControls/TTextAlign.php index b4cdec2f..dbca28a6 100644 --- a/framework/Web/UI/WebControls/TTextAlign.php +++ b/framework/Web/UI/WebControls/TTextAlign.php @@ -23,7 +23,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TTextAlign extends TEnumerable +class TTextAlign extends \Prado\TEnumerable { const Left='Left'; const Right='Right'; diff --git a/framework/Web/UI/WebControls/TTextBox.php b/framework/Web/UI/WebControls/TTextBox.php index 05495543..14a333e8 100644 --- a/framework/Web/UI/WebControls/TTextBox.php +++ b/framework/Web/UI/WebControls/TTextBox.php @@ -10,6 +10,9 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; +use Prado\Web\THttpUtility; +use Prado\Exceptions\TInvalidDataValueException; /** * TTextBox class @@ -48,7 +51,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable, IDataRenderer +class TTextBox extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\Web\UI\IPostBackDataHandler, \Prado\Web\UI\IValidatable, \Prado\IDataRenderer { /** * Default number of rows (for MultiLine text box) @@ -228,7 +231,7 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable /** * Returns a value indicating whether postback has caused the control data change. - * This method is required by the IPostBackDataHandler interface. + * This method is required by the \Prado\Web\UI\IPostBackDataHandler interface. * @return boolean whether postback has caused the control data change. False if the page is not in postback mode. */ public function getDataChanged() @@ -238,7 +241,7 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable /** * Returns the value to be validated. - * This methid is required by IValidatable interface. + * This methid is required by \Prado\Web\UI\IValidatable interface. * @return mixed the value of the property to be validated. */ public function getValidationPropertyValue() @@ -278,7 +281,7 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable /** * Raises postdata changed event. - * This method is required by {@link IPostBackDataHandler} interface. + * This method is required by {@link \Prado\Web\UI\IPostBackDataHandler} interface. * It is invoked by the framework when {@link getText Text} property * is changed on postback. * This method is primarly used by framework developers. @@ -486,7 +489,7 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable /** * Returns the text content of the TTextBox control. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link getText()}. * @return string the text content of the TTextBox control. * @see getText @@ -499,7 +502,7 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable /** * Sets the text content of the TTextBox control. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link setText()}. * @param string the text content of the TTextBox control. * @see setText diff --git a/framework/Web/UI/WebControls/TTextBoxAutoCompleteType.php b/framework/Web/UI/WebControls/TTextBoxAutoCompleteType.php index 50bfa57c..d1080e6c 100644 --- a/framework/Web/UI/WebControls/TTextBoxAutoCompleteType.php +++ b/framework/Web/UI/WebControls/TTextBoxAutoCompleteType.php @@ -20,7 +20,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TTextBoxAutoCompleteType extends TEnumerable +class TTextBoxAutoCompleteType extends \Prado\TEnumerable { const BusinessCity='BusinessCity'; const BusinessCountryRegion='BusinessCountryRegion'; diff --git a/framework/Web/UI/WebControls/TTextBoxMode.php b/framework/Web/UI/WebControls/TTextBoxMode.php index 287cefe1..0f8c15bf 100644 --- a/framework/Web/UI/WebControls/TTextBoxMode.php +++ b/framework/Web/UI/WebControls/TTextBoxMode.php @@ -25,7 +25,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TTextBoxMode extends TEnumerable +class TTextBoxMode extends \Prado\TEnumerable { const SingleLine='SingleLine'; const MultiLine='MultiLine'; diff --git a/framework/Web/UI/WebControls/TTextHighlighter.php b/framework/Web/UI/WebControls/TTextHighlighter.php index 969b00a1..ea4e92ec 100644 --- a/framework/Web/UI/WebControls/TTextHighlighter.php +++ b/framework/Web/UI/WebControls/TTextHighlighter.php @@ -10,10 +10,26 @@ */ namespace Prado\Web\UI\WebControls; - -Prado::using('System.3rdParty.TextHighlighter.Text.Highlighter',false); -Prado::using('System.3rdParty.TextHighlighter.Text.Highlighter.Renderer.Html',false); -Prado::using('System.Web.UI.WebControls.TTextProcessor'); +use Prado\TPropertyValue; +use Prado\Prado; + +// BC trick : only define constants if Text/Highlighter.php +// is not yet included +if (!defined('HL_NUMBERS_LI')) { + /**#@+ + * Constant for use with $options['numbers'] + */ + /** + * use numbered list, deprecated, use HL_NUMBERS_OL instaed + * @deprecated + */ + define ('HL_NUMBERS_LI' , 1); + /** + * Use 2-column table with line numbers in left column and code in right column. + */ + define ('HL_NUMBERS_TABLE' , 2); + /**#@-*/ +} /** @@ -149,7 +165,7 @@ class TTextHighlighter extends TTextProcessor protected function registerStyleSheet() { $cs=$this->getPage()->getClientScript(); - $cssFile=Prado::getPathOfNamespace('System.3rdParty.TextHighlighter.highlight','.css'); + $cssFile=Prado::getPathOfNamespace('Prado\\3rdParty\\TextHighlighter\\highlight','.css'); $cssKey='prado:TTextHighlighter:'.$cssFile; if(!$cs->isStyleSheetFileRegistered($cssKey)) $cs->registerStyleSheetFile($cssKey, $this->publishFilePath($cssFile)); @@ -165,9 +181,9 @@ class TTextHighlighter extends TTextProcessor { try { - $highlighter=Text_Highlighter::factory($this->getLanguage()); + $highlighter=\Prado\3rdParty\TextHighlighter\Text\Highlighter::factory($this->getLanguage()); } - catch(Exception $e) + catch(\Exception $e) { $highlighter=false; } diff --git a/framework/Web/UI/WebControls/TTextHighlighterLineNumberStyle.php b/framework/Web/UI/WebControls/TTextHighlighterLineNumberStyle.php index 3fae9048..0e79464e 100644 --- a/framework/Web/UI/WebControls/TTextHighlighterLineNumberStyle.php +++ b/framework/Web/UI/WebControls/TTextHighlighterLineNumberStyle.php @@ -16,7 +16,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TTextHighlighterLineNumberStyle extends TEnumerable +class TTextHighlighterLineNumberStyle extends \Prado\TEnumerable { const Li='Li'; const Table='Table'; diff --git a/framework/Web/UI/WebControls/TTextProcessor.php b/framework/Web/UI/WebControls/TTextProcessor.php index 4e2cfd1e..1ea764d7 100644 --- a/framework/Web/UI/WebControls/TTextProcessor.php +++ b/framework/Web/UI/WebControls/TTextProcessor.php @@ -10,6 +10,8 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Prado; +use Prado\IO\TTextWriter; /** * TTextProcessor class. @@ -27,7 +29,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.1 */ -abstract class TTextProcessor extends TWebControl +abstract class TTextProcessor extends \Prado\Web\UI\WebControls\TWebControl { /** * Processes a text string. diff --git a/framework/Web/UI/WebControls/TValidationCompareOperator.php b/framework/Web/UI/WebControls/TValidationCompareOperator.php index 342aaaba..8f7999e4 100644 --- a/framework/Web/UI/WebControls/TValidationCompareOperator.php +++ b/framework/Web/UI/WebControls/TValidationCompareOperator.php @@ -28,7 +28,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TValidationCompareOperator extends TEnumerable +class TValidationCompareOperator extends \Prado\TEnumerable { const Equal='Equal'; const NotEqual='NotEqual'; diff --git a/framework/Web/UI/WebControls/TValidationDataType.php b/framework/Web/UI/WebControls/TValidationDataType.php index 6464e736..29a92a79 100644 --- a/framework/Web/UI/WebControls/TValidationDataType.php +++ b/framework/Web/UI/WebControls/TValidationDataType.php @@ -26,7 +26,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TValidationDataType extends TEnumerable +class TValidationDataType extends \Prado\TEnumerable { const Integer='Integer'; const Float='Float'; diff --git a/framework/Web/UI/WebControls/TValidationSummary.php b/framework/Web/UI/WebControls/TValidationSummary.php index 4e43b819..64570356 100644 --- a/framework/Web/UI/WebControls/TValidationSummary.php +++ b/framework/Web/UI/WebControls/TValidationSummary.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TValidationSummary class @@ -34,7 +35,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TValidationSummary extends TWebControl +class TValidationSummary extends \Prado\Web\UI\WebControls\TWebControl { /** * @var TClientSideValidationSummaryOptions validation client side options. diff --git a/framework/Web/UI/WebControls/TValidationSummaryDisplayMode.php b/framework/Web/UI/WebControls/TValidationSummaryDisplayMode.php index e95e07de..bee97410 100644 --- a/framework/Web/UI/WebControls/TValidationSummaryDisplayMode.php +++ b/framework/Web/UI/WebControls/TValidationSummaryDisplayMode.php @@ -26,7 +26,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TValidationSummaryDisplayMode extends TEnumerable +class TValidationSummaryDisplayMode extends \Prado\TEnumerable { const SimpleList='SimpleList'; const SingleParagraph='SingleParagraph'; diff --git a/framework/Web/UI/WebControls/TValidationSummaryDisplayStyle.php b/framework/Web/UI/WebControls/TValidationSummaryDisplayStyle.php index 2d8c9f67..c5ecb563 100644 --- a/framework/Web/UI/WebControls/TValidationSummaryDisplayStyle.php +++ b/framework/Web/UI/WebControls/TValidationSummaryDisplayStyle.php @@ -25,7 +25,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TValidationSummaryDisplayStyle extends TEnumerable +class TValidationSummaryDisplayStyle extends \Prado\TEnumerable { const None='None'; const Dynamic='Dynamic'; diff --git a/framework/Web/UI/WebControls/TValidatorClientSide.php b/framework/Web/UI/WebControls/TValidatorClientSide.php index 45a01ef2..c5b87c18 100644 --- a/framework/Web/UI/WebControls/TValidatorClientSide.php +++ b/framework/Web/UI/WebControls/TValidatorClientSide.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TValidatorClientSide class. diff --git a/framework/Web/UI/WebControls/TValidatorDisplayStyle.php b/framework/Web/UI/WebControls/TValidatorDisplayStyle.php index d0ccf210..6dec4413 100644 --- a/framework/Web/UI/WebControls/TValidatorDisplayStyle.php +++ b/framework/Web/UI/WebControls/TValidatorDisplayStyle.php @@ -25,7 +25,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TValidatorDisplayStyle extends TEnumerable +class TValidatorDisplayStyle extends \Prado\TEnumerable { const None='None'; const Dynamic='Dynamic'; diff --git a/framework/Web/UI/WebControls/TVerticalAlign.php b/framework/Web/UI/WebControls/TVerticalAlign.php index 5523784a..5d32d26f 100644 --- a/framework/Web/UI/WebControls/TVerticalAlign.php +++ b/framework/Web/UI/WebControls/TVerticalAlign.php @@ -25,7 +25,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TVerticalAlign extends TEnumerable +class TVerticalAlign extends \Prado\TEnumerable { const NotSet='NotSet'; const Top='Top'; diff --git a/framework/Web/UI/WebControls/TView.php b/framework/Web/UI/WebControls/TView.php index 5d87bf06..307a0838 100644 --- a/framework/Web/UI/WebControls/TView.php +++ b/framework/Web/UI/WebControls/TView.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TView class @@ -26,7 +27,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TView extends TControl +class TView extends \Prado\Web\UI\TControl { private $_active=false; diff --git a/framework/Web/UI/WebControls/TViewCollection.php b/framework/Web/UI/WebControls/TViewCollection.php index ec120ada..1d7fb2a9 100644 --- a/framework/Web/UI/WebControls/TViewCollection.php +++ b/framework/Web/UI/WebControls/TViewCollection.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Exceptions\TInvalidDataTypeException; /** * TViewCollection class. @@ -19,7 +20,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TViewCollection extends TControlCollection +class TViewCollection extends \Prado\Web\UI\TControlCollection { /** * Inserts an item at the specified position. diff --git a/framework/Web/UI/WebControls/TWebControl.php b/framework/Web/UI/WebControls/TWebControl.php index e850ba76..de4707a2 100644 --- a/framework/Web/UI/WebControls/TWebControl.php +++ b/framework/Web/UI/WebControls/TWebControl.php @@ -10,13 +10,9 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TStyle and TWebAdapter definition - */ -Prado::using('System.Web.UI.WebControls.TStyle'); -Prado::using('System.Web.UI.WebControls.TWebControlAdapter'); -Prado::using('System.Web.UI.WebControls.TWebControlDecorator'); +use Prado\Prado; +use Prado\Exceptions\TInvalidDataValueException; +use Prado\TPropertyValue; /** * TWebControl class @@ -39,7 +35,7 @@ Prado::using('System.Web.UI.WebControls.TWebControlDecorator'); * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TWebControl extends TControl implements IStyleable +class TWebControl extends \Prado\Web\UI\TControl implements IStyleable { /** * @var boolean ensures the inclusion the id in the tag rendering. diff --git a/framework/Web/UI/WebControls/TWebControlAdapter.php b/framework/Web/UI/WebControls/TWebControlAdapter.php index a8d7ad9d..05849683 100644 --- a/framework/Web/UI/WebControls/TWebControlAdapter.php +++ b/framework/Web/UI/WebControls/TWebControlAdapter.php @@ -23,7 +23,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TWebControlAdapter extends TControlAdapter +class TWebControlAdapter extends \Prado\Web\UI\TControlAdapter { /** * Renders the control to which the adapter is attached. diff --git a/framework/Web/UI/WebControls/TWebControlDecorator.php b/framework/Web/UI/WebControls/TWebControlDecorator.php index a74d1815..c1d6ff1e 100644 --- a/framework/Web/UI/WebControls/TWebControlDecorator.php +++ b/framework/Web/UI/WebControls/TWebControlDecorator.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TWebControlDecorator class diff --git a/framework/Web/UI/WebControls/TWizard.php b/framework/Web/UI/WebControls/TWizard.php index 543a395f..ef068384 100644 --- a/framework/Web/UI/WebControls/TWizard.php +++ b/framework/Web/UI/WebControls/TWizard.php @@ -10,14 +10,8 @@ */ namespace Prado\Web\UI\WebControls; - -Prado::using('System.Web.UI.WebControls.TMultiView'); -Prado::using('System.Web.UI.WebControls.TPanel'); -Prado::using('System.Web.UI.WebControls.TButton'); -Prado::using('System.Web.UI.WebControls.TLinkButton'); -Prado::using('System.Web.UI.WebControls.TImageButton'); -Prado::using('System.Web.UI.WebControls.TDataList'); -Prado::using('System.Web.UI.WebControls.TWizardNavigationButtonStyle'); +use Prado\TPropertyValue; +use Prado\Exceptions\TInvalidDataValueException; /** * Class TWizard. @@ -81,7 +75,7 @@ Prado::using('System.Web.UI.WebControls.TWizardNavigationButtonStyle'); * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TWizard extends TWebControl implements INamingContainer +class TWizard extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\Web\UI\INamingContainer { /** * Wizard step types. @@ -1142,7 +1136,7 @@ class TWizard extends TWebControl implements INamingContainer // if the button clicked causes validation which fails, // by default we will cancel navigation to the new step $button=$param->getCommandSource(); - if(($button instanceof IButtonControl) && $button->getCausesValidation() && ($page=$this->getPage())!==null && !$page->getIsValid()) + if(($button instanceof \Prado\Web\UI\IButtonControl) && $button->getCausesValidation() && ($page=$this->getPage())!==null && !$page->getIsValid()) $navParam->setCancelNavigation(true); $this->_activeStepIndexSet=false; @@ -1347,7 +1341,7 @@ class TWizard extends TWebControl implements INamingContainer */ public function bubbleEvent($sender,$param) { - if($param instanceof TCommandEventParameter) + if($param instanceof \Prado\Web\UI\TCommandEventParameter) { $command=$param->getCommandName(); if(strcasecmp($command,self::CMD_CANCEL)===0) @@ -1359,7 +1353,7 @@ class TWizard extends TWebControl implements INamingContainer $type=$this->getStepType($this->getActiveStep()); $index=$this->getActiveStepIndex(); $navParam=new TWizardNavigationEventParameter($index); - if(($sender instanceof IButtonControl) && $sender->getCausesValidation() && ($page=$this->getPage())!==null && !$page->getIsValid()) + if(($sender instanceof \Prado\Web\UI\IButtonControl) && $sender->getCausesValidation() && ($page=$this->getPage())!==null && !$page->getIsValid()) $navParam->setCancelNavigation(true); $handled=false; diff --git a/framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php b/framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php index 1d7eb95b..94e27e8d 100644 --- a/framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php +++ b/framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TStyle class file - */ -Prado::using('System.Web.UI.WebControls.TStyle'); +use Prado\TPropertyValue; /** * TWizardNavigationButtonStyle class. diff --git a/framework/Web/UI/WebControls/TWizardNavigationButtonType.php b/framework/Web/UI/WebControls/TWizardNavigationButtonType.php index 05dbc428..1ef418f4 100644 --- a/framework/Web/UI/WebControls/TWizardNavigationButtonType.php +++ b/framework/Web/UI/WebControls/TWizardNavigationButtonType.php @@ -25,7 +25,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TWizardNavigationButtonType extends TEnumerable +class TWizardNavigationButtonType extends \Prado\TEnumerable { const Button='Button'; const Image='Image'; diff --git a/framework/Web/UI/WebControls/TWizardNavigationContainer.php b/framework/Web/UI/WebControls/TWizardNavigationContainer.php index 0d7a8eeb..300e4ecf 100644 --- a/framework/Web/UI/WebControls/TWizardNavigationContainer.php +++ b/framework/Web/UI/WebControls/TWizardNavigationContainer.php @@ -23,7 +23,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TWizardNavigationContainer extends TControl implements INamingContainer +class TWizardNavigationContainer extends \Prado\Web\UI\TControl implements \Prado\Web\UI\INamingContainer { private $_previousButton=null; private $_nextButton=null; diff --git a/framework/Web/UI/WebControls/TWizardNavigationEventParameter.php b/framework/Web/UI/WebControls/TWizardNavigationEventParameter.php index 5a25b8b1..2d6d431f 100644 --- a/framework/Web/UI/WebControls/TWizardNavigationEventParameter.php +++ b/framework/Web/UI/WebControls/TWizardNavigationEventParameter.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TWizardNavigationEventParameter class. diff --git a/framework/Web/UI/WebControls/TWizardNavigationTemplate.php b/framework/Web/UI/WebControls/TWizardNavigationTemplate.php index edcf83ca..9087e99a 100644 --- a/framework/Web/UI/WebControls/TWizardNavigationTemplate.php +++ b/framework/Web/UI/WebControls/TWizardNavigationTemplate.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Exceptions\TInvalidDataValueException; /** * TWizardNavigationTemplate class. diff --git a/framework/Web/UI/WebControls/TWizardStep.php b/framework/Web/UI/WebControls/TWizardStep.php index d2dda721..57b96c44 100644 --- a/framework/Web/UI/WebControls/TWizardStep.php +++ b/framework/Web/UI/WebControls/TWizardStep.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\TPropertyValue; /** * TWizardStep class. diff --git a/framework/Web/UI/WebControls/TWizardStepCollection.php b/framework/Web/UI/WebControls/TWizardStepCollection.php index 9f4bffb0..4ec429d0 100644 --- a/framework/Web/UI/WebControls/TWizardStepCollection.php +++ b/framework/Web/UI/WebControls/TWizardStepCollection.php @@ -10,6 +10,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Exceptions\TInvalidDataTypeException; /** * TWizardStepCollection class. @@ -21,7 +22,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0 */ -class TWizardStepCollection extends TList +class TWizardStepCollection extends \Prado\Collections\TList { /** * @var TWizard diff --git a/framework/Web/UI/WebControls/TWizardStepType.php b/framework/Web/UI/WebControls/TWizardStepType.php index 057a8cdb..934941be 100644 --- a/framework/Web/UI/WebControls/TWizardStepType.php +++ b/framework/Web/UI/WebControls/TWizardStepType.php @@ -26,7 +26,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.0.4 */ -class TWizardStepType extends TEnumerable +class TWizardStepType extends \Prado\TEnumerable { const Auto='Auto'; const Complete='Complete'; diff --git a/framework/Web/UI/WebControls/TXmlTransform.php b/framework/Web/UI/WebControls/TXmlTransform.php index c6de7801..c147b66c 100644 --- a/framework/Web/UI/WebControls/TXmlTransform.php +++ b/framework/Web/UI/WebControls/TXmlTransform.php @@ -11,6 +11,7 @@ */ namespace Prado\Web\UI\WebControls; +use Prado\Exceptions\TInvalidDataValueException; /** * TXmlTransform class @@ -36,7 +37,7 @@ namespace Prado\Web\UI\WebControls; * @package Prado\Web\UI\WebControls * @since 3.1 */ -class TXmlTransform extends TControl { +class TXmlTransform extends \Prado\Web\UI\TControl { const EXT_XML_FILE = '.xml'; const EXT_XSL_FILE = '.xsl'; -- cgit v1.2.3