Download the PHP package phptek/jsontext without Composer

On this page you can find all versions of the php package phptek/jsontext. 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 jsontext

SilverStripe JSONText

Build Status Scrutinizer Code Quality License

Exposes a complete API that allows developers to write-to, and query-from JSON in a dedicated DBField subclass.

In addition, if your project uses the silverstripe/cms package, then all SiteTree objects are automatically extended to allow multiple, arbitrary UI fields as declared in getCMSFields(), to write to a JSON object in a single database field.

Using JSONPath (Think XPath but for JSON) and the module's extensive API, developers can selectively target specific JSON keys for modification.

Requirements

SilverStripe 4

SilverStripe 3

Features

Introduction

The module exposes a fully featured JSON query and update API allowing developers to use XPath-like queries via JSONPath or Postgres' JSON operators (with some differences, see below) to query and update JSON data.

Why?

Project scenarios where storing 10s of terse configuration parameters as Booleans and Ints in separate database columns just seems crazy.

When all you wanted was a simple key / value store but didn't want to muck about with the overhead of an RDBMS and a NOSQL DB.

That Postgres, MySQL, Oracle and MSSQL 2016 all have, or at time of writing, are planning to have, Database level JSON field-types. This module plugs the gap for users of RDBMS' without native JSON support, while offering the a convenient scaffold on top of which native JSON support could be built.

Postgres

In Postgres both the -> and ->> operators act as string and integer key matchers on a JSON array or JSON object respectively. The module however treats both source types the same - they are after all both JSON so -> is used as an Integer Matcher and ->> as a String Matcher regardless of the "type" of source JSON stored. The #> Path Matcher operator can act as an object or a text matcher, but the module wishes to simplify things and as such the #> operator is just a simple path matcher.

Return types

Regardless of the type of query you can set what type you'd like the data returned in via the setReturnType() method on a query by query basis.

Legitimate types are:

If using SilverStripe as the return type, the module will automatically cast the result(s) to one of SilverStripe's DBObject subtypes:

If there are multiple results from a query, the output will be an indexed array containing a single-value array for each result found.

The module also allows developers to selectively update all, or just parts of the source JSON, via JSONPath expressions passed to an overloaded setValue() method.

See the usage docs for examples of JSONPath and Postgres querying and updating.

Note: This module's query API is based on a relatively simple JSON to array conversion principle. It does not use Postgres' or MySQL's native JSON operators at or below the level of the ORM. The aim however is to allow dev's to use their preferred DB's syntax, and to this end you can set the module into mysql or postgres mode using SS config, see Configuration Docs.

Installation

#> composer require phptek/jsontext

Configuration

See: Configuration Docs.

Usage

See: Usage Docs.

Contributing

If you've been using Postgres or MySQL with its JSON functions for some time, I'm keen to hear from you. Some simple failing tests would be most welcome.

See: CONTRIBUTING.md.

Reporting an issue

Please include all details, no matter how small. If it were your module, what would you need to know from a bug/feature request? :-)

Credits

Author

Russell Michell 2016-2018 [email protected]

TODO

Support Me

If you like what you see, support me! I accept Bitcoin:

Bitcoin
3KxmqFeVWoigjvXZoLGnoNzvEwnDq3dZ8Q

 

 


All versions of jsontext with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
silverstripe/framework Version ^4.0
peekmo/jsonpath Version dev-master
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 phptek/jsontext contains the following files

Loading the files please wait ....