Download the PHP package connectholland/mongo-aggregations without Composer

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

Build Status StyleCI Latest Stable Version Total Downloads Latest Unstable Version License SensioLabsInsight

MongoAggregations

Library allowing easy access to the mongo aggregate framework

Builders

This library constructs aggregation pipelines using builders. You can add stages (instances of AggregationInterface), collections of stages (AggregationBags) or other builders to construct your pipeline. A special builder is the UnwindBuilder. This Builder will create a pipeline that can unwind both strings and arrays and databases that has the two mixed (the latter should be avoided). Basically the builder will transform any mongo field to an array and then unwind that array.

Example usage of the UnwindBuilder is in its Test: https://github.com/ConnectHolland/MongoAggregations/blob/master/tests/Builder/UnwindBuilderTest.php

Supported stages

This library currently supports the following stages in the aggregate framwork:

Class Operator Description
Match $match https://docs.mongodb.org/manual/reference/operator/aggregation/match/#pipe._S_match
Project $project https://docs.mongodb.org/manual/reference/operator/aggregation/project/#pipe._S_project
Unwind $unwind https://docs.mongodb.org/manual/reference/operator/aggregation/unwind/#pipe._S_unwind
Group $group https://docs.mongodb.org/manual/reference/operator/aggregation/group/#pipe._S_group
Sort $sort https://docs.mongodb.org/manual/reference/operator/aggregation/sort/
RangeProjection A ranged projection stage, a special kind of $project which can map ranges (for example: 1 to 10) to strings (for example to 'low').

Supported operations

Within the stages operations can be used, these are currently supported:

Class Operator Description
Sum $sum https://docs.mongodb.org/manual/reference/operator/aggregation/sum/#grp._S_sum
Condition $cond https://docs.mongodb.org/manual/reference/operator/aggregation/cond/#exp._S_cond
Push $push https://docs.mongodb.org/manual/reference/operator/aggregation/push/#grp._S_push
WeekOperation $week https://docs.mongodb.org/manual/reference/operator/aggregation/week/
FieldOperation Rename a field in a projection (example: )
ArrayOperation Add an expression in a projection using a mongo array (example: )

EmbeddedCollections

The library adds a class EmbeddedCollection which can be used to create a (temporary) collection that embeds documents that another collection has referenced.

Stages or operations that aren't supported by the library, can still be used by constructing arrays. However, creating a class and the abstraction layer that comes with that is to be preferred.


All versions of mongo-aggregations with dependencies

PHP Build Version
Package Version
Requires league/csv Version ^7.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 connectholland/mongo-aggregations contains the following files

Loading the files please wait ....