コード例 #1
0
 public function graph()
 {
     return Entity::graph(['GraphObjectList'])->properties(['assoc' => Type::FlatArray(), 'nest' => Type::Object(GraphObjectNest::create()), 'baseList' => Type::Collection(GraphObjectBase::create())]);
 }
コード例 #2
0
 public function graph()
 {
     return Entity::graph(['GraphObjectNestedData'])->properties(['_id' => Type::Integer()->bindTo(['id']), 'integer' => Type::Integer()->bindTo(['flatNest.integer']), 'array' => Type::FlatArray()->bindTo(['flatNest.array']), 'anotherInteger' => Type::Integer()->expected(['flatNest.nest.integer']), 'base' => Type::Object(GraphObjectBase::create())->expected(['objectNest.base']), 'child' => Type::Object(GraphObjectChild::create())->bindTo(['objectNest.nest.child']), 'aProperty' => Type::Integer()->bindTo(['preferedproperty'])]);
 }
コード例 #3
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'])]);
 }