public function setTable($table)
    {
        if (is_array($table)) {
            if (!isset($table['name'])) {
                throw new \InvalidArgumentException('A name key is required when passing an array to setTable()');
            }
            $this->table = $table['name'];
        } else {
            $this->table = $table;
        }
    }
public function setTable($table)
    {
        if (is_array($table)) {
            if (!isset($table['name'])) {
                throw new \InvalidArgumentException('A name key is required when passing an array to setTable()');
            }
            $this->table = $table['name'];
        } else {
            $this->table = $table;
        }
    }
public function setTable ( $ table ) { if ( is_array ( $ table ) ) { if ( ! isset ( $ table [ 'name' ] ) ) { throw new \ InvalidArgumentException ( 'A name key is required when passing an array to setTable()' ) ; } $ this -> table = $ table [ 'name' ] ; } else { $ this -> table = $ table ; } }
Sets the table this document is mapped to.

@param array|string $table The table name.

@throws \InvalidArgumentException
Sets the table this document is mapped to .