Ejemplo n.º 1
0
 public function graph()
 {
     return Entity::graph(['GraphSimple'])->properties(['simpleInteger' => Type::Integer()->bindTo(['simple-integer', 'simple_integer'])->expected(['simpleInt', 'simple-int']), 'simpleString' => Type::String()->bindTo(['simple-string', 'simple_string'])->expected(['simpleString', 'simple-str']), 'simpleMixed' => Type::Mixed()->bindTo(['simple-mixed'])->expected(['mixed-simple'])]);
 }
Ejemplo n.º 2
0
 public function graph()
 {
     return Entity::graph(['GraphMixed'])->properties(['mixedStandard' => Type::Mixed(), 'mixedCustom' => Type::Mixed(new CustomAdapterTest()), 'mixedCustomProperties' => Type::Mixed(new CustomAdapterTest())->apply(['base' => Type::Object(GraphObjectBase::create())->bindTo(['objectNest.base']), 'simple' => Type::Object(GraphSimple::create()), 'mixedCustom', 'mixedCustom2' => 'nest.mixedCustom2'])]);
 }