Download the PHP package tangoman/repository-helper without Composer

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

TangoMan Repository Helper

TangoMan Repository Helper provides trait with useful functions for your repositories.

Installation

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Usage

Inside your repository

Add "use" statement just like when you're using a trait.

Inside your controller

Inside your views

Search Form

Will generate this: .../admin/posts/?user-username=admin

Order Link

Will generate this: .../admin/posts/?page=1&order=user-username&way=ASC

Helper Public Methods

function description parameters return
getTableName() Returns current table name n/a string
countBy($criteria = []) Returns element count, filtered by given criteria array integer
distinct($property, $criteria = []) Lists distinct items from desired column, filtered by given criteria string, array array
findAllPaged($page = 1, $limit = 10, $criteria = []) Returns X results with pagination, starting from given page, filtered by given criteria integer, integer, array (object)Paginator
findByQuery(Request $request, $criteria = []) Returns query result with pagination, filtered by given criteria (object)Request, array (object)Paginator
findByQueryScalar(Request $request, $criteria = []) Return query as scalar result with pagination, filtered by given criteria (object)Request, array (object)Paginator
export(Request $request, $criteria = []) Return all objects as scalar result, filtered by given criteria (object)Request, array array

Query Parameters

parameter type value
order string switch-entity-property
way string (ASC/DESC)
limit integer [1-9]+\d?
page integer [1-9]+\d?
join string switch-entity-property

Switches

Switch values for mode/operator/action

switch mode description
a andWhere andWhere
b search boolean
c order count
e search exactMatch
l search like
n search notNull
o orWhere orWhere
p order property
r order orderBy
s search simpleArray

Error

When symfony raises following QueryException exception:

[Semantical Error] line X, col XX near 'foo LIKE': Error: Invalid PathExpression. Must be a StateFieldPathExpression.

It means that you have an error inside your form: <input name="foo-bar">, attribute doesn't target appropriate joined entity.

Try <input name="foo-bar-title">, or <input name="bar-title">, TangoMan Repository Helper will automatically handle the join.

Note

If you find any bug please report here : Issues

License

Copyright (c) 2018 Matthias Morin

Distributed under the MIT license.

If you like TangoMan Repository Helper please star! And follow me on GitHub: TangoMan75 ... And check my other cool projects.

Matthias Morin | LinkedIn


All versions of repository-helper with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
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 tangoman/repository-helper contains the following files

Loading the files please wait ....