534
534
public function setEnabled($value);
538
* IWidgetFactory is the interface that must be implemented by a widget factory class.
540
* When calling {@link CBaseController::createWidget}, if a widget factory is available,
541
* it will be used for creating the requested widget.
543
* @author Qiang Xue <qiang.xue@gmail.com>
544
* @version $Id: interfaces.php 1678 2010-01-07 21:02:00Z qiang.xue $
545
* @package system.web
548
interface IWidgetFactory
551
* Creates a new widget based on the given class name and initial properties.
552
* @param CBaseController the owner of the new widget
553
* @param string the class name of the widget. This can also be a path alias (e.g. system.web.widgets.COutputCache)
554
* @param array the initial property values (name=>value) of the widget.
555
* @return CWidget the newly created widget whose properties have been initialized with the given values.
557
public function createWidget($owner,$className,$properties=array());
561
* IDataProvider is the interface that must be implemented by data provider classes.
563
* Data providers are components that can feed data for widgets such as data grid, data list.
564
* Besides providing data, they also support pagination and sorting.
566
* @author Qiang Xue <qiang.xue@gmail.com>
567
* @version $Id: interfaces.php 1678 2010-01-07 21:02:00Z qiang.xue $
568
* @package system.web
571
interface IDataProvider
574
* @return string the unique ID that identifies the data provider from other data providers.
576
public function getId();
578
* Returns the number of data items in the current page.
579
* This is equivalent to <code>count($provider->getData())</code>.
580
* When {@link pagination} is set false, this returns the same value as {@link totalItemCount}.
581
* @param boolean whether the number of data items should be re-calculated.
582
* @return integer the number of data items in the current page.
584
public function getItemCount($refresh=false);
586
* Returns the total number of data items.
587
* When {@link pagination} is set false, this returns the same value as {@link itemCount}.
588
* @param boolean whether the total number of data items should be re-calculated.
589
* @return integer total number of possible data items.
591
public function getTotalItemCount($refresh=false);
593
* Returns the data items currently available.
594
* @param boolean whether the data should be re-fetched from persistent storage.
595
* @return array the list of data items currently available in this data provider.
597
public function getData($refresh=false);
599
* Returns the key values associated with the data items.
600
* @param boolean whether the keys should be re-calculated.
601
* @return array the list of key values corresponding to {@link data}. Each data item in {@link data}
602
* is uniquely identified by the corresponding key value in this array.
604
public function getKeys($refresh=false);
606
* @return CSort the sorting object. If this is false, it means the sorting is disabled.
608
public function getSort();
610
* @return CPagination the pagination object. If this is false, it means the pagination is disabled.
612
public function getPagination();
b'\\ No newline at end of file'