本文整理汇总了PHP中Schema::getKind方法的典型用法代码示例。如果您正苦于以下问题:PHP Schema::getKind方法的具体用法?PHP Schema::getKind怎么用?PHP Schema::getKind使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Schema
的用法示例。
在下文中一共展示了Schema::getKind方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: determineMapper
/**
* Determine Mapper (early stage [draft] support for cross-entity upserts)
*
* @param Entity $obj_gds_entity
* @return Mapper
*/
protected function determineMapper(Entity $obj_gds_entity)
{
$str_this_kind = $obj_gds_entity->getKind();
if (!isset($this->arr_kind_mappers[$str_this_kind])) {
$this->arr_kind_mappers[$str_this_kind] = $this->createMapper();
if ($this->obj_schema->getKind() != $str_this_kind) {
$this->arr_kind_mappers[$str_this_kind]->setSchema($obj_gds_entity->getSchema());
}
}
return $this->arr_kind_mappers[$str_this_kind];
}
示例2: setSchema
/**
* Set the Schema for the Entity
*
* @param Schema $obj_schema
* @return $this
*/
public function setSchema(Schema $obj_schema)
{
$this->obj_schema = $obj_schema;
$this->setKind($obj_schema->getKind());
return $this;
}
示例3: fetchEntityGroup
/**
* Fetch all of the entities in a particular group
*
* @param Entity $obj_entity
* @return Entity[]
*/
public function fetchEntityGroup(Entity $obj_entity)
{
$arr_results = $this->obj_gateway->withSchema($this->obj_schema)->withTransaction($this->str_transaction_id)->gql("SELECT * FROM `" . $this->obj_schema->getKind() . "` WHERE __key__ HAS ANCESTOR @ancestorKey", ['ancestorKey' => $obj_entity]);
$this->str_last_cursor = $this->obj_gateway->getEndCursor();
return $arr_results;
}