ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ActiveRecordList Class Reference

NullPointerExceptionInspection More...

+ Collaboration diagram for ActiveRecordList:

Public Member Functions

 __construct (ActiveRecord $ar)
 PhpFieldAssignmentTypeMismatchInspection More...
 
 additionalParams (array $additional_params)
 
 where ($where, $operator=null)
 
 orderBy (string $order_by, string $order_direction='ASC')
 
 limit (int $start, int $end)
 
 innerjoinAR (ActiveRecord $ar, $on_this, $on_external, array $fields=array(' *'), string $operator='=', bool $both_external=false)
 
 leftjoin ( $tablename, $on_this, $on_external, array $fields=array(' *'), string $operator='=', bool $both_external=false)
 
 innerjoin ( $tablename, $on_this, $on_external, array $fields=array(' *'), string $operator='=', bool $both_external=false)
 
 concat (array $fields, string $as)
 
 getArWhereCollection ()
 
 getArJoinCollection ()
 
 getArOrderCollection ()
 
 getArLimitCollection ()
 
 getArConcatCollection ()
 
 getArSelectCollection ()
 
 getArHavingCollection ()
 
 setArHavingCollection (\arHavingCollection $arHavingCollection)
 
 dateFormat (string $date_format='d.m.Y - H:i:s')
 
 debug ()
 
 connector (arConnector $connector)
 
 raw (bool $set_raw=true)
 
 hasSets ()
 
 affectedRows ()
 
 count ()
 
 getCollection ()
 
 setClass (string $class)
 
 getClass ()
 
 get ()
 
 getFirstFromLastQuery ()
 
 first ()
 
 last ()
 
 getArray (string $key=null, $values=null)
 
 setAR (\ActiveRecord $ar)
 
 getAR ()
 
 getDebug ()
 
 setDateFormat (string $date_format)
 
 getDateFormat ()
 
 setAddidtionalParameters (array $addidtional_parameters)
 
 getAddidtionalParameters ()
 
 setRaw (bool $raw)
 
 getRaw ()
 

Static Public Member Functions

static setLastQuery (string $last_query)
 
static getLastQuery ()
 

Protected Member Functions

 getArConnector ()
 
 join (string $type, string $tablename, $on_this, string $on_external, array $fields=array(' *'), string $operator='=', bool $both_external=false)
 
 buildArray (?string $key, $values)
 
 buildRow (?array $row, $values)
 
 loadLastQuery ()
 

Protected Attributes

arWhereCollection $arWhereCollection
 
arJoinCollection $arJoinCollection
 
arOrderCollection $arOrderCollection
 
arLimitCollection $arLimitCollection
 
arConcatCollection $arConcatCollection
 
arSelectCollection $arSelectCollection
 
arHavingCollection $arHavingCollection
 
bool $loaded = false
 
string $class = ''
 
array $result = array()
 
array $result_array = array()
 
bool $debug = false
 
string $date_format = null
 
array $addidtional_parameters = array()
 
arConnector $connector = null
 
ActiveRecord $ar = null
 
bool $raw = false
 

Static Protected Attributes

static string $last_query = null
 

Detailed Description

NullPointerExceptionInspection

NullPointerExceptionInspection NullPointerExceptionInspection NullPointerExceptionInspection Class ActiveRecordList

Author
Oskar Truffer ot@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Version
2.0.7

Definition at line 26 of file class.ActiveRecordList.php.

Constructor & Destructor Documentation

◆ __construct()

ActiveRecordList::__construct ( ActiveRecord  $ar)

PhpFieldAssignmentTypeMismatchInspection

Definition at line 53 of file class.ActiveRecordList.php.

References getAR(), getArSelectCollection(), ActiveRecord\getConnectorContainerName(), and setAR().

54  {
55  $this->class = get_class($ar);
56  $this->setAR($ar);
57  $this->arWhereCollection = arWhereCollection::getInstance($this->getAR());
58  $this->arJoinCollection = arJoinCollection::getInstance($this->getAR());
59  $this->arLimitCollection = arLimitCollection::getInstance($this->getAR());
60  $this->arOrderCollection = arOrderCollection::getInstance($this->getAR());
61  $this->arConcatCollection = arConcatCollection::getInstance($this->getAR());
62  $this->arSelectCollection = arSelectCollection::getInstance($this->getAR());
63  $this->arHavingCollection = arHavingCollection::getInstance($this->getAR());
64 
65  $arSelect = new arSelect();
66  $arSelect->setTableName($ar->getConnectorContainerName());
67  $arSelect->setFieldName('*');
68  $this->getArSelectCollection()->add($arSelect);
69  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setAR(\ActiveRecord $ar)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getConnectorContainerName()
Return the Name of your Connector Table
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

Member Function Documentation

◆ additionalParams()

ActiveRecordList::additionalParams ( array  $additional_params)

Definition at line 76 of file class.ActiveRecordList.php.

References setAddidtionalParameters().

76  : self
77  {
78  $this->setAddidtionalParameters($additional_params);
79 
80  return $this;
81  }
setAddidtionalParameters(array $addidtional_parameters)
+ Here is the call graph for this function:

◆ affectedRows()

ActiveRecordList::affectedRows ( )

Definition at line 346 of file class.ActiveRecordList.php.

References getArConnector().

Referenced by count(), and hasSets().

346  : int
347  {
348  return $this->getArConnector()->affectedRows($this);
349  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildArray()

ActiveRecordList::buildArray ( ?string  $key,
  $values 
)
protected
Parameters
int | string | array | null$values
Exceptions
Exception

Definition at line 426 of file class.ActiveRecordList.php.

References ILIAS\LTI\ToolProvider\$key, $result_array, and buildRow().

Referenced by getArray().

426  : array
427  {
428  if ($key === null && $values === null) {
429  return $this->result_array;
430  }
431  $array = [];
432  foreach ($this->result_array as $row) {
433  if ($key) {
434  if (!array_key_exists($key, $row)) {
435  throw new Exception("The attribute $key does not exist on this model.");
436  }
437  $array[$row[$key]] = $this->buildRow($row, $values);
438  } else {
439  $array[] = $this->buildRow($row, $values);
440  }
441  }
442 
443  return $array;
444  }
string $key
Consumer key/client ID value.
Definition: System.php:193
buildRow(?array $row, $values)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildRow()

ActiveRecordList::buildRow ( ?array  $row,
  $values 
)
protected
Parameters
string | array | null$values
Returns
string|int|null|array

Definition at line 450 of file class.ActiveRecordList.php.

References ILIAS\LTI\ToolProvider\$key, $res, getAddidtionalParameters(), getAR(), getArConnector(), getDateFormat(), and getRaw().

Referenced by buildArray().

451  {
452  if ($values === null) {
453  return $row;
454  }
455 
456  if (!is_array($values)) {
457  return $row[$values];
458  }
459 
460  $array = [];
461  foreach ($row as $key => $value) {
462  if (in_array($key, $values)) {
463  $array[$key] = $value;
464  }
465  }
466 
467  return $array;
468  }
string $key
Consumer key/client ID value.
Definition: System.php:193
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ concat()

ActiveRecordList::concat ( array  $fields,
string  $as 
)
Parameters
$as

Definition at line 261 of file class.ActiveRecordList.php.

References getArConcatCollection().

261  : self
262  {
263  $con = new arConcat();
264  $con->setAs($as);
265  $con->setFields($fields);
266  $this->getArConcatCollection()->add($con);
267 
268  return $this;
269  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ connector()

ActiveRecordList::connector ( arConnector  $connector)

Definition at line 327 of file class.ActiveRecordList.php.

References $connector.

327  : self
328  {
329  $this->connector = $connector;
330 
331  return $this;
332  }
connector(arConnector $connector)

◆ count()

ActiveRecordList::count ( )

Definition at line 351 of file class.ActiveRecordList.php.

References affectedRows().

351  : int
352  {
353  return $this->affectedRows();
354  }
+ Here is the call graph for this function:

◆ dateFormat()

ActiveRecordList::dateFormat ( string  $date_format = 'd.m.Y - H:i:s')

Definition at line 311 of file class.ActiveRecordList.php.

References setDateFormat().

311  :i:s'): self
312  {
313  $this->loaded = false;
314  $this->setDateFormat($date_format);
315 
316  return $this;
317  }
+ Here is the call graph for this function:

◆ debug()

ActiveRecordList::debug ( )

Definition at line 319 of file class.ActiveRecordList.php.

319  : self
320  {
321  $this->loaded = false;
322  $this->debug = true;
323 
324  return $this;
325  }

◆ first()

ActiveRecordList::first ( )

Definition at line 393 of file class.ActiveRecordList.php.

393  : ?\ActiveRecord
394  {
395  $this->load();
396 
397  $result = array_values($this->result);
398 
399  return array_shift($result);
400  }
Class ActiveRecord.

◆ get()

ActiveRecordList::get ( )
Returns
[]

Definition at line 374 of file class.ActiveRecordList.php.

References $result.

374  : array
375  {
376  $this->load();
377 
378  return $this->result;
379  }

◆ getAddidtionalParameters()

ActiveRecordList::getAddidtionalParameters ( )
Returns
mixed[]

Definition at line 565 of file class.ActiveRecordList.php.

References $addidtional_parameters.

Referenced by buildRow().

565  : array
566  {
568  }
+ Here is the caller graph for this function:

◆ getAR()

ActiveRecordList::getAR ( )

Definition at line 524 of file class.ActiveRecordList.php.

References $ar.

Referenced by __construct(), arConnectorDB\buildQuery(), buildRow(), getArConnector(), join(), and arConnectorSession\readSet().

524  : \ActiveRecord
525  {
526  return $this->ar;
527  }
Class ActiveRecord.
+ Here is the caller graph for this function:

◆ getArConcatCollection()

ActiveRecordList::getArConcatCollection ( )

Definition at line 291 of file class.ActiveRecordList.php.

References $arConcatCollection.

Referenced by arConnectorDB\buildQuery(), and concat().

292  {
294  }
arConcatCollection $arConcatCollection
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ getArConnector()

ActiveRecordList::getArConnector ( )
protected

Definition at line 71 of file class.ActiveRecordList.php.

References arConnectorMap\get(), and getAR().

Referenced by affectedRows(), and buildRow().

71  : \arConnector
72  {
73  return arConnectorMap::get($this->getAR());
74  }
Class arConnector.
static get(ActiveRecord $ar)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getArHavingCollection()

ActiveRecordList::getArHavingCollection ( )

Definition at line 301 of file class.ActiveRecordList.php.

References $arHavingCollection.

Referenced by arConnectorDB\buildQuery().

302  {
304  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
arHavingCollection $arHavingCollection
+ Here is the caller graph for this function:

◆ getArJoinCollection()

ActiveRecordList::getArJoinCollection ( )

Definition at line 276 of file class.ActiveRecordList.php.

References $arJoinCollection.

Referenced by arConnectorDB\buildQuery(), and join().

277  {
279  }
arJoinCollection $arJoinCollection
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ getArLimitCollection()

ActiveRecordList::getArLimitCollection ( )

Definition at line 286 of file class.ActiveRecordList.php.

References $arLimitCollection.

Referenced by arConnectorDB\buildQuery(), and limit().

287  {
289  }
arLimitCollection $arLimitCollection
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ getArOrderCollection()

ActiveRecordList::getArOrderCollection ( )

Definition at line 281 of file class.ActiveRecordList.php.

References $arOrderCollection.

Referenced by arConnectorDB\buildQuery(), and orderBy().

282  {
284  }
arOrderCollection $arOrderCollection
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ getArray()

ActiveRecordList::getArray ( string  $key = null,
  $values = null 
)
Parameters
string$keyshall a specific value be used as a key? if null then the 1. array key is just increasing from 0.
string | array$valueswhich values should be taken? if null all are given. If only a string is given then the result is an 1D array!

Definition at line 415 of file class.ActiveRecordList.php.

References ILIAS\LTI\ToolProvider\$key, and buildArray().

415  : array
416  {
417  $this->load();
418 
419  return $this->buildArray($key, $values);
420  }
buildArray(?string $key, $values)
string $key
Consumer key/client ID value.
Definition: System.php:193
+ Here is the call graph for this function:

◆ getArSelectCollection()

ActiveRecordList::getArSelectCollection ( )

Definition at line 296 of file class.ActiveRecordList.php.

References $arSelectCollection.

Referenced by __construct(), arConnectorDB\buildQuery(), and join().

297  {
299  }
arSelectCollection $arSelectCollection
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ getArWhereCollection()

ActiveRecordList::getArWhereCollection ( )

Definition at line 271 of file class.ActiveRecordList.php.

References $arWhereCollection.

Referenced by arConnectorDB\buildQuery(), arConnectorSession\readSet(), and where().

272  {
274  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
arWhereCollection $arWhereCollection
+ Here is the caller graph for this function:

◆ getClass()

ActiveRecordList::getClass ( )

Definition at line 366 of file class.ActiveRecordList.php.

References $class.

366  : string
367  {
368  return $this->class;
369  }

◆ getCollection()

ActiveRecordList::getCollection ( )

Definition at line 356 of file class.ActiveRecordList.php.

356  : self
357  {
358  return $this;
359  }

◆ getDateFormat()

ActiveRecordList::getDateFormat ( )

Definition at line 539 of file class.ActiveRecordList.php.

Referenced by buildRow().

539  : string
540  {
541  return $this->date_format ?? '';
542  }
+ Here is the caller graph for this function:

◆ getDebug()

ActiveRecordList::getDebug ( )

Definition at line 529 of file class.ActiveRecordList.php.

References $debug.

529  : bool
530  {
531  return $this->debug;
532  }

◆ getFirstFromLastQuery()

ActiveRecordList::getFirstFromLastQuery ( )
Deprecated:

Definition at line 384 of file class.ActiveRecordList.php.

References loadLastQuery().

384  : ?\ActiveRecord
385  {
386  $this->loadLastQuery();
387 
388  $result = array_values($this->result);
389 
390  return array_shift($result);
391  }
Class ActiveRecord.
+ Here is the call graph for this function:

◆ getLastQuery()

static ActiveRecordList::getLastQuery ( )
static

Definition at line 549 of file class.ActiveRecordList.php.

549  : ?string
550  {
551  return self::$last_query;
552  }

◆ getRaw()

ActiveRecordList::getRaw ( )

Definition at line 575 of file class.ActiveRecordList.php.

References $raw.

Referenced by buildRow().

575  : bool
576  {
577  return $this->raw;
578  }
+ Here is the caller graph for this function:

◆ hasSets()

ActiveRecordList::hasSets ( )

Definition at line 341 of file class.ActiveRecordList.php.

References affectedRows().

341  : bool
342  {
343  return $this->affectedRows() > 0;
344  }
+ Here is the call graph for this function:

◆ innerjoin()

ActiveRecordList::innerjoin (   $tablename,
  $on_this,
  $on_external,
array  $fields = array('*'),
string  $operator = '=',
bool  $both_external = false 
)
Parameters
$tablename
$on_this
$on_external

Definition at line 247 of file class.ActiveRecordList.php.

References join(), and arJoin\TYPE_INNER.

Referenced by innerjoinAR().

254  : self {
255  return $this->join(arJoin::TYPE_INNER, $tablename, $on_this, $on_external, $fields, $operator, $both_external);
256  }
const TYPE_INNER
join(string $type, string $tablename, $on_this, string $on_external, array $fields=array(' *'), string $operator='=', bool $both_external=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ innerjoinAR()

ActiveRecordList::innerjoinAR ( ActiveRecord  $ar,
  $on_this,
  $on_external,
array  $fields = array('*'),
string  $operator = '=',
bool  $both_external = false 
)
Parameters
$on_this
$on_external

Definition at line 160 of file class.ActiveRecordList.php.

References ActiveRecord\getConnectorContainerName(), and innerjoin().

167  : self {
168  return $this->innerjoin(
170  $on_this,
171  $on_external,
172  $fields,
173  $operator,
174  $both_external
175  );
176  }
getConnectorContainerName()
Return the Name of your Connector Table
innerjoin( $tablename, $on_this, $on_external, array $fields=array(' *'), string $operator='=', bool $both_external=false)
+ Here is the call graph for this function:

◆ join()

ActiveRecordList::join ( string  $type,
string  $tablename,
  $on_this,
string  $on_external,
array  $fields = array('*'),
string  $operator = '=',
bool  $both_external = false 
)
protected
Parameters
$tablename
$on_this
$on_external
Exceptions
arException

Definition at line 184 of file class.ActiveRecordList.php.

References getAR(), getArJoinCollection(), getArSelectCollection(), and arException\LIST_JOIN_ON_WRONG_FIELD.

Referenced by innerjoin(), and leftjoin().

192  : self {
193  if (!$both_external && !$this->getAR()->getArFieldList()->isField($on_this)) {
195  }
196  $full_names = false;
197  foreach ($fields as $field_name) {
198  if ($this->getAR()->getArFieldList()->isField($field_name)) {
199  $full_names = true;
200  break;
201  }
202  }
203 
204  $arJoin = new arJoin();
205  $arJoin->setType($type);
206  $arJoin->setFullNames($full_names);
207  $arJoin->setTableName($tablename);
208  $arJoin->setOnFirstField($on_this);
209  $arJoin->setOnSecondField($on_external);
210  $arJoin->setOperator($operator);
211  $arJoin->setFields($fields);
212  $arJoin->setBothExternal($both_external);
213  $this->getArJoinCollection()->add($arJoin);
214 
215  foreach ($fields as $field) {
216  $arSelect = new arSelect();
217  $arSelect->setTableName($arJoin->getTableNameAs());
218  $arSelect->setFieldName($field);
219  $arSelect->setAs($arJoin->getTableNameAs() . '_' . $field);
220  $this->getArSelectCollection()->add($arSelect);
221  }
222 
223  return $this;
224  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$type
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class arException.
const LIST_JOIN_ON_WRONG_FIELD
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ last()

ActiveRecordList::last ( )

Definition at line 402 of file class.ActiveRecordList.php.

402  : ?\ActiveRecord
403  {
404  $this->load();
405 
406  $result = array_values($this->result);
407 
408  return array_pop($result);
409  }
Class ActiveRecord.

◆ leftjoin()

ActiveRecordList::leftjoin (   $tablename,
  $on_this,
  $on_external,
array  $fields = array('*'),
string  $operator = '=',
bool  $both_external = false 
)
Parameters
$tablename
$on_this
$on_external

Definition at line 231 of file class.ActiveRecordList.php.

References join(), and arJoin\TYPE_LEFT.

238  : self {
239  return $this->join(arJoin::TYPE_LEFT, $tablename, $on_this, $on_external, $fields, $operator, $both_external);
240  }
const TYPE_LEFT
join(string $type, string $tablename, $on_this, string $on_external, array $fields=array(' *'), string $operator='=', bool $both_external=false)
+ Here is the call graph for this function:

◆ limit()

ActiveRecordList::limit ( int  $start,
int  $end 
)
Parameters
$start
$end
Exceptions
arException

Definition at line 145 of file class.ActiveRecordList.php.

References getArLimitCollection().

145  : self
146  {
147  $arLimit = new arLimit();
148  $arLimit->setStart($start);
149  $arLimit->setEnd($end);
150 
151  $this->getArLimitCollection()->add($arLimit);
152 
153  return $this;
154  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ loadLastQuery()

ActiveRecordList::loadLastQuery ( )
protected
Deprecated:

Definition at line 514 of file class.ActiveRecordList.php.

Referenced by getFirstFromLastQuery().

514  : void
515  {
516  // $this->readFromDb(self::$last_query);
517  }
+ Here is the caller graph for this function:

◆ orderBy()

ActiveRecordList::orderBy ( string  $order_by,
string  $order_direction = 'ASC' 
)
Parameters
$order_by
Exceptions
arException

Definition at line 130 of file class.ActiveRecordList.php.

References getArOrderCollection().

130  : self
131  {
132  $arOrder = new arOrder();
133  $arOrder->setFieldname($order_by);
134  $arOrder->setDirection($order_direction);
135  $this->getArOrderCollection()->add($arOrder);
136 
137  return $this;
138  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ raw()

ActiveRecordList::raw ( bool  $set_raw = true)

Definition at line 334 of file class.ActiveRecordList.php.

References setRaw().

Referenced by setRaw().

334  : self
335  {
336  $this->setRaw($set_raw);
337 
338  return $this;
339  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAddidtionalParameters()

ActiveRecordList::setAddidtionalParameters ( array  $addidtional_parameters)
Parameters
mixed[]$addidtional_parameters

Definition at line 557 of file class.ActiveRecordList.php.

References $addidtional_parameters.

Referenced by additionalParams().

557  : void
558  {
559  $this->addidtional_parameters = $addidtional_parameters;
560  }
+ Here is the caller graph for this function:

◆ setAR()

ActiveRecordList::setAR ( \ActiveRecord  $ar)

Definition at line 519 of file class.ActiveRecordList.php.

References $ar.

Referenced by __construct().

519  : void
520  {
521  $this->ar = $ar;
522  }
+ Here is the caller graph for this function:

◆ setArHavingCollection()

ActiveRecordList::setArHavingCollection ( \arHavingCollection  $arHavingCollection)

Definition at line 306 of file class.ActiveRecordList.php.

References $arHavingCollection.

306  : void
307  {
309  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
arHavingCollection $arHavingCollection

◆ setClass()

ActiveRecordList::setClass ( string  $class)

Definition at line 361 of file class.ActiveRecordList.php.

361  : void
362  {
363  $this->class = $class;
364  }

◆ setDateFormat()

ActiveRecordList::setDateFormat ( string  $date_format)

Definition at line 534 of file class.ActiveRecordList.php.

References $date_format.

Referenced by dateFormat().

534  : void
535  {
536  $this->date_format = $date_format;
537  }
+ Here is the caller graph for this function:

◆ setLastQuery()

static ActiveRecordList::setLastQuery ( string  $last_query)
static

Definition at line 544 of file class.ActiveRecordList.php.

References $last_query.

Referenced by arConnectorDB\buildQuery().

544  : void
545  {
546  self::$last_query = $last_query;
547  }
+ Here is the caller graph for this function:

◆ setRaw()

ActiveRecordList::setRaw ( bool  $raw)

Definition at line 570 of file class.ActiveRecordList.php.

References $raw, and raw().

Referenced by raw().

570  : void
571  {
572  $this->raw = $raw;
573  }
raw(bool $set_raw=true)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ where()

ActiveRecordList::where (   $where,
  $operator = null 
)
Parameters
$where
null$operator
Returns
$this|void
Exceptions
Exception

Definition at line 93 of file class.ActiveRecordList.php.

References getArWhereCollection(), and arWhere\TYPE_STRING.

93  : self
94  {
95  $this->loaded = false;
96  if (is_string($where)) {
97  $arWhere = new arWhere();
98  $arWhere->setType(arWhere::TYPE_STRING);
99  $arWhere->setStatement($where);
100  $this->getArWhereCollection()->add($arWhere);
101 
102  return $this;
103  }
104 
105  if (is_array($where)) {
106  foreach ($where as $field_name => $value) {
107  $arWhere = new arWhere();
108  $arWhere->setFieldname($field_name);
109  $arWhere->setValue($value);
110  if ($operator) {
111  if (is_array($operator)) {
112  $arWhere->setOperator($operator[$field_name]);
113  } else {
114  $arWhere->setOperator($operator);
115  }
116  }
117  $this->getArWhereCollection()->add($arWhere);
118  }
119 
120  return $this;
121  }
122 
123  throw new Exception('Wrong where Statement, use strings or arrays');
124  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const TYPE_STRING
+ Here is the call graph for this function:

Field Documentation

◆ $addidtional_parameters

array ActiveRecordList::$addidtional_parameters = array()
protected

◆ $ar

ActiveRecord ActiveRecordList::$ar = null
protected

Definition at line 47 of file class.ActiveRecordList.php.

Referenced by getAR(), and setAR().

◆ $arConcatCollection

arConcatCollection ActiveRecordList::$arConcatCollection
protected

Definition at line 32 of file class.ActiveRecordList.php.

Referenced by getArConcatCollection().

◆ $arHavingCollection

arHavingCollection ActiveRecordList::$arHavingCollection
protected

Definition at line 34 of file class.ActiveRecordList.php.

Referenced by getArHavingCollection(), and setArHavingCollection().

◆ $arJoinCollection

arJoinCollection ActiveRecordList::$arJoinCollection
protected

Definition at line 29 of file class.ActiveRecordList.php.

Referenced by getArJoinCollection().

◆ $arLimitCollection

arLimitCollection ActiveRecordList::$arLimitCollection
protected

Definition at line 31 of file class.ActiveRecordList.php.

Referenced by getArLimitCollection().

◆ $arOrderCollection

arOrderCollection ActiveRecordList::$arOrderCollection
protected

Definition at line 30 of file class.ActiveRecordList.php.

Referenced by getArOrderCollection().

◆ $arSelectCollection

arSelectCollection ActiveRecordList::$arSelectCollection
protected

Definition at line 33 of file class.ActiveRecordList.php.

Referenced by getArSelectCollection().

◆ $arWhereCollection

arWhereCollection ActiveRecordList::$arWhereCollection
protected

Definition at line 28 of file class.ActiveRecordList.php.

Referenced by getArWhereCollection().

◆ $class

string ActiveRecordList::$class = ''
protected

Definition at line 36 of file class.ActiveRecordList.php.

Referenced by getClass().

◆ $connector

arConnector ActiveRecordList::$connector = null
protected

Definition at line 46 of file class.ActiveRecordList.php.

Referenced by connector().

◆ $date_format

string ActiveRecordList::$date_format = null
protected

Definition at line 43 of file class.ActiveRecordList.php.

Referenced by setDateFormat().

◆ $debug

bool ActiveRecordList::$debug = false
protected

Definition at line 42 of file class.ActiveRecordList.php.

Referenced by getDebug().

◆ $last_query

string ActiveRecordList::$last_query = null
staticprotected

Definition at line 45 of file class.ActiveRecordList.php.

Referenced by setLastQuery().

◆ $loaded

bool ActiveRecordList::$loaded = false
protected

Definition at line 35 of file class.ActiveRecordList.php.

◆ $raw

bool ActiveRecordList::$raw = false
protected

Definition at line 48 of file class.ActiveRecordList.php.

Referenced by getRaw(), and setRaw().

◆ $result

array ActiveRecordList::$result = array()
protected

Definition at line 40 of file class.ActiveRecordList.php.

Referenced by get().

◆ $result_array

array ActiveRecordList::$result_array = array()
protected

Definition at line 41 of file class.ActiveRecordList.php.

Referenced by buildArray().


The documentation for this class was generated from the following file: