~fusonic/chive/1.1

« back to all changes in this revision

Viewing changes to yii/base/interfaces.php

  • Committer: Matthias Burtscher
  • Date: 2010-02-12 09:12:35 UTC
  • Revision ID: matthias.burtscher@fusonic.net-20100212091235-jqxrb62klx872ajc
* Updated Yii to 1.1.0
* Removed CodePress and CodeMirror
* Updated jQuery and some plugins
* Cleaned some code ...

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 *
5
5
 * @author Qiang Xue <qiang.xue@gmail.com>
6
6
 * @link http://www.yiiframework.com/
7
 
 * @copyright Copyright &copy; 2008-2009 Yii Software LLC
 
7
 * @copyright Copyright &copy; 2008-2010 Yii Software LLC
8
8
 * @license http://www.yiiframework.com/license/
9
9
 */
10
10
 
15
15
 * method of every loaded application component.
16
16
 *
17
17
 * @author Qiang Xue <qiang.xue@gmail.com>
18
 
 * @version $Id: interfaces.php 1290 2009-08-06 16:13:11Z qiang.xue $
 
18
 * @version $Id: interfaces.php 1678 2010-01-07 21:02:00Z qiang.xue $
19
19
 * @package system.base
20
20
 * @since 1.0
21
21
 */
38
38
 * This interface must be implemented by classes supporting caching feature.
39
39
 *
40
40
 * @author Qiang Xue <qiang.xue@gmail.com>
41
 
 * @version $Id: interfaces.php 1290 2009-08-06 16:13:11Z qiang.xue $
 
41
 * @version $Id: interfaces.php 1678 2010-01-07 21:02:00Z qiang.xue $
42
42
 * @package system.caching
43
43
 * @since 1.0
44
44
 */
106
106
 * Objects implementing this interface must be able to be serialized and unserialized.
107
107
 *
108
108
 * @author Qiang Xue <qiang.xue@gmail.com>
109
 
 * @version $Id: interfaces.php 1290 2009-08-06 16:13:11Z qiang.xue $
 
109
 * @version $Id: interfaces.php 1678 2010-01-07 21:02:00Z qiang.xue $
110
110
 * @package system.caching
111
111
 * @since 1.0
112
112
 */
130
130
 * This interface must be implemented by all state persister classes (such as
131
131
 * {@link CStatePersister}.
132
132
 *
133
 
 * @version $Id: interfaces.php 1290 2009-08-06 16:13:11Z qiang.xue $
 
133
 * @version $Id: interfaces.php 1678 2010-01-07 21:02:00Z qiang.xue $
134
134
 * @package system.base
135
135
 * @since 1.0
136
136
 */
152
152
/**
153
153
 * IFilter is the interface that must be implemented by action filters.
154
154
 *
155
 
 * @version $Id: interfaces.php 1290 2009-08-06 16:13:11Z qiang.xue $
 
155
 * @version $Id: interfaces.php 1678 2010-01-07 21:02:00Z qiang.xue $
156
156
 * @package system.base
157
157
 * @since 1.0
158
158
 */
172
172
/**
173
173
 * IAction is the interface that must be implemented by controller actions.
174
174
 *
175
 
 * @version $Id: interfaces.php 1290 2009-08-06 16:13:11Z qiang.xue $
 
175
 * @version $Id: interfaces.php 1678 2010-01-07 21:02:00Z qiang.xue $
176
176
 * @package system.base
177
177
 * @since 1.0
178
178
 */
200
200
 * If this interface is implemented, the provider instance will be able
201
201
 * to intercept the remote method invocation (e.g. for logging or authentication purpose).
202
202
 * @author Qiang Xue <qiang.xue@gmail.com>
203
 
 * @version $Id: interfaces.php 1290 2009-08-06 16:13:11Z qiang.xue $
 
203
 * @version $Id: interfaces.php 1678 2010-01-07 21:02:00Z qiang.xue $
204
204
 * @package system.base
205
205
 * @since 1.0
206
206
 */
228
228
 * implemented in {@link CBaseController}.
229
229
 *
230
230
 * @author Qiang Xue <qiang.xue@gmail.com>
231
 
 * @version $Id: interfaces.php 1290 2009-08-06 16:13:11Z qiang.xue $
 
231
 * @version $Id: interfaces.php 1678 2010-01-07 21:02:00Z qiang.xue $
232
232
 * @package system.base
233
233
 * @since 1.0
234
234
 */
254
254
 * used with the {@link CWebApplication::user user application component}.
255
255
 *
256
256
 * @author Qiang Xue <qiang.xue@gmail.com>
257
 
 * @version $Id: interfaces.php 1290 2009-08-06 16:13:11Z qiang.xue $
 
257
 * @version $Id: interfaces.php 1678 2010-01-07 21:02:00Z qiang.xue $
258
258
 * @package system.base
259
259
 * @since 1.0
260
260
 */
297
297
 * for the current user.
298
298
 *
299
299
 * @author Qiang Xue <qiang.xue@gmail.com>
300
 
 * @version $Id: interfaces.php 1290 2009-08-06 16:13:11Z qiang.xue $
 
300
 * @version $Id: interfaces.php 1678 2010-01-07 21:02:00Z qiang.xue $
301
301
 * @package system.base
302
302
 * @since 1.0
303
303
 */
335
335
 * An auth manager is mainly responsible for providing role-based access control (RBAC) service.
336
336
 *
337
337
 * @author Qiang Xue <qiang.xue@gmail.com>
338
 
 * @version $Id: interfaces.php 1290 2009-08-06 16:13:11Z qiang.xue $
 
338
 * @version $Id: interfaces.php 1678 2010-01-07 21:02:00Z qiang.xue $
339
339
 * @package system.base
340
340
 * @since 1.0
341
341
 */
508
508
 * are defined in the behavior class and not available in the component class.
509
509
 *
510
510
 * @author Qiang Xue <qiang.xue@gmail.com>
511
 
 * @version $Id: interfaces.php 1290 2009-08-06 16:13:11Z qiang.xue $
 
511
 * @version $Id: interfaces.php 1678 2010-01-07 21:02:00Z qiang.xue $
512
512
 * @package system.base
513
513
 * @since 1.0.2
514
514
 */
533
533
         */
534
534
        public function setEnabled($value);
535
535
}
 
536
 
 
537
/**
 
538
 * IWidgetFactory is the interface that must be implemented by a widget factory class.
 
539
 *
 
540
 * When calling {@link CBaseController::createWidget}, if a widget factory is available,
 
541
 * it will be used for creating the requested widget.
 
542
 *
 
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
 
546
 * @since 1.1
 
547
 */
 
548
interface IWidgetFactory
 
549
{
 
550
        /**
 
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.
 
556
         */
 
557
        public function createWidget($owner,$className,$properties=array());
 
558
}
 
559
 
 
560
/**
 
561
 * IDataProvider is the interface that must be implemented by data provider classes.
 
562
 *
 
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.
 
565
 *
 
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
 
569
 * @since 1.1
 
570
 */
 
571
interface IDataProvider
 
572
{
 
573
        /**
 
574
         * @return string the unique ID that identifies the data provider from other data providers.
 
575
         */
 
576
        public function getId();
 
577
        /**
 
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.
 
583
         */
 
584
        public function getItemCount($refresh=false);
 
585
        /**
 
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.
 
590
         */
 
591
        public function getTotalItemCount($refresh=false);
 
592
        /**
 
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.
 
596
         */
 
597
        public function getData($refresh=false);
 
598
        /**
 
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.
 
603
         */
 
604
        public function getKeys($refresh=false);
 
605
        /**
 
606
         * @return CSort the sorting object. If this is false, it means the sorting is disabled.
 
607
         */
 
608
        public function getSort();
 
609
        /**
 
610
         * @return CPagination the pagination object. If this is false, it means the pagination is disabled.
 
611
         */
 
612
        public function getPagination();
 
613
}
 
 
b'\\ No newline at end of file'