GDS\Gateway::ensureSchema PHP Method

ensureSchema() protected method

Default Kind & Schema support for "new" Entities
protected ensureSchema ( Entity[] $arr_entities )
$arr_entities Entity[]
    protected function ensureSchema($arr_entities)
    {
        foreach ($arr_entities as $obj_gds_entity) {
            if ($obj_gds_entity instanceof Entity) {
                if (null === $obj_gds_entity->getKind()) {
                    $obj_gds_entity->setSchema($this->obj_schema);
                }
            } else {
                throw new \InvalidArgumentException('You gave me something other than GDS\\Entity objects.. not gonna fly!');
            }
        }
    }