marklogic-community / mlphp Goto Github PK
View Code? Open in Web Editor NEWPHP Connector for MarkLogic REST API
Home Page: http://marklogic.github.com/mlphp
License: Apache License 2.0
PHP Connector for MarkLogic REST API
Home Page: http://marklogic.github.com/mlphp
License: Apache License 2.0
In the RESTClient class there is:
foreach ($headers as $key => $val) {
curl_setopt($ch, CURLOPT_HTTPHEADER, array($key . ': ' . $val));
}
This is incorrect, instead of passing in multiple arrays you have to pass onearray of values (http://php.net/manual/en/function.curl-setopt.php), for example I've tweaked it so that it works by doing the following:
foreach ($headers as $key => $val) {
$formattedHeaders[] = $key . ':' . $val;
}
curl_setopt($ch, CURLOPT_HTTPHEADER, $formattedHeaders);
Hello MarkLogic, recently while using PHP Rest API code, I got an error involving the word 'collection' not being a defined constant.
https://github.com/marklogic/mlphp/blob/master/api/MarkLogic/MLPHP/Search.php
Line 340: public function setCollection($collection)
Line 342: $this->collection = collection;
should this really be: $this->collection = $collection
; ? (Dollar sign in front of word collection).
I changed it in my copy of the code and then the code functioned as expected.
Still seeing results returned when this is used by search:
$options = new MLPHP\Options(parent::$client, 'testReturnResults');
$options->setReturnResults('false')->write();
The logger works, but I would suggest that the document modification methods (delete
, write
, etc) return some sort of feedback -- true
or false
for success and failure.
Or you could just not catch exceptions and let end users do it.
The extract-metadata option is deprecated. Need to handle extract-document-data option:
Need to decide whether to use PHP namespaces, which were introduced in 5.3. Or use pseudo-namespacing, which would offer support for PHP versions prior to 5.3.
See:
https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md
In USBills app, if a user searched for a term ("cat") on the original search page, this should be stored on the bill detail page and passed back in "Back to results" link so that original search is reperformed.
I.e., add query=cat to link query text.
Hey Mike,
I noticed that the headerArr is not being initialized and it's giving an error here: https://github.com/marklogic/mlphp/blob/develop/api/MarkLogic/MLPHP/RESTClient.php#L253-L257
See f63fb97#L0R25
require-dev
allows you to define dependencies that aren't loaded by default. Unless PHPDoctor is part of the normal functioning of the library, it belongs there.
Hello
I have an installation issue with composer as below
Could you let me know what the issue could be?
`
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
https://docs.marklogic.com/guide/rest-dev/bulk
Does this exist in the library? If not, it would be an excellent feature.
All examples pages (other than examples index page) cause Apache to stop working on Windows (using XAMPP). Photomap and US Bills demos are OK. What are the examples pages doing differently?
From the documentation, it appears you can create a RESTRequest
and set the resource, such as documents
. To call a REST extension, would you set the resource to resource/myResource
?
In results XML, extract metadata defined with QName shows up as (for example) status element below:
<search:metadata>
<status date="2011-03-10">introduced</status>
<search:constraint-meta name="title">Some title</search:constraint-meta>
</search:metadata>
Currently not parsing these metadata elements (the ones that aren't constraint-meta) in SearchResult constructor.
The extract-metadata option is deprecated so probably just replace with extract-document-data:
mlphp has no support for QBE queries, I wonder how to work on qbe with out the mlphp
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.