Download the PHP package pdsinterop/solid-crud without Composer

On this page you can find all versions of the php package pdsinterop/solid-crud. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package solid-crud

Solid Resource Server

Project stage: Development Latest Version Maintained

PDS Interop standard-readme compliant keep-a-changelog compliant

Solid HTTPS REST API specification compliant implementation for handling Resource CRUD

The Solid specification for reading and writing resources in Solid Server (or "Solid Pod") extends the Linked Data Platform specification.

This project provides a single-class API for CRUD operations on resources and containers, that adheres to the Solid HTTPS REST API Spec.

The used Request and Response objects are compliant with the PHP Standards Recommendations for HTTP Message Interface (PSR-7) to make integration into existing projects and frameworks easier.

Table of Contents

Background

This project is part of the PHP stack of projects by PDS Interop. It is used by both the Solid-Nextcloud app and the standalone PHP Solid server.

As the functionality seemed useful for other projects, it was implemented as a separate package.

Installation

The advised install method is through composer:

PHP version 7.3 and higher is supported. The mbstring extension needs to be enabled in order for this package to work.

Usage

This package provides a Pdsinterop\Solid\Resources\Server class which, when provided with a PSR-7 compliant Request object, will return a PSR-7 compliant Response object.

To work, the server needs an object that implements League\Flysystem\FilesystemInterface and an object that implements Psr\Http\Message\ResponseInterface

The concrete Filesystem object must be provided with the Rdf adapter and the AsMime plugin provided by pdsinterop/flysystem-rdf. Depending on your own use-cases, it can also be provided with the ReadRdf plugin (provided by the same package).

Creating the filesystem

This is an example of how to create a filesystem object, using the local adapter

for more details on using the filesystem, please see the documentation at pdsinterop/flysystem-rdf.

Creating the server

with the filesystem, the server can be created, together with a response object. For this example we are using the Laminas Diactoros Response object is used, but any PSR-7 compliant response object will do:

Handling a request

Once the server is created it can be provided a request to handle. The Request object in this example is created by a PSR-17 compliant ServerRequest Factory (also provided by the Laminas Diactoros package) but any PSR-7 compliant request object will work:

This will populate and return the Response object the server was provided with for further handling by your application or framework.

Changing a request

If there is a difference between the request you receive and that which the server object is expected to handle, the request object should be altered before being passed to the server.

For instance to change the requested path:

or the request method:

Full Example

Putting all of this together would give us something like this:

A fully working example has been provided at src/example.php.

To try out this dummy server, run:

or have composer run it for you by calling: composer run dev:example

The server is expected to run on HTTPS, but it can be forced to accept

Contributing

Questions or feedback can be given by opening an issue on GitHub.

All PDS Interop projects are open source and community-friendly. Any contribution is welcome! For more details read the contribution guidelines.

All PDS Interop projects adhere to the Code Manifesto as its code-of-conduct. Contributors are expected to abide by its terms.

There is a list of all contributors on GitHub.

For a list of changes see the the GitHub releases page.

License

All code created by PDS Interop is licensed under the MIT License.


All versions of solid-crud with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-mbstring Version *
laminas/laminas-diactoros Version ^2.14
league/flysystem Version ^1.0
mjrider/flysystem-factory Version ^0.7
pdsinterop/flysystem-rdf Version ^0.5
pietercolpaert/hardf Version ^0.3
psr/http-factory Version ^1.0
psr/http-message Version ^1.0
textalk/websocket Version ^1.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pdsinterop/solid-crud contains the following files

Loading the files please wait ....