public static function createFromArray($values, array $options = [])
    {
        $document = new static($options);
        foreach ($values as $key => $value) {
            $document->set($key, $value);
        }

        $document->setChanged(true);

        return $document;
    }
public static function createFromArray($values, array $options = [])
    {
        $document = new static($options);
        foreach ($values as $key => $value) {
            $document->set($key, $value);
        }

        $document->setChanged(true);

        return $document;
    }
public static function createFromArray ( $ values , array $ options = [ ] ) { $ document = new static ( $ options ) ; foreach ( $ values as $ key => $ value ) { $ document -> set ( $ key , $ value ) ; } $ document -> setChanged ( true ) ; return $ document ; }
Factory method to construct a new document using the values passed to populate it

@throws ClientException

@param array $values  - initial values for document
@param array $options - optional, initial options for document

@return Document|Edge|Graph
Factory method to construct a new document using the values passed to populate it