Code Monkey home page Code Monkey logo

mlphp's People

Contributors

eedeebee avatar wooldridge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mlphp's Issues

Incorrect Setting Of CURLOPT_HTTPHEADER In RESTClient

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);

Please check Search.php for syntax error

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.

Very Little Feedback on Whether a Request was Successful

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.

USBills: Bill page does not pass back query in Back link

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.

Composer install issue

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

  • Removing marklogic/mlphp (v0.0.2)
  • Installing marklogic/mlphp (dev-master c3aa3de): Loading from cache
    Writing lock file
    Generating optimized autoload files
    Deprecation Notice: Class MarkLogic\MLPHP\Test\SmokeTest located in C:/Git/emerald/ums/ums_frontend/vendor/marklogic/mlphp/tests\MarkLogic\MLPHP\Test\1SmokeTest.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201
    Deprecation Notice: Class MarkLogic\MLPHP\Test\SearchTestXML located in C:/Git/emerald/ums/ums_frontend/vendor/marklogic/mlphp/tests\MarkLogic\MLPHP\Test\SearchXMLTest.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201
    `
    Regards
    Moon

Examples pages crash Apache on Windows

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?

Calling a REST extension?

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?

Search results not supporting QName-based metadata extracts

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:

http://docs.marklogic.com/guide/rest-dev/appendixb#id_94425

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.