ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
05-record.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
7 function toRecord()
8 {
9  global $DIC;
10 
11  $refinery = $DIC->refinery();
12 
13  $transformation = $refinery->to()->recordOf(
14  array(
15  'user_id' => new \ILIAS\Refinery\To\Transformation\IntegerTransformation(),
16  'points' => new \ILIAS\Refinery\To\Transformation\IntegerTransformation()
17  )
18  );
19 
20  $result = $transformation->transform(array('user_id' => 5, 'points' => 1));
21 
22  return assert(array('user_id' => 5, 'points' => 1) === $result);
23 }
$result
Class ChatMainBarProvider .
toRecord()
Definition: 05-record.php:7
global $DIC
Definition: goto.php:24