Download the PHP package youwe/pimcore-excelculator without Composer

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

PIMCORE EXCEL EXTENSION

Version: Pimcore 4.x

Note: NOT compatible with Pimcore versions under 4

Developed by: Youwe (Roelf)

Excerpt

... then this extension is for you!

Description

The pimcore deployment extension as the following general functionalities:

Usage and examples

Enable the plugin in Pimcore!

Run the service / make sure its running when your server boots up:

php ./plugins/PimcoreExcelculator/cli/PimcoreExcelculatorServer.php

Try the test to make sure the service works:

php ./plugins/PimcoreExcelculator/cli/PimcoreExcelculatorServerTest.php

Configure your own excel files (and socket-binding) to perform calculations with:

cp ./plugins/PimcoreExcelculator/pimcore-excel-config.default.php ./website/var/config/pimcore-excel-config.php
vi ./website/var/config/pimcore-excel-config.php

Example code without error handling

// simple example

$calcey = new \PimcoreExcelculator\PimcoreExcelculatorCalc('included-demo-file');
$calcey->set([
    'A3' => 420,
    'A4' => 246
]);

$results = $calcey->get(['A5']);

echo 'result: ' . var_export($results, true);

Example code with error handling

// you want to catch possible errors, because this functionality
// depends on a service that should be running in the background,
// and there is always the possibility that the service is busy
// or has not been started, or has crashed

$calcey = new \PimcoreExcelculator\PimcoreExcelculatorCalc('included-demo-file');
$calcey->set([
    'A3' => 420,
    'A4' => 246
]);

try {
    $results = $calcey->get(['A5']);
}
catch (\Throwable $t) {
    if($t->getCode() == 888) {
        // could not connect to the service!
    } 
    else {
        // something else is wrong  ( check $t->getMessage() )
    }
}

echo 'result: ' . var_export($results, true);

Example code with error handling and different sheets in one file

$calcey = new \PimcoreExcelculator\PimcoreExcelculatorCalc('some-not-included-file');
$calcey->set([
    'sheetOne.A3' => 420,
    'sheetTwo.A4' => 246
]);

try {
    $results = $calcey->get(['sheetThree.A5', 'sheetFour.C6']);
}
catch (\Throwable $t) {
    if($t->getCode() == 888) {
        // could not connect to the service!
    } 
    else {
        // something else is wrong  ( check $t->getMessage() )
    }
}

echo 'result: ' . var_export($results, true);

Deployment to server

Run the service / make sure its running when your server boots up:

php ./plugins/PimcoreExcelculator/cli/PimcoreExcelculatorServer.php

You can do this, for example, using a cron job:

*/1 * * * * flock -n /tmp/pimcore.excel.lockfile -c "/usr/bin/php /var/www/html/plugins/PimcoreExcelculator/cli/PimcoreExcelculatorServer.php"

Troubleshooting

Before importing the definitions, you might need to set the correct permissions, in order for this script to be able to write to the definition files. In case of local development, a low security solution like the following could be used:

sudo chmod -R 777 .

Make sure you have your local apache running as root or your user, or it might not be able to connect to the service:

On macOS/OSX:

in httpd.conf

User my-username
Group _www

or

User root
Group _www

Installation

Plugin can be installed through composer. Add json to your composer.json:

composer require youwe/pimcore-excelculator

Activate/enable the plugin in pimcore's extras->extensions list.

Also, add this to your .gitignore:

/plugins/PimcoreExcelculator

Plugin development

To create a new version, check out the master branch somewhere and go:

git tag
git tag 0.x.x         (minor update = latest tag + 0.0.1)
git push origin --tags

All versions of pimcore-excelculator with dependencies

PHP Build Version
Package Version
Requires pimcore/installer-plugin Version >=1
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 youwe/pimcore-excelculator contains the following files

Loading the files please wait ....