public function graph() { return Entity::graph(['GraphObjectBase'])->properties(['aString' => Type::String(), 'anInteger' => Type::Integer()->expected(array('integer_val')), 'aBoolean' => Type::Boolean(), 'flatArray' => Type::FlatArray(), 'aDouble' => Type::Double()->defaultVal(20.0)])->finalize(function (GraphObjectBase $instance, $scenario) { if ($scenario === 'test-finalize-inject') { $instance->aString = 'thisisthefinalizedstring'; $instance->aDouble = $instance->aDouble + 1.5; } }); }
public function graph() { return Entity::graph(['GraphObjectStep'])->properties(['nested' => Type::Object(GraphObjectNest::create()), 'child' => Type::Object(GraphObjectChild::create()), 'list' => Type::Object(GraphObjectList::create()), 'property' => Type::String()->expected(array('someProperty')), 'anotherProperty' => Type::Integer()->expected(array('someOtherProperty'))]); }
public function graph() { return Entity::graph(['GraphObjectNest'])->properties(['child' => Type::Object(GraphObjectChild::create()), 'ownProperty' => Type::String()]); }
/** * @return Entity */ public function graph() { return Entity::graph(['Person'])->properties(['id' => Type::Integer(), 'name' => Type::String(), 'gender' => Type::String()]); }
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'])]); }
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'])]); }
public function graph() { return Entity::graph(['GraphObjectList'])->properties(['assoc' => Type::FlatArray(), 'nest' => Type::Object(GraphObjectNest::create()), 'baseList' => Type::Collection(GraphObjectBase::create())]); }
public function graph() { return Entity::graph(['Point'])->properties(['lat' => Type::Double()->expected(array('latitude')), 'lng' => Type::Double()->expected(array('longitude'))]); }
public function graph() { return Entity::graph(['Location'])->properties(['point' => Type::Object(Point::create()), 'city' => Type::String(), 'country' => Type::String(), 'address' => Type::String()]); }
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'])]); }