PHP code example of mews / pos-bundle

1. Go to this page and download the library: Download mews/pos-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mews / pos-bundle example snippets


use Mews\Pos\PosInterface;

class MyService
{
    public function __construct(private PosInterface $pos) {}
}

use Mews\Pos\PosInterface;

class MyService
{
    public function __construct(
        private PosInterface $asseco,       // mews_pos.yaml'daki "asseco" bankası
        private PosInterface $yapikredi,    // mews_pos.yaml'daki "yapikredi" bankası
    ) {}
}

use Mews\Pos\PosInterface;
use Symfony\Component\DependencyInjection\Attribute\TaggedIterator;

class MyService
{
    public function __construct(
        #[TaggedIterator('mews_pos.gateway')]
        private iterable $banks,
    ) {}
}

use Mews\Pos\PosQuery\PosQueryInterface;

class MyService
{
    public function __construct(private PosQueryInterface $posQuery) {}
}

use Mews\Pos\PosQuery\PosQueryInterface;

class MyService
{
    public function __construct(
        private PosQueryInterface $asseco,
        private PosQueryInterface $yapikredi,
    ) {}
}

use Mews\Pos\PosQuery\PosQueryInterface;
use Symfony\Component\DependencyInjection\Attribute\TaggedIterator;

class MyService
{
    public function __construct(
        #[TaggedIterator('mews_pos.query')]
        private iterable $posQueries,
    ) {}
}