Download the PHP package jamesmoss/flywheel without Composer

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

Flywheel

Build Status Scrutinizer Quality Score Code Coverage

A flat-file, serverless, document database for PHP that can store data in JSON, YAML or Markdown formats.

Often MySQL can be overkill for a small site or blog installation. Although it's present by as standard on many hosting packages it still requires several manual steps including configuration, user and databases creation etc.

Additionally, content stored in MySQL databases is impossible (or at least very difficult) to track using version control software. This makes sharing a site or app between a team difficult, requiring everybody to have access to a master database or their own copy. There's also complications when apps are setup on staging servers and changes that users make must be reflected in a developer's local copy. You've probably come up against this issue in the past and it's all a bit of a mess.

Flywheel hopes to enable a new breed of PHP apps and libraries by giving developers access to a datastore that acts in a similar way to a NoSQL database but has zero external dependencies. Documents (essentially associative arrays), can be saved and retrieved, sorted and limited.

Currently Flywheel is in heavy development and is not production ready yet. You might find that documents created from one version of Flywheel can't be loaded by another right now. As we get closer and closer to a v1 this is less likely to happen.

Flywheel is opinionated software. The following is assumed:

Requirements

Optionally

Installation

Use Composer to install the flywheel package. Package details can be found on Packagist.org.

Run composer require jamesmoss/flywheel in your project directory to install the Flywheel package.

Use

Querying

You can filter down the number of documents returned by using the where, andWhere and orWhere methods on a query.

You can pass in an anonymous function to the where, andWhere and orWhere methods to group predicates together. The anonymous function takes one parameter which is an instance of JamesMoss\Flywheel\Predicate and has the same methods. You can nest as many times you as like.

Important Traditional logical operator precedence is not implemented yet. If you have a mix of AND and ORs then you might not see the behaviour you expect. Currently AND predicates are processed before OR, regardless of the order they were defined in. Always use anonymous function to group your predicates together explictly if you have a mix of AND and ORs.

The list of available comparison operators are:

It's possible to order the returned result using orderBy.

You can limit how many documents get returned from the repo using limit. Offsets are also supported much like a traditional database.

Config options

Formats

By default documents are saved and parsed as JSON as it's fast and encoding/decoding is built into PHP. There are two other serialisation formats you can choose too, YAML and Markdown (with YAML front matter).

You can choose the format by passing it into the Config when you initialise it.

The following formatter classes are available.

Important If you use the YAML or Markdown formatters when using the --no-dev flag in Composer you'll need to manually add mustangostang\spyc to your composer.json. Flywheel tries to keep it's dependencies to a minimum.

If you write your own formatter it must implement JamesMoss\Flywheel\Formatter\Format.

Todo

Running tests

There is good test coverage at the moment. If you'd like to run the tests yourself, use the following:

$ composer install
$ phpunit

Contributing

If you spot something I've missed, fork this repo, create a new branch and submit a pull request. Make sure any features you add are covered by unit tests and you don't break any other tests.


All versions of flywheel with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.2
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 jamesmoss/flywheel contains the following files

Loading the files please wait ....