Download the PHP package locomotivemtl/charcoal-search without Composer

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

Charcoal Search

This module has all the tools and utilities to create a quick search engine for a Charcoal-based projects.

It features a very customizable search engines / search configuration that allows to search in SQL database tables, Charcoal Models or do custom search.

Table of content

How to install

The preferred (and only supported) way of installing charcoal-search is with composer:

Dependencies

Example usage

Constructor options

The SearchRunner is instanciated with a single parameter, which contains the constructor options and class dependencies:

Ident Type Description
logger \Psr\Log\LoggerInterface A PSR-3 logger.
model_factory \Charcoal\Factory\FactoryInterface A factory to create objects (and logs).
search_config array A search config object

Search config

The search config object contains the search ident as well as the various searches to run on objects.

Ident Type Description
ident string
searches array The various searches to perform.

Search types

Available search types, which are defined in the search config's searches:

Custom search

The custom search defines a callback function. This can either be a callable (a method or an object with an __invoke method) or a string (which will attempt to call the function of matching name on the Search Runner object).

The callback method must have the following signature: array callback(string $keyword);

Custom options

Ident Type Description
callback callback Optional callback to defer searching to.

Table search

The table search is still todo.

Model search

The model search is still todo.

Search log

Every search is automatically logged to (SQL) storage.

Charcoal-admin integration

The search-log object comes by default with full metadata to display in charcoal-admin. Visit at [[your-site.com]]/admin/object/collection?obj-type=charcoal/search/search-log.

There are 2 widgets also available to visualize logs:

Development

To install the development environment:

To run the scripts (phplint, phpcs and phpunit):

Development dependencies

Continuous Integration

Service Badge Description
Travis Build Status Runs code sniff check and unit tests. Auto-generates API documentation.
Scrutinizer Scrutinizer Code Quality Code quality checker. Also validates API documentation quality.
Coveralls Coverage Status Unit Tests code coverage.
Sensiolabs SensioLabsInsight Another code quality checker, focused on PHP.

Coding Style

All Charcoal modules follow the same coding style and charcoal-search is no exception. For PHP:

Coding style validation / enforcement can be performed with composer phpcs. An auto-fixer is also available with composer phpcbf.

Authors

Changelog

The MIT License (MIT)

Copyright © 2016 Locomotive inc.

See Authors.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


All versions of charcoal-search with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0 || >=7.0
psr/log Version ^1.0
locomotivemtl/charcoal-object Version ~0.2
locomotivemtl/charcoal-core Version ~0.4
locomotivemtl/charcoal-app Version ~0.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 locomotivemtl/charcoal-search contains the following files

Loading the files please wait ....