├── .babelrc ├── i18n ├── ar ├── bg ├── cs ├── da ├── de ├── es ├── et ├── fa ├── fi ├── fr ├── hr ├── hu ├── id ├── it ├── ja ├── ko ├── my ├── nl ├── no ├── pl ├── pt ├── ro ├── ru ├── sk ├── sl ├── sr ├── tr ├── uk ├── vi ├── zh ├── es_AR ├── pt_BR ├── zh_CN ├── core-client-jsonapi.pot ├── ko.po ├── my.po ├── da.po ├── no.po ├── ar.po ├── vi.po ├── id.po ├── es_AR.po ├── zh_CN.po ├── et.po ├── fi.po ├── sr.po ├── ja.po ├── hr.po ├── cs.po ├── sk.po ├── ro.po ├── pl.po ├── pt.po ├── zh.po ├── uk.po ├── ru.po ├── de.po ├── pt_BR.po ├── sl.po ├── bg.po ├── tr.po ├── nl.po ├── es.po ├── hu.po ├── fa.po ├── it.po └── fr.po ├── .gitignore ├── templates └── client │ └── jsonapi │ ├── error-standard.php │ ├── get-standard.php │ ├── aggregate-standard.php │ ├── options-standard.php │ ├── subscription │ └── standard.php │ ├── customer │ ├── property │ │ └── standard.php │ ├── review │ │ └── standard.php │ ├── relationships │ │ └── standard.php │ └── address │ │ └── standard.php │ ├── locale │ └── standard.php │ ├── site │ └── standard.php │ ├── review │ └── standard.php │ ├── catalog │ └── standard.php │ ├── stock │ └── standard.php │ ├── service │ └── standard.php │ ├── supplier │ └── standard.php │ └── attribute │ └── standard.php ├── manifest.php ├── src ├── Client │ └── JsonApi │ │ ├── Exception.php │ │ ├── Basket │ │ └── Base.php │ │ ├── Common │ │ └── Decorator │ │ │ ├── Iface.php │ │ │ └── Base.php │ │ ├── Iface.php │ │ └── Standard.php └── Base │ └── View │ └── Helper │ └── Jincluded │ └── Iface.php ├── tests ├── bootstrap.php ├── phpunit.xml ├── phpunit-coverage.xml ├── Client │ ├── JsonApiTest.php │ └── JsonApi │ │ ├── StandardTest.php │ │ ├── Common │ │ └── Decorator │ │ │ └── BaseTest.php │ │ ├── BaseTest.php │ │ └── Stock │ │ └── StandardTest.php ├── Base │ └── View │ │ └── Helper │ │ └── Jincluded │ │ └── StandardTest.php └── TestHelper.php ├── config └── client.php ├── README.md ├── composer.json ├── package.json └── phing.xml /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/preset-env"] 3 | } -------------------------------------------------------------------------------- /i18n/ar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/ar -------------------------------------------------------------------------------- /i18n/bg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/bg -------------------------------------------------------------------------------- /i18n/cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/cs -------------------------------------------------------------------------------- /i18n/da: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/da -------------------------------------------------------------------------------- /i18n/de: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/de -------------------------------------------------------------------------------- /i18n/es: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/es -------------------------------------------------------------------------------- /i18n/et: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/et -------------------------------------------------------------------------------- /i18n/fa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/fa -------------------------------------------------------------------------------- /i18n/fi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/fi -------------------------------------------------------------------------------- /i18n/fr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/fr -------------------------------------------------------------------------------- /i18n/hr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/hr -------------------------------------------------------------------------------- /i18n/hu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/hu -------------------------------------------------------------------------------- /i18n/id: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/id -------------------------------------------------------------------------------- /i18n/it: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/it -------------------------------------------------------------------------------- /i18n/ja: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/ja -------------------------------------------------------------------------------- /i18n/ko: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/ko -------------------------------------------------------------------------------- /i18n/my: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/my -------------------------------------------------------------------------------- /i18n/nl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/nl -------------------------------------------------------------------------------- /i18n/no: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/no -------------------------------------------------------------------------------- /i18n/pl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/pl -------------------------------------------------------------------------------- /i18n/pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/pt -------------------------------------------------------------------------------- /i18n/ro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/ro -------------------------------------------------------------------------------- /i18n/ru: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/ru -------------------------------------------------------------------------------- /i18n/sk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/sk -------------------------------------------------------------------------------- /i18n/sl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/sl -------------------------------------------------------------------------------- /i18n/sr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/sr -------------------------------------------------------------------------------- /i18n/tr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/tr -------------------------------------------------------------------------------- /i18n/uk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/uk -------------------------------------------------------------------------------- /i18n/vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/vi -------------------------------------------------------------------------------- /i18n/zh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/zh -------------------------------------------------------------------------------- /i18n/es_AR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/es_AR -------------------------------------------------------------------------------- /i18n/pt_BR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/pt_BR -------------------------------------------------------------------------------- /i18n/zh_CN: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aimeos/ai-client-jsonapi/HEAD/i18n/zh_CN -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .phpunit.result.cache 3 | .phpunit.cache 4 | coveralls.json 5 | coverage.xml 6 | *.log 7 | *.ser 8 | -------------------------------------------------------------------------------- /templates/client/jsonapi/error-standard.php: -------------------------------------------------------------------------------- 1 | 12 | { 13 | errors ) ) : ?> 14 | "errors": errors, JSON_PRETTY_PRINT ); ?> 15 | 16 | 17 | } 18 | -------------------------------------------------------------------------------- /manifest.php: -------------------------------------------------------------------------------- 1 | 'ai-client-jsonapi', 5 | 'depends' => [ 6 | 'aimeos-core', 7 | 'ai-controller-frontend', 8 | ], 9 | 'config' => [ 10 | 'config', 11 | ], 12 | 'include' => [ 13 | 'src', 14 | ], 15 | 'i18n' => [ 16 | 'client/jsonapi' => 'i18n', 17 | ], 18 | 'template' => [ 19 | 'client/jsonapi/templates' => [ 20 | 'templates/client/jsonapi', 21 | ], 22 | ], 23 | ]; 24 | -------------------------------------------------------------------------------- /src/Client/JsonApi/Exception.php: -------------------------------------------------------------------------------- 1 | [ 5 | 'resources' => [ 6 | 'attribute' => 'attribute', 7 | 'basket' => 'basket', 8 | 'catalog' => 'catalog', 9 | 'customer' => 'customer', 10 | 'locale' => 'locale', 11 | 'order' => 'order', 12 | 'product' => 'product', 13 | 'review' => 'review', 14 | 'service' => 'service', 15 | 'site' => 'site', 16 | 'stock' => 'stock', 17 | 'subscription' => 'subscription', 18 | 'supplier' => 'supplier', 19 | ], 20 | ], 21 | ]; 22 | -------------------------------------------------------------------------------- /tests/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ../src 6 | 7 | 8 | 9 | 10 | Base/ 11 | 12 | 13 | Client/ 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/phpunit-coverage.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ../src 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Base/ 16 | 17 | 18 | Client/ 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/Client/JsonApi/Basket/Base.php: -------------------------------------------------------------------------------- 1 | context()->session(); 28 | 29 | foreach( $session->get( 'aimeos/basket/cache', [] ) as $key => $value ) { 30 | $session->set( $key, null ); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Client/JsonApi/Common/Decorator/Iface.php: -------------------------------------------------------------------------------- 1 | config( 'client/jsonapi/url/target' ); 12 | $cntl = $this->config( 'client/jsonapi/url/controller', 'jsonapi' ); 13 | $action = $this->config( 'client/jsonapi/url/action', 'options' ); 14 | $config = $this->config( 'client/jsonapi/url/config', [] ); 15 | 16 | $details = 'This is the Aimeos JSON REST API 17 | 18 | Use the HTTP OPTIONS method to retrieve a list available resources from ' . $this->url( $target, $cntl, $action, [], [], $config ) . ' 19 | Documentation about he Aimeos JSON REST API is available at https://aimeos.org/docs/latest/frontend/jsonapi/'; 20 | 21 | ?> 22 | { 23 | "errors": { 24 | "title": "Use OPTIONS method for the resource list", 25 | "detail": 26 | 27 | } 28 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | Aimeos logo 3 | 4 | 5 | # Aimeos frontend JSON REST API 6 | 7 | [![Build Status](https://circleci.com/gh/aimeos/ai-client-jsonapi.svg?style=shield)](https://circleci.com/gh/aimeos/ai-client-jsonapi) 8 | [![Coverage Status](https://coveralls.io/repos/aimeos/ai-client-jsonapi/badge.svg?branch=master)](https://coveralls.io/r/aimeos/ai-client-jsonapi?branch=master) 9 | [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/aimeos/ai-client-jsonapi/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/aimeos/ai-client-jsonapi/?branch=master) 10 | [![License](https://poser.pugx.org/aimeos/ai-client-jsonapi/license.svg)](https://packagist.org/packages/aimeos/ai-client-jsonapi) 11 | 12 | Aimeos frontend JSON REST API package for e-commerce projects 13 | 14 | [![Aimeos demo](https://aimeos.org/fileadmin/user_upload/demo.jpg)](http://demo.aimeos.org/) 15 | 16 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aimeos/ai-client-jsonapi", 3 | "description": "Aimeos frontend JSON REST API", 4 | "keywords": ["aimeos", "extension", "json", "api"], 5 | "type": "aimeos-extension", 6 | "license": "LGPL-3.0-or-later", 7 | "support": { 8 | "source": "https://github.com/aimeos/ai-client-jsonapi", 9 | "issues": "https://github.com/aimeos/ai-client-jsonapi/issues", 10 | "forum": "https://aimeos.org/help", 11 | "wiki": "https://aimeos.org/docs" 12 | }, 13 | "prefer-stable": true, 14 | "minimum-stability": "dev", 15 | "require": { 16 | "php": "^8.0.11", 17 | "aimeos/aimeos-core": "dev-master", 18 | "aimeos/ai-controller-frontend": "dev-master" 19 | }, 20 | "require-dev": { 21 | "phpunit/phpunit": "~10.0||~11.0", 22 | "nyholm/psr7-server": "~1.0" 23 | }, 24 | "autoload": { 25 | "psr-4": { 26 | "Aimeos\\": "src" 27 | }, 28 | "classmap": [ 29 | "src" 30 | ] 31 | }, 32 | "autoload-dev": { 33 | "psr-4": { 34 | "Aimeos\\": "tests" 35 | }, 36 | "classmap": [ 37 | "tests" 38 | ] 39 | } 40 | } -------------------------------------------------------------------------------- /tests/Client/JsonApiTest.php: -------------------------------------------------------------------------------- 1 | assertInstanceOf( \Aimeos\Client\JsonApi\Iface::class, $client ); 20 | } 21 | 22 | 23 | public function testCreateEmpty() 24 | { 25 | $context = \TestHelper::context(); 26 | 27 | $client = \Aimeos\Client\JsonApi::create( $context, '' ); 28 | $this->assertInstanceOf( \Aimeos\Client\JsonApi\Iface::class, $client ); 29 | } 30 | 31 | 32 | public function testCreateInvalidName() 33 | { 34 | $context = \TestHelper::context(); 35 | 36 | $this->expectException( \Aimeos\Client\JsonApi\Exception::class ); 37 | \Aimeos\Client\JsonApi::create( $context, '', '%^unknown' ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Base/View/Helper/Jincluded/Iface.php: -------------------------------------------------------------------------------- 1 | get( 'data', [] ); 13 | $type = $this->param( 'aggregate' ); 14 | 15 | foreach( $data as $key => $value ) { 16 | $entries[] = array( 'id' => $key, 'type' => $type, 'attributes' => $value ); 17 | } 18 | 19 | 20 | ?> 21 | { 22 | "meta": { 23 | "total": , 24 | "prefix": get( 'prefix' ) ); ?>, 25 | "content-baseurl": "config( 'resource/fs/baseurl' ); ?>", 26 | "content-baseurls": { 27 | "fs-media": "config( 'resource/fs-media/baseurl' ) ?>", 28 | "fs-mimeicon": "config( 'resource/fs-mimeicon/baseurl' ) ?>", 29 | "fs-theme": "config( 'resource/fs-theme/baseurl' ) ?>" 30 | } 31 | 32 | csrf()->name() != '' ) : ?> 33 | , "csrf": { 34 | "name": "csrf()->name(); ?>", 35 | "value": "csrf()->value(); ?>" 36 | } 37 | 38 | 39 | }, 40 | 41 | errors ) ) : ?> 42 | "errors": errors, JSON_PRETTY_PRINT ); ?> 43 | 44 | 45 | "data": 46 | 47 | 48 | } 49 | -------------------------------------------------------------------------------- /phing.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /tests/Base/View/Helper/Jincluded/StandardTest.php: -------------------------------------------------------------------------------- 1 | object = new \Aimeos\Base\View\Helper\Jincluded\Standard( new \Aimeos\Base\View\Standard() ); 20 | } 21 | 22 | 23 | protected function tearDown() : void 24 | { 25 | unset( $this->object ); 26 | } 27 | 28 | 29 | public function testTransformCatalog() 30 | { 31 | $manager = \Aimeos\MShop::create( \TestHelper::context(), 'catalog' ); 32 | $tree = $manager->getTree( $manager->find( 'group' )->getId(), ['media', 'text'] ); 33 | 34 | $this->assertEquals( 13, map( $this->object->transform( $tree, [] ) )->flat( 1 )->count() ); 35 | } 36 | 37 | 38 | public function testTransformCustomer() 39 | { 40 | $domains = ['customer/address', 'customer/property']; 41 | $item = \Aimeos\MShop::create( \TestHelper::context(), 'customer' )->find( 'test@example.com', $domains ); 42 | 43 | $this->assertEquals( 2, map( $this->object->transform( $item, [] ) )->flat( 1 )->count() ); 44 | } 45 | 46 | 47 | public function testTransformProduct() 48 | { 49 | $domains = ['attribute', 'catalog', 'media', 'price', 'product', 'product/property', 'supplier', 'stock', 'text']; 50 | $item = \Aimeos\MShop::create( \TestHelper::context(), 'product' )->find( 'CNE', $domains ); 51 | 52 | $this->assertGreaterThanOrEqual( 74, map( $this->object->transform( $item, [] ) )->flat( 1 )->count() ); 53 | } 54 | 55 | 56 | public function testTransformProducts() 57 | { 58 | $domains = ['attribute', 'catalog', 'media', 'price', 'product', 'product/property', 'supplier', 'stock', 'text']; 59 | $item = \Aimeos\MShop::create( \TestHelper::context(), 'product' )->find( 'CNE', $domains ); 60 | 61 | $this->assertGreaterThanOrEqual( 74, map( $this->object->transform( [$item], [] ) )->flat( 1 )->count() ); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /templates/client/jsonapi/options-standard.php: -------------------------------------------------------------------------------- 1 | config( 'client/jsonapi/url/target' ); 12 | $cntl = $this->config( 'client/jsonapi/url/controller', 'jsonapi' ); 13 | $action = $this->config( 'client/jsonapi/url/action', 'options' ); 14 | $config = $this->config( 'client/jsonapi/url/config', [] ); 15 | 16 | $resources = $default = []; 17 | 18 | if( ( $currency = $this->param( 'currency' ) ) != null ) { 19 | $default['currency'] = $currency; 20 | } 21 | 22 | if( ( $locale = $this->param( 'locale' ) ) != null ) { 23 | $default['locale'] = $locale; 24 | } 25 | 26 | foreach( $this->get( 'resources', [] ) as $resource ) { 27 | $resources[$resource] = $this->url( $target, $cntl, $action, ['resource' => $resource] + $default, [], $config ); 28 | } 29 | 30 | 31 | ?> 32 | { 33 | "meta": { 34 | "prefix": get( 'prefix' ) ); ?>, 35 | "content-baseurl": "config( 'resource/fs/baseurl' ); ?>", 36 | "content-baseurls": { 37 | "fs-media": "config( 'resource/fs-media/baseurl' ) ?>", 38 | "fs-mimeicon": "config( 'resource/fs-mimeicon/baseurl' ) ?>", 39 | "fs-theme": "config( 'resource/fs-theme/baseurl' ) ?>" 40 | } 41 | 42 | csrf()->name() != '' ) : ?> 43 | , "csrf": { 44 | "name": "csrf()->name(); ?>", 45 | "value": "csrf()->value(); ?>" 46 | } 47 | 48 | locale ) ) : ?> 49 | , "locale": get( 'locale', [] ), JSON_FORCE_OBJECT ); ?> 50 | 51 | 52 | 53 | , "resources": 54 | 55 | 56 | filter ) ) : ?> 57 | , "filter": filter, JSON_PRETTY_PRINT ); ?> 58 | 59 | 60 | sort ) ) : ?> 61 | , "sort": sort, JSON_PRETTY_PRINT ); ?> 62 | 63 | 64 | attributes ) ) : ?> 65 | , "attributes": attributes, JSON_PRETTY_PRINT ); ?> 66 | 67 | 68 | } 69 | 70 | errors ) ) : ?> 71 | , "errors": errors, JSON_PRETTY_PRINT ); ?> 72 | 73 | 74 | } 75 | -------------------------------------------------------------------------------- /tests/Client/JsonApi/StandardTest.php: -------------------------------------------------------------------------------- 1 | context = \TestHelper::context(); 22 | $this->view = $this->context->view(); 23 | 24 | $this->object = new \Aimeos\Client\JsonApi\Standard( $this->context, '' ); 25 | $this->object->setView( $this->view ); 26 | } 27 | 28 | 29 | public function testGet() 30 | { 31 | $response = $this->object->get( $this->view->request(), $this->view->response() ); 32 | $result = json_decode( (string) $response->getBody(), true ); 33 | 34 | $this->assertEquals( 200, $response->getStatusCode() ); 35 | $this->assertEquals( 1, count( $response->getHeader( 'Allow' ) ) ); 36 | $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); 37 | 38 | $this->assertArrayHasKey( 'title', $result['errors'] ); 39 | } 40 | 41 | 42 | public function testOptions() 43 | { 44 | $response = $this->object->options( $this->view->request(), $this->view->response() ); 45 | $result = json_decode( (string) $response->getBody(), true ); 46 | 47 | $this->assertEquals( 200, $response->getStatusCode() ); 48 | $this->assertEquals( 1, count( $response->getHeader( 'Allow' ) ) ); 49 | $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); 50 | 51 | $this->assertEquals( null, $result['meta']['prefix'] ); 52 | $this->assertGreaterThanOrEqual( 12, count( $result['meta']['resources'] ) ); 53 | $this->assertArrayNotHasKey( 'errors', $result ); 54 | } 55 | 56 | 57 | public function testOptionsException() 58 | { 59 | $object = $this->getMockBuilder( \Aimeos\Client\JsonApi\Standard::class ) 60 | ->setConstructorArgs( [$this->context, ''] ) 61 | ->onlyMethods( ['context'] ) 62 | ->getMock(); 63 | 64 | $object->expects( $this->once() )->method( 'context' ) 65 | ->will( $this->throwException( new \Exception() ) ); 66 | 67 | 68 | $object->setView( $this->view ); 69 | 70 | $response = $object->options( $this->view->request(), $this->view->response() ); 71 | $result = json_decode( (string) $response->getBody(), true ); 72 | 73 | 74 | $this->assertEquals( 500, $response->getStatusCode() ); 75 | $this->assertArrayHasKey( 'errors', $result ); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /i18n/core-client-jsonapi.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: PACKAGE VERSION\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #, php-format 21 | msgid "Address type or attributes are missing" 22 | msgstr "" 23 | 24 | #, php-format 25 | msgid "Attributes are missing" 26 | msgstr "" 27 | 28 | #, php-format 29 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 30 | msgstr "" 31 | 32 | #, php-format 33 | msgid "Class \"%1$s\" not found" 34 | msgstr "" 35 | 36 | #, php-format 37 | msgid "Coupon code is missing" 38 | msgstr "" 39 | 40 | #, php-format 41 | msgid "ID is missing" 42 | msgstr "" 43 | 44 | #, php-format 45 | msgid "Invalid JSON in body" 46 | msgstr "" 47 | 48 | #, php-format 49 | msgid "Invalid characters in class name \"%1$s\"" 50 | msgstr "" 51 | 52 | #, php-format 53 | msgid "Invalid class name \"%1$s\"" 54 | msgstr "" 55 | 56 | #, php-format 57 | msgid "Invalid client \"%1$s\"" 58 | msgstr "" 59 | 60 | #, php-format 61 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 62 | msgstr "" 63 | 64 | #, php-format 65 | msgid "Invalid factory \"%1$s\"" 66 | msgstr "" 67 | 68 | #, php-format 69 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 70 | msgstr "" 71 | 72 | #, php-format 73 | msgid "No view available" 74 | msgstr "" 75 | 76 | msgid "Not allowed for this resource" 77 | msgstr "" 78 | 79 | #, php-format 80 | msgid "Position (ID) is missing" 81 | msgstr "" 82 | 83 | #, php-format 84 | msgid "Product ID is missing" 85 | msgstr "" 86 | 87 | #, php-format 88 | msgid "Required attribute \"order.baseid\" is missing" 89 | msgstr "" 90 | 91 | #, php-format 92 | msgid "Required parameter \"%1$s\" is missing" 93 | msgstr "" 94 | 95 | #, php-format 96 | msgid "Service ID in attributes is missing" 97 | msgstr "" 98 | 99 | #, php-format 100 | msgid "Service attributes are missing" 101 | msgstr "" 102 | 103 | #, php-format 104 | msgid "Service type (ID) is missing" 105 | msgstr "" 106 | 107 | #, php-format 108 | msgid "Type (ID) is missing" 109 | msgstr "" 110 | 111 | #, php-format 112 | msgid "Unable to call method \"%1$s\"" 113 | msgstr "" 114 | -------------------------------------------------------------------------------- /i18n/ko.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: ai-client-jsonapi\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 11 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 12 | "Language-Team: Korean (https://www.transifex.com/aimeos/teams/39015/ko/)\n" 13 | "Language: ko\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=1; plural=0;\n" 18 | 19 | #, php-format 20 | msgid "Address type or attributes are missing" 21 | msgstr "" 22 | 23 | #, php-format 24 | msgid "Attributes are missing" 25 | msgstr "" 26 | 27 | #, php-format 28 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 29 | msgstr "" 30 | 31 | #, php-format 32 | msgid "Class \"%1$s\" not found" 33 | msgstr "" 34 | 35 | #, php-format 36 | msgid "Coupon code is missing" 37 | msgstr "" 38 | 39 | #, php-format 40 | msgid "ID is missing" 41 | msgstr "" 42 | 43 | #, php-format 44 | msgid "Invalid JSON in body" 45 | msgstr "" 46 | 47 | #, php-format 48 | msgid "Invalid characters in class name \"%1$s\"" 49 | msgstr "" 50 | 51 | #, php-format 52 | msgid "Invalid class name \"%1$s\"" 53 | msgstr "" 54 | 55 | #, php-format 56 | msgid "Invalid client \"%1$s\"" 57 | msgstr "" 58 | 59 | #, php-format 60 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 61 | msgstr "" 62 | 63 | #, php-format 64 | msgid "Invalid factory \"%1$s\"" 65 | msgstr "" 66 | 67 | #, php-format 68 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 69 | msgstr "" 70 | 71 | #, php-format 72 | msgid "No view available" 73 | msgstr "" 74 | 75 | msgid "Not allowed for this resource" 76 | msgstr "" 77 | 78 | #, php-format 79 | msgid "Position (ID) is missing" 80 | msgstr "" 81 | 82 | #, php-format 83 | msgid "Product ID is missing" 84 | msgstr "" 85 | 86 | #, php-format 87 | msgid "Required attribute \"order.baseid\" is missing" 88 | msgstr "" 89 | 90 | #, php-format 91 | msgid "Required parameter \"%1$s\" is missing" 92 | msgstr "" 93 | 94 | #, php-format 95 | msgid "Service ID in attributes is missing" 96 | msgstr "" 97 | 98 | #, php-format 99 | msgid "Service attributes are missing" 100 | msgstr "" 101 | 102 | #, php-format 103 | msgid "Service type (ID) is missing" 104 | msgstr "" 105 | 106 | #, php-format 107 | msgid "Type (ID) is missing" 108 | msgstr "" 109 | 110 | #, php-format 111 | msgid "Unable to call method \"%1$s\"" 112 | msgstr "" 113 | -------------------------------------------------------------------------------- /i18n/my.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: ai-client-jsonapi\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 11 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 12 | "Language-Team: Burmese (https://www.transifex.com/aimeos/teams/39015/my/)\n" 13 | "Language: my\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=1; plural=0;\n" 18 | 19 | #, php-format 20 | msgid "Address type or attributes are missing" 21 | msgstr "" 22 | 23 | #, php-format 24 | msgid "Attributes are missing" 25 | msgstr "" 26 | 27 | #, php-format 28 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 29 | msgstr "" 30 | 31 | #, php-format 32 | msgid "Class \"%1$s\" not found" 33 | msgstr "" 34 | 35 | #, php-format 36 | msgid "Coupon code is missing" 37 | msgstr "" 38 | 39 | #, php-format 40 | msgid "ID is missing" 41 | msgstr "" 42 | 43 | #, php-format 44 | msgid "Invalid JSON in body" 45 | msgstr "" 46 | 47 | #, php-format 48 | msgid "Invalid characters in class name \"%1$s\"" 49 | msgstr "" 50 | 51 | #, php-format 52 | msgid "Invalid class name \"%1$s\"" 53 | msgstr "" 54 | 55 | #, php-format 56 | msgid "Invalid client \"%1$s\"" 57 | msgstr "" 58 | 59 | #, php-format 60 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 61 | msgstr "" 62 | 63 | #, php-format 64 | msgid "Invalid factory \"%1$s\"" 65 | msgstr "" 66 | 67 | #, php-format 68 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 69 | msgstr "" 70 | 71 | #, php-format 72 | msgid "No view available" 73 | msgstr "" 74 | 75 | msgid "Not allowed for this resource" 76 | msgstr "" 77 | 78 | #, php-format 79 | msgid "Position (ID) is missing" 80 | msgstr "" 81 | 82 | #, php-format 83 | msgid "Product ID is missing" 84 | msgstr "" 85 | 86 | #, php-format 87 | msgid "Required attribute \"order.baseid\" is missing" 88 | msgstr "" 89 | 90 | #, php-format 91 | msgid "Required parameter \"%1$s\" is missing" 92 | msgstr "" 93 | 94 | #, php-format 95 | msgid "Service ID in attributes is missing" 96 | msgstr "" 97 | 98 | #, php-format 99 | msgid "Service attributes are missing" 100 | msgstr "" 101 | 102 | #, php-format 103 | msgid "Service type (ID) is missing" 104 | msgstr "" 105 | 106 | #, php-format 107 | msgid "Type (ID) is missing" 108 | msgstr "" 109 | 110 | #, php-format 111 | msgid "Unable to call method \"%1$s\"" 112 | msgstr "" 113 | -------------------------------------------------------------------------------- /i18n/da.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: ai-client-jsonapi\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 11 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 12 | "Language-Team: Danish (https://www.transifex.com/aimeos/teams/39015/da/)\n" 13 | "Language: da\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 18 | 19 | #, php-format 20 | msgid "Address type or attributes are missing" 21 | msgstr "" 22 | 23 | #, php-format 24 | msgid "Attributes are missing" 25 | msgstr "" 26 | 27 | #, php-format 28 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 29 | msgstr "" 30 | 31 | #, php-format 32 | msgid "Class \"%1$s\" not found" 33 | msgstr "" 34 | 35 | #, php-format 36 | msgid "Coupon code is missing" 37 | msgstr "" 38 | 39 | #, php-format 40 | msgid "ID is missing" 41 | msgstr "" 42 | 43 | #, php-format 44 | msgid "Invalid JSON in body" 45 | msgstr "" 46 | 47 | #, php-format 48 | msgid "Invalid characters in class name \"%1$s\"" 49 | msgstr "" 50 | 51 | #, php-format 52 | msgid "Invalid class name \"%1$s\"" 53 | msgstr "" 54 | 55 | #, php-format 56 | msgid "Invalid client \"%1$s\"" 57 | msgstr "" 58 | 59 | #, php-format 60 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 61 | msgstr "" 62 | 63 | #, php-format 64 | msgid "Invalid factory \"%1$s\"" 65 | msgstr "" 66 | 67 | #, php-format 68 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 69 | msgstr "" 70 | 71 | #, php-format 72 | msgid "No view available" 73 | msgstr "" 74 | 75 | msgid "Not allowed for this resource" 76 | msgstr "" 77 | 78 | #, php-format 79 | msgid "Position (ID) is missing" 80 | msgstr "" 81 | 82 | #, php-format 83 | msgid "Product ID is missing" 84 | msgstr "" 85 | 86 | #, php-format 87 | msgid "Required attribute \"order.baseid\" is missing" 88 | msgstr "" 89 | 90 | #, php-format 91 | msgid "Required parameter \"%1$s\" is missing" 92 | msgstr "" 93 | 94 | #, php-format 95 | msgid "Service ID in attributes is missing" 96 | msgstr "" 97 | 98 | #, php-format 99 | msgid "Service attributes are missing" 100 | msgstr "" 101 | 102 | #, php-format 103 | msgid "Service type (ID) is missing" 104 | msgstr "" 105 | 106 | #, php-format 107 | msgid "Type (ID) is missing" 108 | msgstr "" 109 | 110 | #, php-format 111 | msgid "Unable to call method \"%1$s\"" 112 | msgstr "" 113 | -------------------------------------------------------------------------------- /i18n/no.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: ai-client-jsonapi\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 11 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 12 | "Language-Team: Norwegian (https://www.transifex.com/aimeos/teams/39015/no/)\n" 13 | "Language: no\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 18 | 19 | #, php-format 20 | msgid "Address type or attributes are missing" 21 | msgstr "" 22 | 23 | #, php-format 24 | msgid "Attributes are missing" 25 | msgstr "" 26 | 27 | #, php-format 28 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 29 | msgstr "" 30 | 31 | #, php-format 32 | msgid "Class \"%1$s\" not found" 33 | msgstr "" 34 | 35 | #, php-format 36 | msgid "Coupon code is missing" 37 | msgstr "" 38 | 39 | #, php-format 40 | msgid "ID is missing" 41 | msgstr "" 42 | 43 | #, php-format 44 | msgid "Invalid JSON in body" 45 | msgstr "" 46 | 47 | #, php-format 48 | msgid "Invalid characters in class name \"%1$s\"" 49 | msgstr "" 50 | 51 | #, php-format 52 | msgid "Invalid class name \"%1$s\"" 53 | msgstr "" 54 | 55 | #, php-format 56 | msgid "Invalid client \"%1$s\"" 57 | msgstr "" 58 | 59 | #, php-format 60 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 61 | msgstr "" 62 | 63 | #, php-format 64 | msgid "Invalid factory \"%1$s\"" 65 | msgstr "" 66 | 67 | #, php-format 68 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 69 | msgstr "" 70 | 71 | #, php-format 72 | msgid "No view available" 73 | msgstr "" 74 | 75 | msgid "Not allowed for this resource" 76 | msgstr "" 77 | 78 | #, php-format 79 | msgid "Position (ID) is missing" 80 | msgstr "" 81 | 82 | #, php-format 83 | msgid "Product ID is missing" 84 | msgstr "" 85 | 86 | #, php-format 87 | msgid "Required attribute \"order.baseid\" is missing" 88 | msgstr "" 89 | 90 | #, php-format 91 | msgid "Required parameter \"%1$s\" is missing" 92 | msgstr "" 93 | 94 | #, php-format 95 | msgid "Service ID in attributes is missing" 96 | msgstr "" 97 | 98 | #, php-format 99 | msgid "Service attributes are missing" 100 | msgstr "" 101 | 102 | #, php-format 103 | msgid "Service type (ID) is missing" 104 | msgstr "" 105 | 106 | #, php-format 107 | msgid "Type (ID) is missing" 108 | msgstr "" 109 | 110 | #, php-format 111 | msgid "Unable to call method \"%1$s\"" 112 | msgstr "" 113 | -------------------------------------------------------------------------------- /i18n/ar.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: ai-client-jsonapi\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 11 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 12 | "Language-Team: Arabic (https://www.transifex.com/aimeos/teams/39015/ar/)\n" 13 | "Language: ar\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" 18 | 19 | #, php-format 20 | msgid "Address type or attributes are missing" 21 | msgstr "" 22 | 23 | #, php-format 24 | msgid "Attributes are missing" 25 | msgstr "" 26 | 27 | #, php-format 28 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 29 | msgstr "" 30 | 31 | #, php-format 32 | msgid "Class \"%1$s\" not found" 33 | msgstr "" 34 | 35 | #, php-format 36 | msgid "Coupon code is missing" 37 | msgstr "" 38 | 39 | #, php-format 40 | msgid "ID is missing" 41 | msgstr "" 42 | 43 | #, php-format 44 | msgid "Invalid JSON in body" 45 | msgstr "" 46 | 47 | #, php-format 48 | msgid "Invalid characters in class name \"%1$s\"" 49 | msgstr "" 50 | 51 | #, php-format 52 | msgid "Invalid class name \"%1$s\"" 53 | msgstr "" 54 | 55 | #, php-format 56 | msgid "Invalid client \"%1$s\"" 57 | msgstr "" 58 | 59 | #, php-format 60 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 61 | msgstr "" 62 | 63 | #, php-format 64 | msgid "Invalid factory \"%1$s\"" 65 | msgstr "" 66 | 67 | #, php-format 68 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 69 | msgstr "" 70 | 71 | #, php-format 72 | msgid "No view available" 73 | msgstr "" 74 | 75 | msgid "Not allowed for this resource" 76 | msgstr "" 77 | 78 | #, php-format 79 | msgid "Position (ID) is missing" 80 | msgstr "" 81 | 82 | #, php-format 83 | msgid "Product ID is missing" 84 | msgstr "" 85 | 86 | #, php-format 87 | msgid "Required attribute \"order.baseid\" is missing" 88 | msgstr "" 89 | 90 | #, php-format 91 | msgid "Required parameter \"%1$s\" is missing" 92 | msgstr "" 93 | 94 | #, php-format 95 | msgid "Service ID in attributes is missing" 96 | msgstr "" 97 | 98 | #, php-format 99 | msgid "Service attributes are missing" 100 | msgstr "" 101 | 102 | #, php-format 103 | msgid "Service type (ID) is missing" 104 | msgstr "" 105 | 106 | #, php-format 107 | msgid "Type (ID) is missing" 108 | msgstr "" 109 | 110 | #, php-format 111 | msgid "Unable to call method \"%1$s\"" 112 | msgstr "" 113 | -------------------------------------------------------------------------------- /i18n/vi.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Aimeos, 2018 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 15 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 16 | "Last-Translator: Aimeos, 2018\n" 17 | "Language-Team: Vietnamese (https://www.transifex.com/aimeos/teams/39015/vi/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: vi\n" 22 | "Plural-Forms: nplurals=1; plural=0;\n" 23 | 24 | #, php-format 25 | msgid "Address type or attributes are missing" 26 | msgstr "" 27 | 28 | #, php-format 29 | msgid "Attributes are missing" 30 | msgstr "" 31 | 32 | #, php-format 33 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 34 | msgstr "" 35 | 36 | #, php-format 37 | msgid "Class \"%1$s\" not found" 38 | msgstr "" 39 | 40 | #, php-format 41 | msgid "Coupon code is missing" 42 | msgstr "" 43 | 44 | #, php-format 45 | msgid "ID is missing" 46 | msgstr "" 47 | 48 | #, php-format 49 | msgid "Invalid JSON in body" 50 | msgstr "" 51 | 52 | #, php-format 53 | msgid "Invalid characters in class name \"%1$s\"" 54 | msgstr "" 55 | 56 | #, php-format 57 | msgid "Invalid class name \"%1$s\"" 58 | msgstr "" 59 | 60 | #, php-format 61 | msgid "Invalid client \"%1$s\"" 62 | msgstr "" 63 | 64 | #, php-format 65 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 66 | msgstr "" 67 | 68 | #, php-format 69 | msgid "Invalid factory \"%1$s\"" 70 | msgstr "" 71 | 72 | #, php-format 73 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 74 | msgstr "" 75 | 76 | #, php-format 77 | msgid "No view available" 78 | msgstr "Hiện không hiển thị được" 79 | 80 | msgid "Not allowed for this resource" 81 | msgstr "" 82 | 83 | #, php-format 84 | msgid "Position (ID) is missing" 85 | msgstr "" 86 | 87 | #, php-format 88 | msgid "Product ID is missing" 89 | msgstr "" 90 | 91 | #, php-format 92 | msgid "Required attribute \"order.baseid\" is missing" 93 | msgstr "" 94 | 95 | #, php-format 96 | msgid "Required parameter \"%1$s\" is missing" 97 | msgstr "" 98 | 99 | #, php-format 100 | msgid "Service ID in attributes is missing" 101 | msgstr "" 102 | 103 | #, php-format 104 | msgid "Service attributes are missing" 105 | msgstr "" 106 | 107 | #, php-format 108 | msgid "Service type (ID) is missing" 109 | msgstr "" 110 | 111 | #, php-format 112 | msgid "Type (ID) is missing" 113 | msgstr "" 114 | 115 | #, php-format 116 | msgid "Unable to call method \"%1$s\"" 117 | msgstr "" 118 | -------------------------------------------------------------------------------- /i18n/id.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Ranu Yulianto , 2018 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 15 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 16 | "Last-Translator: Ranu Yulianto , 2018\n" 17 | "Language-Team: Indonesian (https://www.transifex.com/aimeos/teams/39015/id/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: id\n" 22 | "Plural-Forms: nplurals=1; plural=0;\n" 23 | 24 | #, php-format 25 | msgid "Address type or attributes are missing" 26 | msgstr "" 27 | 28 | #, php-format 29 | msgid "Attributes are missing" 30 | msgstr "" 31 | 32 | #, php-format 33 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 34 | msgstr "" 35 | 36 | #, php-format 37 | msgid "Class \"%1$s\" not found" 38 | msgstr "" 39 | 40 | #, php-format 41 | msgid "Coupon code is missing" 42 | msgstr "" 43 | 44 | #, php-format 45 | msgid "ID is missing" 46 | msgstr "" 47 | 48 | #, php-format 49 | msgid "Invalid JSON in body" 50 | msgstr "" 51 | 52 | #, php-format 53 | msgid "Invalid characters in class name \"%1$s\"" 54 | msgstr "" 55 | 56 | #, php-format 57 | msgid "Invalid class name \"%1$s\"" 58 | msgstr "" 59 | 60 | #, php-format 61 | msgid "Invalid client \"%1$s\"" 62 | msgstr "" 63 | 64 | #, php-format 65 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 66 | msgstr "" 67 | 68 | #, php-format 69 | msgid "Invalid factory \"%1$s\"" 70 | msgstr "" 71 | 72 | #, php-format 73 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 74 | msgstr "" 75 | 76 | #, php-format 77 | msgid "No view available" 78 | msgstr "" 79 | 80 | msgid "Not allowed for this resource" 81 | msgstr "" 82 | 83 | #, php-format 84 | msgid "Position (ID) is missing" 85 | msgstr "" 86 | 87 | #, php-format 88 | msgid "Product ID is missing" 89 | msgstr "" 90 | 91 | #, php-format 92 | msgid "Required attribute \"order.baseid\" is missing" 93 | msgstr "" 94 | 95 | #, php-format 96 | msgid "Required parameter \"%1$s\" is missing" 97 | msgstr "" 98 | 99 | #, php-format 100 | msgid "Service ID in attributes is missing" 101 | msgstr "" 102 | 103 | #, php-format 104 | msgid "Service attributes are missing" 105 | msgstr "" 106 | 107 | #, php-format 108 | msgid "Service type (ID) is missing" 109 | msgstr "" 110 | 111 | #, php-format 112 | msgid "Type (ID) is missing" 113 | msgstr "" 114 | 115 | #, php-format 116 | msgid "Unable to call method \"%1$s\"" 117 | msgstr "Tidak bisa memanggil method \"%1$s\"" 118 | -------------------------------------------------------------------------------- /i18n/es_AR.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Rodolfo Ruival , 2020 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 15 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 16 | "Last-Translator: Rodolfo Ruival , 2020\n" 17 | "Language-Team: Spanish (Argentina) (https://www.transifex.com/aimeos/teams/39015/es_AR/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: es_AR\n" 22 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 23 | 24 | #, php-format 25 | msgid "Address type or attributes are missing" 26 | msgstr "" 27 | 28 | #, php-format 29 | msgid "Attributes are missing" 30 | msgstr "" 31 | 32 | #, php-format 33 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 34 | msgstr "" 35 | 36 | #, php-format 37 | msgid "Class \"%1$s\" not found" 38 | msgstr "" 39 | 40 | #, php-format 41 | msgid "Coupon code is missing" 42 | msgstr "" 43 | 44 | #, php-format 45 | msgid "ID is missing" 46 | msgstr "" 47 | 48 | #, php-format 49 | msgid "Invalid JSON in body" 50 | msgstr "" 51 | 52 | #, php-format 53 | msgid "Invalid characters in class name \"%1$s\"" 54 | msgstr "" 55 | 56 | #, php-format 57 | msgid "Invalid class name \"%1$s\"" 58 | msgstr "" 59 | 60 | #, php-format 61 | msgid "Invalid client \"%1$s\"" 62 | msgstr "" 63 | 64 | #, php-format 65 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 66 | msgstr "" 67 | 68 | #, php-format 69 | msgid "Invalid factory \"%1$s\"" 70 | msgstr "" 71 | 72 | #, php-format 73 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 74 | msgstr "" 75 | 76 | #, php-format 77 | msgid "No view available" 78 | msgstr "Vista no disponible" 79 | 80 | msgid "Not allowed for this resource" 81 | msgstr "" 82 | 83 | #, php-format 84 | msgid "Position (ID) is missing" 85 | msgstr "" 86 | 87 | #, php-format 88 | msgid "Product ID is missing" 89 | msgstr "" 90 | 91 | #, php-format 92 | msgid "Required attribute \"order.baseid\" is missing" 93 | msgstr "" 94 | 95 | #, php-format 96 | msgid "Required parameter \"%1$s\" is missing" 97 | msgstr "" 98 | 99 | #, php-format 100 | msgid "Service ID in attributes is missing" 101 | msgstr "" 102 | 103 | #, php-format 104 | msgid "Service attributes are missing" 105 | msgstr "" 106 | 107 | #, php-format 108 | msgid "Service type (ID) is missing" 109 | msgstr "" 110 | 111 | #, php-format 112 | msgid "Type (ID) is missing" 113 | msgstr "" 114 | 115 | #, php-format 116 | msgid "Unable to call method \"%1$s\"" 117 | msgstr "" 118 | -------------------------------------------------------------------------------- /i18n/zh_CN.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Aimeos, 2021 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 15 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 16 | "Last-Translator: Aimeos, 2021\n" 17 | "Language-Team: Chinese (China) (https://www.transifex.com/aimeos/teams/39015/zh_CN/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: zh_CN\n" 22 | "Plural-Forms: nplurals=1; plural=0;\n" 23 | 24 | #, php-format 25 | msgid "Address type or attributes are missing" 26 | msgstr "" 27 | 28 | #, php-format 29 | msgid "Attributes are missing" 30 | msgstr "" 31 | 32 | #, php-format 33 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 34 | msgstr "类\"%1$s\"没有实现接口\"%2$s\"" 35 | 36 | #, php-format 37 | msgid "Class \"%1$s\" not found" 38 | msgstr "类\"%1$s\"没有找到" 39 | 40 | #, php-format 41 | msgid "Coupon code is missing" 42 | msgstr "" 43 | 44 | #, php-format 45 | msgid "ID is missing" 46 | msgstr "" 47 | 48 | #, php-format 49 | msgid "Invalid JSON in body" 50 | msgstr "" 51 | 52 | #, php-format 53 | msgid "Invalid characters in class name \"%1$s\"" 54 | msgstr "类名 \"%1$s\"有无效的字符" 55 | 56 | #, php-format 57 | msgid "Invalid class name \"%1$s\"" 58 | msgstr "无效的类名\"%1$s\"" 59 | 60 | #, php-format 61 | msgid "Invalid client \"%1$s\"" 62 | msgstr "" 63 | 64 | #, php-format 65 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 66 | msgstr "" 67 | 68 | #, php-format 69 | msgid "Invalid factory \"%1$s\"" 70 | msgstr "无效的工厂\"%1$s\"" 71 | 72 | #, php-format 73 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 74 | msgstr "" 75 | 76 | #, php-format 77 | msgid "No view available" 78 | msgstr "没有可用的视图" 79 | 80 | msgid "Not allowed for this resource" 81 | msgstr "" 82 | 83 | #, php-format 84 | msgid "Position (ID) is missing" 85 | msgstr "" 86 | 87 | #, php-format 88 | msgid "Product ID is missing" 89 | msgstr "" 90 | 91 | #, php-format 92 | msgid "Required attribute \"order.baseid\" is missing" 93 | msgstr "" 94 | 95 | #, php-format 96 | msgid "Required parameter \"%1$s\" is missing" 97 | msgstr "" 98 | 99 | #, php-format 100 | msgid "Service ID in attributes is missing" 101 | msgstr "" 102 | 103 | #, php-format 104 | msgid "Service attributes are missing" 105 | msgstr "" 106 | 107 | #, php-format 108 | msgid "Service type (ID) is missing" 109 | msgstr "" 110 | 111 | #, php-format 112 | msgid "Type (ID) is missing" 113 | msgstr "" 114 | 115 | #, php-format 116 | msgid "Unable to call method \"%1$s\"" 117 | msgstr "不能调用方法\"%1$s\"" 118 | -------------------------------------------------------------------------------- /i18n/et.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Aimeos, 2017 8 | # Alex Kay , 2018 9 | # 10 | #, fuzzy 11 | msgid "" 12 | msgstr "" 13 | "Project-Id-Version: PACKAGE VERSION\n" 14 | "Report-Msgid-Bugs-To: \n" 15 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 16 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 17 | "Last-Translator: Alex Kay , 2018\n" 18 | "Language-Team: Estonian (https://www.transifex.com/aimeos/teams/39015/et/)\n" 19 | "MIME-Version: 1.0\n" 20 | "Content-Type: text/plain; charset=UTF-8\n" 21 | "Content-Transfer-Encoding: 8bit\n" 22 | "Language: et\n" 23 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 24 | 25 | #, php-format 26 | msgid "Address type or attributes are missing" 27 | msgstr "" 28 | 29 | #, php-format 30 | msgid "Attributes are missing" 31 | msgstr "" 32 | 33 | #, php-format 34 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 35 | msgstr "" 36 | 37 | #, php-format 38 | msgid "Class \"%1$s\" not found" 39 | msgstr "" 40 | 41 | #, php-format 42 | msgid "Coupon code is missing" 43 | msgstr "" 44 | 45 | #, php-format 46 | msgid "ID is missing" 47 | msgstr "" 48 | 49 | #, php-format 50 | msgid "Invalid JSON in body" 51 | msgstr "" 52 | 53 | #, php-format 54 | msgid "Invalid characters in class name \"%1$s\"" 55 | msgstr "" 56 | 57 | #, php-format 58 | msgid "Invalid class name \"%1$s\"" 59 | msgstr "" 60 | 61 | #, php-format 62 | msgid "Invalid client \"%1$s\"" 63 | msgstr "" 64 | 65 | #, php-format 66 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 67 | msgstr "" 68 | 69 | #, php-format 70 | msgid "Invalid factory \"%1$s\"" 71 | msgstr "factory \"%1$s\" on vigane" 72 | 73 | #, php-format 74 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 75 | msgstr "" 76 | 77 | #, php-format 78 | msgid "No view available" 79 | msgstr "Toote pilt pole kahjuks saadaval" 80 | 81 | msgid "Not allowed for this resource" 82 | msgstr "" 83 | 84 | #, php-format 85 | msgid "Position (ID) is missing" 86 | msgstr "" 87 | 88 | #, php-format 89 | msgid "Product ID is missing" 90 | msgstr "" 91 | 92 | #, php-format 93 | msgid "Required attribute \"order.baseid\" is missing" 94 | msgstr "" 95 | 96 | #, php-format 97 | msgid "Required parameter \"%1$s\" is missing" 98 | msgstr "" 99 | 100 | #, php-format 101 | msgid "Service ID in attributes is missing" 102 | msgstr "" 103 | 104 | #, php-format 105 | msgid "Service attributes are missing" 106 | msgstr "" 107 | 108 | #, php-format 109 | msgid "Service type (ID) is missing" 110 | msgstr "" 111 | 112 | #, php-format 113 | msgid "Type (ID) is missing" 114 | msgstr "" 115 | 116 | #, php-format 117 | msgid "Unable to call method \"%1$s\"" 118 | msgstr "" 119 | -------------------------------------------------------------------------------- /i18n/fi.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Aimeos, 2021 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 15 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 16 | "Last-Translator: Aimeos, 2021\n" 17 | "Language-Team: Finnish (https://www.transifex.com/aimeos/teams/39015/fi/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: fi\n" 22 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 23 | 24 | #, php-format 25 | msgid "Address type or attributes are missing" 26 | msgstr "" 27 | 28 | #, php-format 29 | msgid "Attributes are missing" 30 | msgstr "" 31 | 32 | #, php-format 33 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 34 | msgstr "Luokka \"%1$s\" ei toteuta \"%2$s\"" 35 | 36 | #, php-format 37 | msgid "Class \"%1$s\" not found" 38 | msgstr "Luokka \"%1$s\" ei löydy" 39 | 40 | #, php-format 41 | msgid "Coupon code is missing" 42 | msgstr "" 43 | 44 | #, php-format 45 | msgid "ID is missing" 46 | msgstr "" 47 | 48 | #, php-format 49 | msgid "Invalid JSON in body" 50 | msgstr "" 51 | 52 | #, php-format 53 | msgid "Invalid characters in class name \"%1$s\"" 54 | msgstr "Virheellisiä merkkejä luokkanimessä \"%1$s\"" 55 | 56 | #, php-format 57 | msgid "Invalid class name \"%1$s\"" 58 | msgstr "Virheellinen luokkanimi \"%1$s\"" 59 | 60 | #, php-format 61 | msgid "Invalid client \"%1$s\"" 62 | msgstr "" 63 | 64 | #, php-format 65 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 66 | msgstr "" 67 | 68 | #, php-format 69 | msgid "Invalid factory \"%1$s\"" 70 | msgstr "Virheellinen tehdas \"%1$s\"" 71 | 72 | #, php-format 73 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 74 | msgstr "" 75 | 76 | #, php-format 77 | msgid "No view available" 78 | msgstr "Katsastelu ei mahdollista" 79 | 80 | msgid "Not allowed for this resource" 81 | msgstr "" 82 | 83 | #, php-format 84 | msgid "Position (ID) is missing" 85 | msgstr "" 86 | 87 | #, php-format 88 | msgid "Product ID is missing" 89 | msgstr "" 90 | 91 | #, php-format 92 | msgid "Required attribute \"order.baseid\" is missing" 93 | msgstr "" 94 | 95 | #, php-format 96 | msgid "Required parameter \"%1$s\" is missing" 97 | msgstr "" 98 | 99 | #, php-format 100 | msgid "Service ID in attributes is missing" 101 | msgstr "" 102 | 103 | #, php-format 104 | msgid "Service attributes are missing" 105 | msgstr "" 106 | 107 | #, php-format 108 | msgid "Service type (ID) is missing" 109 | msgstr "" 110 | 111 | #, php-format 112 | msgid "Type (ID) is missing" 113 | msgstr "" 114 | 115 | #, php-format 116 | msgid "Unable to call method \"%1$s\"" 117 | msgstr "Toimintoa \"%1$s” ei voitu suorittaa" 118 | -------------------------------------------------------------------------------- /i18n/sr.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Aimeos, 2018 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 15 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 16 | "Last-Translator: Aimeos, 2018\n" 17 | "Language-Team: Serbian (https://www.transifex.com/aimeos/teams/39015/sr/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: sr\n" 22 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" 23 | 24 | #, php-format 25 | msgid "Address type or attributes are missing" 26 | msgstr "" 27 | 28 | #, php-format 29 | msgid "Attributes are missing" 30 | msgstr "" 31 | 32 | #, php-format 33 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 34 | msgstr "Klasa \"%1$s\" nije implementirana \"%2$s\"" 35 | 36 | #, php-format 37 | msgid "Class \"%1$s\" not found" 38 | msgstr "Klasa \"%1$s\" nije pronadjena" 39 | 40 | #, php-format 41 | msgid "Coupon code is missing" 42 | msgstr "" 43 | 44 | #, php-format 45 | msgid "ID is missing" 46 | msgstr "" 47 | 48 | #, php-format 49 | msgid "Invalid JSON in body" 50 | msgstr "" 51 | 52 | #, php-format 53 | msgid "Invalid characters in class name \"%1$s\"" 54 | msgstr "Nedozvoljen karakter u imenu klase \"%1$s\"" 55 | 56 | #, php-format 57 | msgid "Invalid class name \"%1$s\"" 58 | msgstr "Pogrešno ime klase \"%1$s\"" 59 | 60 | #, php-format 61 | msgid "Invalid client \"%1$s\"" 62 | msgstr "" 63 | 64 | #, php-format 65 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 66 | msgstr "" 67 | 68 | #, php-format 69 | msgid "Invalid factory \"%1$s\"" 70 | msgstr "" 71 | 72 | #, php-format 73 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 74 | msgstr "" 75 | 76 | #, php-format 77 | msgid "No view available" 78 | msgstr "Pregled nije moguc" 79 | 80 | msgid "Not allowed for this resource" 81 | msgstr "" 82 | 83 | #, php-format 84 | msgid "Position (ID) is missing" 85 | msgstr "" 86 | 87 | #, php-format 88 | msgid "Product ID is missing" 89 | msgstr "" 90 | 91 | #, php-format 92 | msgid "Required attribute \"order.baseid\" is missing" 93 | msgstr "" 94 | 95 | #, php-format 96 | msgid "Required parameter \"%1$s\" is missing" 97 | msgstr "" 98 | 99 | #, php-format 100 | msgid "Service ID in attributes is missing" 101 | msgstr "" 102 | 103 | #, php-format 104 | msgid "Service attributes are missing" 105 | msgstr "" 106 | 107 | #, php-format 108 | msgid "Service type (ID) is missing" 109 | msgstr "" 110 | 111 | #, php-format 112 | msgid "Type (ID) is missing" 113 | msgstr "" 114 | 115 | #, php-format 116 | msgid "Unable to call method \"%1$s\"" 117 | msgstr "" 118 | -------------------------------------------------------------------------------- /i18n/ja.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Darshan Sampat , 2020 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 15 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 16 | "Last-Translator: Darshan Sampat , 2020\n" 17 | "Language-Team: Japanese (https://www.transifex.com/aimeos/teams/39015/ja/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: ja\n" 22 | "Plural-Forms: nplurals=1; plural=0;\n" 23 | 24 | #, php-format 25 | msgid "Address type or attributes are missing" 26 | msgstr "" 27 | 28 | #, php-format 29 | msgid "Attributes are missing" 30 | msgstr "" 31 | 32 | #, php-format 33 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 34 | msgstr "クラス「%1$s」は、「%2$s」を実行しません" 35 | 36 | #, php-format 37 | msgid "Class \"%1$s\" not found" 38 | msgstr "クラス \"1 %1$s\"が見つかりません" 39 | 40 | #, php-format 41 | msgid "Coupon code is missing" 42 | msgstr "" 43 | 44 | #, php-format 45 | msgid "ID is missing" 46 | msgstr "" 47 | 48 | #, php-format 49 | msgid "Invalid JSON in body" 50 | msgstr "本文に無効なJSONがあります" 51 | 52 | #, php-format 53 | msgid "Invalid characters in class name \"%1$s\"" 54 | msgstr "クラス名 \"1%1$s\"に無効な文字があります" 55 | 56 | #, php-format 57 | msgid "Invalid class name \"%1$s\"" 58 | msgstr "無効なクラス名 \"1%1$s\"" 59 | 60 | #, php-format 61 | msgid "Invalid client \"%1$s\"" 62 | msgstr "" 63 | 64 | #, php-format 65 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 66 | msgstr "\"%2$s\"の無効なクライアント \"%1$s\"" 67 | 68 | #, php-format 69 | msgid "Invalid factory \"%1$s\"" 70 | msgstr "無効なファクトリ \"1%1$s\"" 71 | 72 | #, php-format 73 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 74 | msgstr "" 75 | 76 | #, php-format 77 | msgid "No view available" 78 | msgstr "利用可能なビューがありません" 79 | 80 | msgid "Not allowed for this resource" 81 | msgstr "" 82 | 83 | #, php-format 84 | msgid "Position (ID) is missing" 85 | msgstr "" 86 | 87 | #, php-format 88 | msgid "Product ID is missing" 89 | msgstr "" 90 | 91 | #, php-format 92 | msgid "Required attribute \"order.baseid\" is missing" 93 | msgstr "" 94 | 95 | #, php-format 96 | msgid "Required parameter \"%1$s\" is missing" 97 | msgstr "必須パラメータ \"%1$s\"がありません" 98 | 99 | #, php-format 100 | msgid "Service ID in attributes is missing" 101 | msgstr "" 102 | 103 | #, php-format 104 | msgid "Service attributes are missing" 105 | msgstr "" 106 | 107 | #, php-format 108 | msgid "Service type (ID) is missing" 109 | msgstr "" 110 | 111 | #, php-format 112 | msgid "Type (ID) is missing" 113 | msgstr "" 114 | 115 | #, php-format 116 | msgid "Unable to call method \"%1$s\"" 117 | msgstr "メソッド \"1%1$s\"を呼び出すことができません" 118 | -------------------------------------------------------------------------------- /i18n/hr.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Miro Sertić , 2018 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 15 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 16 | "Last-Translator: Miro Sertić , 2018\n" 17 | "Language-Team: Croatian (https://www.transifex.com/aimeos/teams/39015/hr/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: hr\n" 22 | "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" 23 | 24 | #, php-format 25 | msgid "Address type or attributes are missing" 26 | msgstr "" 27 | 28 | #, php-format 29 | msgid "Attributes are missing" 30 | msgstr "" 31 | 32 | #, php-format 33 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 34 | msgstr "" 35 | 36 | #, php-format 37 | msgid "Class \"%1$s\" not found" 38 | msgstr "Klasa \"%1$s\" nije pronađjena" 39 | 40 | #, php-format 41 | msgid "Coupon code is missing" 42 | msgstr "" 43 | 44 | #, php-format 45 | msgid "ID is missing" 46 | msgstr "Nedostaje ID" 47 | 48 | #, php-format 49 | msgid "Invalid JSON in body" 50 | msgstr "" 51 | 52 | #, php-format 53 | msgid "Invalid characters in class name \"%1$s\"" 54 | msgstr "Nedozvoljen simbol u imenu klase \"%1$s\"" 55 | 56 | #, php-format 57 | msgid "Invalid class name \"%1$s\"" 58 | msgstr "" 59 | 60 | #, php-format 61 | msgid "Invalid client \"%1$s\"" 62 | msgstr "" 63 | 64 | #, php-format 65 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 66 | msgstr "" 67 | 68 | #, php-format 69 | msgid "Invalid factory \"%1$s\"" 70 | msgstr "Invalid factory \"%1$s\"" 71 | 72 | #, php-format 73 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 74 | msgstr "" 75 | 76 | #, php-format 77 | msgid "No view available" 78 | msgstr "" 79 | 80 | msgid "Not allowed for this resource" 81 | msgstr "" 82 | 83 | #, php-format 84 | msgid "Position (ID) is missing" 85 | msgstr "" 86 | 87 | #, php-format 88 | msgid "Product ID is missing" 89 | msgstr "" 90 | 91 | #, php-format 92 | msgid "Required attribute \"order.baseid\" is missing" 93 | msgstr "" 94 | 95 | #, php-format 96 | msgid "Required parameter \"%1$s\" is missing" 97 | msgstr "" 98 | 99 | #, php-format 100 | msgid "Service ID in attributes is missing" 101 | msgstr "" 102 | 103 | #, php-format 104 | msgid "Service attributes are missing" 105 | msgstr "" 106 | 107 | #, php-format 108 | msgid "Service type (ID) is missing" 109 | msgstr "" 110 | 111 | #, php-format 112 | msgid "Type (ID) is missing" 113 | msgstr "" 114 | 115 | #, php-format 116 | msgid "Unable to call method \"%1$s\"" 117 | msgstr "Nemožemo pozvati metodu \"%1$s\"" 118 | -------------------------------------------------------------------------------- /i18n/cs.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Aimeos, 2018 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 15 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 16 | "Last-Translator: Aimeos, 2018\n" 17 | "Language-Team: Czech (https://www.transifex.com/aimeos/teams/39015/cs/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: cs\n" 22 | "Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" 23 | 24 | #, php-format 25 | msgid "Address type or attributes are missing" 26 | msgstr "" 27 | 28 | #, php-format 29 | msgid "Attributes are missing" 30 | msgstr "" 31 | 32 | #, php-format 33 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 34 | msgstr "Třída \"%1$s\" neimplementuje \"%2$s\"" 35 | 36 | #, php-format 37 | msgid "Class \"%1$s\" not found" 38 | msgstr "Třída \"%1$s\" nenalezena" 39 | 40 | #, php-format 41 | msgid "Coupon code is missing" 42 | msgstr "" 43 | 44 | #, php-format 45 | msgid "ID is missing" 46 | msgstr "" 47 | 48 | #, php-format 49 | msgid "Invalid JSON in body" 50 | msgstr "Tělo obsahuje poškozený JSON" 51 | 52 | #, php-format 53 | msgid "Invalid characters in class name \"%1$s\"" 54 | msgstr "Zakázané znaky ve jméně třídy \"%1$s\"" 55 | 56 | #, php-format 57 | msgid "Invalid class name \"%1$s\"" 58 | msgstr "Chybné jméno třídy \"%1$s\"" 59 | 60 | #, php-format 61 | msgid "Invalid client \"%1$s\"" 62 | msgstr "" 63 | 64 | #, php-format 65 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 66 | msgstr "" 67 | 68 | #, php-format 69 | msgid "Invalid factory \"%1$s\"" 70 | msgstr "Neplatná továrna \"%1$s\"" 71 | 72 | #, php-format 73 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 74 | msgstr "" 75 | 76 | #, php-format 77 | msgid "No view available" 78 | msgstr "Žádný náhled k dispozici" 79 | 80 | msgid "Not allowed for this resource" 81 | msgstr "" 82 | 83 | #, php-format 84 | msgid "Position (ID) is missing" 85 | msgstr "" 86 | 87 | #, php-format 88 | msgid "Product ID is missing" 89 | msgstr "" 90 | 91 | #, php-format 92 | msgid "Required attribute \"order.baseid\" is missing" 93 | msgstr "" 94 | 95 | #, php-format 96 | msgid "Required parameter \"%1$s\" is missing" 97 | msgstr "" 98 | 99 | #, php-format 100 | msgid "Service ID in attributes is missing" 101 | msgstr "" 102 | 103 | #, php-format 104 | msgid "Service attributes are missing" 105 | msgstr "" 106 | 107 | #, php-format 108 | msgid "Service type (ID) is missing" 109 | msgstr "" 110 | 111 | #, php-format 112 | msgid "Type (ID) is missing" 113 | msgstr "" 114 | 115 | #, php-format 116 | msgid "Unable to call method \"%1$s\"" 117 | msgstr "Nelze nazvat metodu \"%1$s\"" 118 | -------------------------------------------------------------------------------- /i18n/sk.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Aimeos, 2017 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 15 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 16 | "Last-Translator: Aimeos, 2017\n" 17 | "Language-Team: Slovak (https://www.transifex.com/aimeos/teams/39015/sk/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: sk\n" 22 | "Plural-Forms: nplurals=4; plural=(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);\n" 23 | 24 | #, php-format 25 | msgid "Address type or attributes are missing" 26 | msgstr "" 27 | 28 | #, php-format 29 | msgid "Attributes are missing" 30 | msgstr "" 31 | 32 | #, php-format 33 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 34 | msgstr "Trieda \"%1$s\" neimplementuje \"%2$s\"" 35 | 36 | #, php-format 37 | msgid "Class \"%1$s\" not found" 38 | msgstr "Trieda \"%1$s\" nenájdená" 39 | 40 | #, php-format 41 | msgid "Coupon code is missing" 42 | msgstr "" 43 | 44 | #, php-format 45 | msgid "ID is missing" 46 | msgstr "" 47 | 48 | #, php-format 49 | msgid "Invalid JSON in body" 50 | msgstr "Neplatný JSON v tele" 51 | 52 | #, php-format 53 | msgid "Invalid characters in class name \"%1$s\"" 54 | msgstr "Neplatné znaky v triede \"%1$s\"" 55 | 56 | #, php-format 57 | msgid "Invalid class name \"%1$s\"" 58 | msgstr "Neplatný názov triedy \"%1$s\"" 59 | 60 | #, php-format 61 | msgid "Invalid client \"%1$s\"" 62 | msgstr "" 63 | 64 | #, php-format 65 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 66 | msgstr "Neplatný klient \"%1$s\" v \"%2$s\"" 67 | 68 | #, php-format 69 | msgid "Invalid factory \"%1$s\"" 70 | msgstr "Neplatná továreň \"%1$s\"" 71 | 72 | #, php-format 73 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 74 | msgstr "" 75 | 76 | #, php-format 77 | msgid "No view available" 78 | msgstr "" 79 | 80 | msgid "Not allowed for this resource" 81 | msgstr "" 82 | 83 | #, php-format 84 | msgid "Position (ID) is missing" 85 | msgstr "" 86 | 87 | #, php-format 88 | msgid "Product ID is missing" 89 | msgstr "" 90 | 91 | #, php-format 92 | msgid "Required attribute \"order.baseid\" is missing" 93 | msgstr "" 94 | 95 | #, php-format 96 | msgid "Required parameter \"%1$s\" is missing" 97 | msgstr "" 98 | 99 | #, php-format 100 | msgid "Service ID in attributes is missing" 101 | msgstr "" 102 | 103 | #, php-format 104 | msgid "Service attributes are missing" 105 | msgstr "" 106 | 107 | #, php-format 108 | msgid "Service type (ID) is missing" 109 | msgstr "" 110 | 111 | #, php-format 112 | msgid "Type (ID) is missing" 113 | msgstr "" 114 | 115 | #, php-format 116 | msgid "Unable to call method \"%1$s\"" 117 | msgstr "Nepodarilo sa zavolať metódu \"%1$s\"" 118 | -------------------------------------------------------------------------------- /i18n/ro.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # iulian iulian , 2020 8 | # Yolo San, 2021 9 | # 10 | #, fuzzy 11 | msgid "" 12 | msgstr "" 13 | "Project-Id-Version: PACKAGE VERSION\n" 14 | "Report-Msgid-Bugs-To: \n" 15 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 16 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 17 | "Last-Translator: Yolo San, 2021\n" 18 | "Language-Team: Romanian (https://www.transifex.com/aimeos/teams/39015/ro/)\n" 19 | "MIME-Version: 1.0\n" 20 | "Content-Type: text/plain; charset=UTF-8\n" 21 | "Content-Transfer-Encoding: 8bit\n" 22 | "Language: ro\n" 23 | "Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" 24 | 25 | #, php-format 26 | msgid "Address type or attributes are missing" 27 | msgstr "" 28 | 29 | #, php-format 30 | msgid "Attributes are missing" 31 | msgstr "" 32 | 33 | #, php-format 34 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 35 | msgstr "Clasa \"%1$s\" nu implementeaza \"%2$s\"" 36 | 37 | #, php-format 38 | msgid "Class \"%1$s\" not found" 39 | msgstr "Clasa \"%1$s\" nu a fost gasita" 40 | 41 | #, php-format 42 | msgid "Coupon code is missing" 43 | msgstr "" 44 | 45 | #, php-format 46 | msgid "ID is missing" 47 | msgstr "" 48 | 49 | #, php-format 50 | msgid "Invalid JSON in body" 51 | msgstr "" 52 | 53 | #, php-format 54 | msgid "Invalid characters in class name \"%1$s\"" 55 | msgstr "Caracter invalid in numele clasei \"%1$s\"" 56 | 57 | #, php-format 58 | msgid "Invalid class name \"%1$s\"" 59 | msgstr "Nume clasa nevalid \"%1$s\"" 60 | 61 | #, php-format 62 | msgid "Invalid client \"%1$s\"" 63 | msgstr "" 64 | 65 | #, php-format 66 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 67 | msgstr "" 68 | 69 | #, php-format 70 | msgid "Invalid factory \"%1$s\"" 71 | msgstr "Factory incorect \"%1$s\"" 72 | 73 | #, php-format 74 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 75 | msgstr "" 76 | 77 | #, php-format 78 | msgid "No view available" 79 | msgstr "Nicio vizualizare disponibilă" 80 | 81 | msgid "Not allowed for this resource" 82 | msgstr "" 83 | 84 | #, php-format 85 | msgid "Position (ID) is missing" 86 | msgstr "" 87 | 88 | #, php-format 89 | msgid "Product ID is missing" 90 | msgstr "" 91 | 92 | #, php-format 93 | msgid "Required attribute \"order.baseid\" is missing" 94 | msgstr "" 95 | 96 | #, php-format 97 | msgid "Required parameter \"%1$s\" is missing" 98 | msgstr "Parametrul necesar \"%1$s\" lipseste" 99 | 100 | #, php-format 101 | msgid "Service ID in attributes is missing" 102 | msgstr "" 103 | 104 | #, php-format 105 | msgid "Service attributes are missing" 106 | msgstr "" 107 | 108 | #, php-format 109 | msgid "Service type (ID) is missing" 110 | msgstr "" 111 | 112 | #, php-format 113 | msgid "Type (ID) is missing" 114 | msgstr "" 115 | 116 | #, php-format 117 | msgid "Unable to call method \"%1$s\"" 118 | msgstr "Imposibil de apelat metoda \"%1$s\"" 119 | -------------------------------------------------------------------------------- /i18n/pl.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Aimeos, 2018 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 15 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 16 | "Last-Translator: Aimeos, 2018\n" 17 | "Language-Team: Polish (https://www.transifex.com/aimeos/teams/39015/pl/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: pl\n" 22 | "Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" 23 | 24 | #, php-format 25 | msgid "Address type or attributes are missing" 26 | msgstr "" 27 | 28 | #, php-format 29 | msgid "Attributes are missing" 30 | msgstr "" 31 | 32 | #, php-format 33 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 34 | msgstr "W klasie \"%1$s\" nie zaimplementowano \"%2$s\"" 35 | 36 | #, php-format 37 | msgid "Class \"%1$s\" not found" 38 | msgstr "Nie znaleziono klasy \"%1$s\"" 39 | 40 | #, php-format 41 | msgid "Coupon code is missing" 42 | msgstr "" 43 | 44 | #, php-format 45 | msgid "ID is missing" 46 | msgstr "" 47 | 48 | #, php-format 49 | msgid "Invalid JSON in body" 50 | msgstr "" 51 | 52 | #, php-format 53 | msgid "Invalid characters in class name \"%1$s\"" 54 | msgstr "Niepoprawne znaki w nazwie klasy \"%1$s\"" 55 | 56 | #, php-format 57 | msgid "Invalid class name \"%1$s\"" 58 | msgstr "Niepoprawna nazwa klasy \"%1$s\"" 59 | 60 | #, php-format 61 | msgid "Invalid client \"%1$s\"" 62 | msgstr "" 63 | 64 | #, php-format 65 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 66 | msgstr "" 67 | 68 | #, php-format 69 | msgid "Invalid factory \"%1$s\"" 70 | msgstr "Niepoprawna fabryka \"%1$s\"" 71 | 72 | #, php-format 73 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 74 | msgstr "" 75 | 76 | #, php-format 77 | msgid "No view available" 78 | msgstr "Widok niedostępny" 79 | 80 | msgid "Not allowed for this resource" 81 | msgstr "" 82 | 83 | #, php-format 84 | msgid "Position (ID) is missing" 85 | msgstr "" 86 | 87 | #, php-format 88 | msgid "Product ID is missing" 89 | msgstr "" 90 | 91 | #, php-format 92 | msgid "Required attribute \"order.baseid\" is missing" 93 | msgstr "" 94 | 95 | #, php-format 96 | msgid "Required parameter \"%1$s\" is missing" 97 | msgstr "" 98 | 99 | #, php-format 100 | msgid "Service ID in attributes is missing" 101 | msgstr "" 102 | 103 | #, php-format 104 | msgid "Service attributes are missing" 105 | msgstr "" 106 | 107 | #, php-format 108 | msgid "Service type (ID) is missing" 109 | msgstr "" 110 | 111 | #, php-format 112 | msgid "Type (ID) is missing" 113 | msgstr "" 114 | 115 | #, php-format 116 | msgid "Unable to call method \"%1$s\"" 117 | msgstr "Nie można wywołać metody \"%1$s\"" 118 | -------------------------------------------------------------------------------- /i18n/pt.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Aimeos, 2017 8 | # b5fdd37cec45d8078af7e530465bb050, 2018 9 | # 10 | #, fuzzy 11 | msgid "" 12 | msgstr "" 13 | "Project-Id-Version: PACKAGE VERSION\n" 14 | "Report-Msgid-Bugs-To: \n" 15 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 16 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 17 | "Last-Translator: b5fdd37cec45d8078af7e530465bb050, 2018\n" 18 | "Language-Team: Portuguese (https://www.transifex.com/aimeos/teams/39015/pt/)\n" 19 | "MIME-Version: 1.0\n" 20 | "Content-Type: text/plain; charset=UTF-8\n" 21 | "Content-Transfer-Encoding: 8bit\n" 22 | "Language: pt\n" 23 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 24 | 25 | #, php-format 26 | msgid "Address type or attributes are missing" 27 | msgstr "" 28 | 29 | #, php-format 30 | msgid "Attributes are missing" 31 | msgstr "" 32 | 33 | #, php-format 34 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 35 | msgstr "A classe \"%1$s\" não implementa \"%2$s\"" 36 | 37 | #, php-format 38 | msgid "Class \"%1$s\" not found" 39 | msgstr "Classe \"%1$s\" não encontrada" 40 | 41 | #, php-format 42 | msgid "Coupon code is missing" 43 | msgstr "" 44 | 45 | #, php-format 46 | msgid "ID is missing" 47 | msgstr "" 48 | 49 | #, php-format 50 | msgid "Invalid JSON in body" 51 | msgstr "JSON inválido no body" 52 | 53 | #, php-format 54 | msgid "Invalid characters in class name \"%1$s\"" 55 | msgstr "Caracteres inválidos no nome da classe \"%1$s\"" 56 | 57 | #, php-format 58 | msgid "Invalid class name \"%1$s\"" 59 | msgstr "Nome de classe inválido \"%1$s\"" 60 | 61 | #, php-format 62 | msgid "Invalid client \"%1$s\"" 63 | msgstr "" 64 | 65 | #, php-format 66 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 67 | msgstr "Cliente inválido \"%1$s\" em \"%2$s\"" 68 | 69 | #, php-format 70 | msgid "Invalid factory \"%1$s\"" 71 | msgstr "Fábrica inválida \"%1$s\"" 72 | 73 | #, php-format 74 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 75 | msgstr "" 76 | 77 | #, php-format 78 | msgid "No view available" 79 | msgstr "Sem visualização disponível" 80 | 81 | msgid "Not allowed for this resource" 82 | msgstr "" 83 | 84 | #, php-format 85 | msgid "Position (ID) is missing" 86 | msgstr "" 87 | 88 | #, php-format 89 | msgid "Product ID is missing" 90 | msgstr "" 91 | 92 | #, php-format 93 | msgid "Required attribute \"order.baseid\" is missing" 94 | msgstr "" 95 | 96 | #, php-format 97 | msgid "Required parameter \"%1$s\" is missing" 98 | msgstr "" 99 | 100 | #, php-format 101 | msgid "Service ID in attributes is missing" 102 | msgstr "" 103 | 104 | #, php-format 105 | msgid "Service attributes are missing" 106 | msgstr "" 107 | 108 | #, php-format 109 | msgid "Service type (ID) is missing" 110 | msgstr "" 111 | 112 | #, php-format 113 | msgid "Type (ID) is missing" 114 | msgstr "" 115 | 116 | #, php-format 117 | msgid "Unable to call method \"%1$s\"" 118 | msgstr "Incapaz de chamar o método \"%1$s\"" 119 | -------------------------------------------------------------------------------- /templates/client/jsonapi/subscription/standard.php: -------------------------------------------------------------------------------- 1 | encoder(); 11 | 12 | $target = $this->config( 'client/jsonapi/url/target' ); 13 | $cntl = $this->config( 'client/jsonapi/url/controller', 'jsonapi' ); 14 | $action = $this->config( 'client/jsonapi/url/action', 'get' ); 15 | $config = $this->config( 'client/jsonapi/url/config', [] ); 16 | 17 | 18 | $ref = array( 'resource', 'id', 'related', 'relatedid', 'filter', 'page', 'sort', 'include', 'fields' ); 19 | $params = array_intersect_key( $this->param(), array_flip( $ref ) ); 20 | 21 | $pretty = $this->param( 'pretty' ) ? JSON_PRETTY_PRINT : 0; 22 | $fields = $this->param( 'fields', [] ); 23 | 24 | foreach( (array) $fields as $resource => $list ) { 25 | $fields[$resource] = array_flip( explode( ',', $list ) ); 26 | } 27 | 28 | 29 | $entryFcn = function( \Aimeos\MShop\Subscription\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) 30 | { 31 | $id = $item->getId(); 32 | $attributes = $item->toArray(); 33 | $type = $item->getResourceType(); 34 | $params = array( 'resource' => $type, 'id' => $id ); 35 | 36 | if( isset( $fields[$type] ) ) { 37 | $attributes = array_intersect_key( $attributes, $fields[$type] ); 38 | } 39 | 40 | $entry = array( 41 | 'id' => $id, 42 | 'type' => $type, 43 | 'links' => array( 44 | 'self' => array( 45 | 'href' => $this->url( $target, $cntl, $action, $params, [], $config ), 46 | 'allow' => array( 'GET' ), 47 | ), 48 | ), 49 | 'attributes' => $attributes, 50 | ); 51 | 52 | return $entry; 53 | }; 54 | 55 | 56 | ?> 57 | { 58 | "meta": { 59 | "total": get( 'total', 0 ); ?>, 60 | "prefix": get( 'prefix' ) ); ?>, 61 | "content-baseurl": "config( 'resource/fs/baseurl' ); ?>", 62 | "content-baseurls": { 63 | "fs-media": "config( 'resource/fs-media/baseurl' ) ?>", 64 | "fs-mimeicon": "config( 'resource/fs-mimeicon/baseurl' ) ?>", 65 | "fs-theme": "config( 'resource/fs-theme/baseurl' ) ?>" 66 | } 67 | 68 | csrf()->name() != '' ) : ?> 69 | , "csrf": { 70 | "name": "csrf()->name(); ?>", 71 | "value": "csrf()->value(); ?>" 72 | } 73 | 74 | 75 | }, 76 | "links": { 77 | "self": "url( $target, $cntl, $action, $params, [], $config ); ?>" 78 | } 79 | 80 | errors ) ) : ?> 81 | ,"errors": errors, $pretty ); ?> 82 | 83 | items ) ) : ?> 84 | get( 'items', map() ); 87 | 88 | if( is_map( $items ) ) 89 | { 90 | foreach( $items as $item ) { 91 | $data[] = $entryFcn( $item ); 92 | } 93 | } 94 | else 95 | { 96 | $data = $entryFcn( $items ); 97 | } 98 | ?> 99 | 100 | ,"data": 101 | 102 | 103 | 104 | } 105 | -------------------------------------------------------------------------------- /tests/Client/JsonApi/Common/Decorator/BaseTest.php: -------------------------------------------------------------------------------- 1 | view = $context->view(); 28 | 29 | $this->stub = $this->getMockBuilder( \Aimeos\Client\JsonApi\Standard::class ) 30 | ->setConstructorArgs( [$context, 'attribute'] ) 31 | ->getMock(); 32 | 33 | $this->object = new \Aimeos\Client\JsonApi\Common\Decorator\Example( $this->stub, $context, '' ); 34 | } 35 | 36 | 37 | protected function tearDown() : void 38 | { 39 | unset( $this->object, $this->stub, $this->view ); 40 | } 41 | 42 | 43 | public function testDelete() 44 | { 45 | $this->stub->expects( $this->once() )->method( 'delete' )->willReturnArgument( 1 ); 46 | $response = $this->view->response(); 47 | 48 | $this->assertSame( $response, $this->object->delete( $this->view->request(), $response ) ); 49 | } 50 | 51 | 52 | public function testGet() 53 | { 54 | $this->stub->expects( $this->once() )->method( 'get' )->willReturnArgument( 1 ); 55 | $response = $this->view->response(); 56 | 57 | $this->assertSame( $response, $this->object->get( $this->view->request(), $response ) ); 58 | } 59 | 60 | 61 | public function testPatch() 62 | { 63 | $this->stub->expects( $this->once() )->method( 'patch' )->willReturnArgument( 1 ); 64 | $response = $this->view->response(); 65 | 66 | $this->assertSame( $response, $this->object->patch( $this->view->request(), $response ) ); 67 | } 68 | 69 | 70 | public function testPost() 71 | { 72 | $this->stub->expects( $this->once() )->method( 'post' )->willReturnArgument( 1 ); 73 | $response = $this->view->response(); 74 | 75 | $this->assertSame( $response, $this->object->post( $this->view->request(), $response ) ); 76 | } 77 | 78 | 79 | public function testPut() 80 | { 81 | $this->stub->expects( $this->once() )->method( 'put' )->willReturnArgument( 1 ); 82 | $response = $this->view->response(); 83 | 84 | $this->assertSame( $response, $this->object->put( $this->view->request(), $response ) ); 85 | } 86 | 87 | 88 | public function testOptions() 89 | { 90 | $this->stub->expects( $this->once() )->method( 'options' )->willReturnArgument( 1 ); 91 | $response = $this->view->response(); 92 | 93 | $this->assertSame( $response, $this->object->options( $this->view->request(), $response ) ); 94 | } 95 | 96 | 97 | public function testGetClient() 98 | { 99 | $result = $this->access( 'getClient' )->invokeArgs( $this->object, [] ); 100 | $this->assertSame( $this->stub, $result ); 101 | } 102 | 103 | 104 | protected function access( $name ) 105 | { 106 | $class = new \ReflectionClass( \Aimeos\Client\JsonApi\Common\Decorator\Base::class ); 107 | $method = $class->getMethod( $name ); 108 | $method->setAccessible( true ); 109 | 110 | return $method; 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /templates/client/jsonapi/customer/property/standard.php: -------------------------------------------------------------------------------- 1 | encoder(); 12 | 13 | $target = $this->config( 'client/jsonapi/url/target' ); 14 | $cntl = $this->config( 'client/jsonapi/url/controller', 'jsonapi' ); 15 | $action = $this->config( 'client/jsonapi/url/action', 'get' ); 16 | $config = $this->config( 'client/jsonapi/url/config', [] ); 17 | 18 | 19 | $ref = array( 'resource', 'id', 'related', 'relatedid', 'filter', 'page', 'sort', 'include', 'fields' ); 20 | $params = array_intersect_key( $this->param(), array_flip( $ref ) ); 21 | 22 | $pretty = $this->param( 'pretty' ) ? JSON_PRETTY_PRINT : 0; 23 | $fields = $this->param( 'fields', [] ); 24 | 25 | foreach( (array) $fields as $resource => $list ) { 26 | $fields[$resource] = array_flip( explode( ',', $list ) ); 27 | } 28 | 29 | 30 | $entryFcn = function( \Aimeos\MShop\Common\Item\Property\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) 31 | { 32 | $id = $item->getId(); 33 | $attributes = $item->toArray(); 34 | $rtype = str_replace( '/', '.', $item->getResourceType() ); 35 | 36 | $params = array( 'resource' => 'customer', 'id' => $item->getParentId(), 'related' => 'property', 'relatedid' => $id ); 37 | 38 | if( isset( $fields[$rtype] ) ) { 39 | $attributes = array_intersect_key( $attributes, $fields[$rtype] ); 40 | } 41 | 42 | $entry = array( 43 | 'id' => $id, 44 | 'type' => $rtype, 45 | 'links' => array( 46 | 'self' => array( 47 | 'href' => $this->url( $target, $cntl, $action, $params, [], $config ), 48 | 'allow' => array( 'DELETE', 'GET', 'PATCH' ), 49 | ), 50 | ), 51 | 'attributes' => $attributes, 52 | ); 53 | 54 | return $entry; 55 | }; 56 | 57 | 58 | ?> 59 | { 60 | "meta": { 61 | "total": get( 'total', 0 ); ?>, 62 | "prefix": get( 'prefix' ) ); ?>, 63 | "content-baseurl": "config( 'resource/fs/baseurl' ); ?>", 64 | "content-baseurls": { 65 | "fs-media": "config( 'resource/fs-media/baseurl' ) ?>", 66 | "fs-mimeicon": "config( 'resource/fs-mimeicon/baseurl' ) ?>", 67 | "fs-theme": "config( 'resource/fs-theme/baseurl' ) ?>" 68 | } 69 | csrf()->name() != '' ) : ?> 70 | , "csrf": { 71 | "name": "csrf()->name(); ?>", 72 | "value": "csrf()->value(); ?>" 73 | } 74 | 75 | 76 | }, 77 | "links": { 78 | "self": "url( $target, $cntl, $action, $params, [], $config ); ?>" 79 | } 80 | errors ) ) : ?> 81 | ,"errors": errors, $pretty ); ?> 82 | 83 | items ) ) : ?> 84 | get( 'items', [] ); 87 | 88 | if( is_map( $items ) ) 89 | { 90 | foreach( $items as $propItem ) { 91 | $data[] = $entryFcn( $propItem ); 92 | } 93 | } 94 | else 95 | { 96 | $data = $entryFcn( $items ); 97 | } 98 | ?> 99 | 100 | ,"data": 101 | 102 | 103 | 104 | } 105 | -------------------------------------------------------------------------------- /i18n/zh.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Aimeos, 2017 8 | # Bruce Liu , 2018 9 | # stevechen , 2020 10 | # morgan chan , 2021 11 | # 12 | #, fuzzy 13 | msgid "" 14 | msgstr "" 15 | "Project-Id-Version: PACKAGE VERSION\n" 16 | "Report-Msgid-Bugs-To: \n" 17 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 18 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 19 | "Last-Translator: morgan chan , 2021\n" 20 | "Language-Team: Chinese (https://www.transifex.com/aimeos/teams/39015/zh/)\n" 21 | "MIME-Version: 1.0\n" 22 | "Content-Type: text/plain; charset=UTF-8\n" 23 | "Content-Transfer-Encoding: 8bit\n" 24 | "Language: zh\n" 25 | "Plural-Forms: nplurals=1; plural=0;\n" 26 | 27 | #, php-format 28 | msgid "Address type or attributes are missing" 29 | msgstr "地址類型或屬性不完整" 30 | 31 | #, php-format 32 | msgid "Attributes are missing" 33 | msgstr "屬性不完整" 34 | 35 | #, php-format 36 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 37 | msgstr "class \"%1$s\" 沒有實裝 \"%2$s\"" 38 | 39 | #, php-format 40 | msgid "Class \"%1$s\" not found" 41 | msgstr "找不到class \"%1$s\"" 42 | 43 | #, php-format 44 | msgid "Coupon code is missing" 45 | msgstr "優惠券代碼不完整" 46 | 47 | #, php-format 48 | msgid "ID is missing" 49 | msgstr "ID 不完整" 50 | 51 | #, php-format 52 | msgid "Invalid JSON in body" 53 | msgstr "在body中包含了無效的 JSON" 54 | 55 | #, php-format 56 | msgid "Invalid characters in class name \"%1$s\"" 57 | msgstr "class名稱 \"%1$s\" 包含無效的字符" 58 | 59 | #, php-format 60 | msgid "Invalid class name \"%1$s\"" 61 | msgstr "無效的class名稱\"%1$s\"" 62 | 63 | #, php-format 64 | msgid "Invalid client \"%1$s\"" 65 | msgstr "無效的 client \"%1$s\"" 66 | 67 | #, php-format 68 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 69 | msgstr "在 \"%2$s\" 之中含有無效的client \"%1$s\"" 70 | 71 | #, php-format 72 | msgid "Invalid factory \"%1$s\"" 73 | msgstr "無效的factory \"%1$s\"" 74 | 75 | #, php-format 76 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 77 | msgstr "找不到結帳籃 \"order.baseid\" (\"%1$s\") " 78 | 79 | #, php-format 80 | msgid "No view available" 81 | msgstr "没有可用的view" 82 | 83 | msgid "Not allowed for this resource" 84 | msgstr "" 85 | 86 | #, php-format 87 | msgid "Position (ID) is missing" 88 | msgstr "位置 (ID) 不完整" 89 | 90 | #, php-format 91 | msgid "Product ID is missing" 92 | msgstr "產品 ID 不完整" 93 | 94 | #, php-format 95 | msgid "Required attribute \"order.baseid\" is missing" 96 | msgstr "所需屬性 \"order.baseid\" 不完整" 97 | 98 | #, php-format 99 | msgid "Required parameter \"%1$s\" is missing" 100 | msgstr "需要的參數 \"%1$s\" 遺漏" 101 | 102 | #, php-format 103 | msgid "Service ID in attributes is missing" 104 | msgstr "服務 ID 屬性不完整" 105 | 106 | #, php-format 107 | msgid "Service attributes are missing" 108 | msgstr "服務屬性不完整" 109 | 110 | #, php-format 111 | msgid "Service type (ID) is missing" 112 | msgstr "服務類型 (ID) 不完整" 113 | 114 | #, php-format 115 | msgid "Type (ID) is missing" 116 | msgstr "類型 (ID) 不完整" 117 | 118 | #, php-format 119 | msgid "Unable to call method \"%1$s\"" 120 | msgstr "無法呼叫method \"%1$s\"" 121 | -------------------------------------------------------------------------------- /i18n/uk.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Федір Вільгота , 2019 8 | # Oleksandr Kropyvko , 2021 9 | # 10 | #, fuzzy 11 | msgid "" 12 | msgstr "" 13 | "Project-Id-Version: PACKAGE VERSION\n" 14 | "Report-Msgid-Bugs-To: \n" 15 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 16 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 17 | "Last-Translator: Oleksandr Kropyvko , 2021\n" 18 | "Language-Team: Ukrainian (https://www.transifex.com/aimeos/teams/39015/uk/)\n" 19 | "MIME-Version: 1.0\n" 20 | "Content-Type: text/plain; charset=UTF-8\n" 21 | "Content-Transfer-Encoding: 8bit\n" 22 | "Language: uk\n" 23 | "Plural-Forms: nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);\n" 24 | 25 | #, php-format 26 | msgid "Address type or attributes are missing" 27 | msgstr "" 28 | 29 | #, php-format 30 | msgid "Attributes are missing" 31 | msgstr "" 32 | 33 | #, php-format 34 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 35 | msgstr "Клас \"%1$s\" не реализуе \"%2$s\"" 36 | 37 | #, php-format 38 | msgid "Class \"%1$s\" not found" 39 | msgstr "Клас \"%1$s\" не знайдено" 40 | 41 | #, php-format 42 | msgid "Coupon code is missing" 43 | msgstr "" 44 | 45 | #, php-format 46 | msgid "ID is missing" 47 | msgstr "" 48 | 49 | #, php-format 50 | msgid "Invalid JSON in body" 51 | msgstr "" 52 | 53 | #, php-format 54 | msgid "Invalid characters in class name \"%1$s\"" 55 | msgstr "Недопустимі символы в назві класу \"%1$s\"" 56 | 57 | #, php-format 58 | msgid "Invalid class name \"%1$s\"" 59 | msgstr "Невірна назва класу \"%1$s\"" 60 | 61 | #, php-format 62 | msgid "Invalid client \"%1$s\"" 63 | msgstr "" 64 | 65 | #, php-format 66 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 67 | msgstr "" 68 | 69 | #, php-format 70 | msgid "Invalid factory \"%1$s\"" 71 | msgstr "Неприпустиме підприємство \"%1$s\"" 72 | 73 | #, php-format 74 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 75 | msgstr "" 76 | 77 | #, php-format 78 | msgid "No view available" 79 | msgstr "Немає доступних режимів виводу" 80 | 81 | msgid "Not allowed for this resource" 82 | msgstr "" 83 | 84 | #, php-format 85 | msgid "Position (ID) is missing" 86 | msgstr "" 87 | 88 | #, php-format 89 | msgid "Product ID is missing" 90 | msgstr "" 91 | 92 | #, php-format 93 | msgid "Required attribute \"order.baseid\" is missing" 94 | msgstr "" 95 | 96 | #, php-format 97 | msgid "Required parameter \"%1$s\" is missing" 98 | msgstr "Відсутній обов`язковий параметр \"%1$s\"" 99 | 100 | #, php-format 101 | msgid "Service ID in attributes is missing" 102 | msgstr "" 103 | 104 | #, php-format 105 | msgid "Service attributes are missing" 106 | msgstr "" 107 | 108 | #, php-format 109 | msgid "Service type (ID) is missing" 110 | msgstr "" 111 | 112 | #, php-format 113 | msgid "Type (ID) is missing" 114 | msgstr "" 115 | 116 | #, php-format 117 | msgid "Unable to call method \"%1$s\"" 118 | msgstr "Неможливо викликати метод \"%1$s\"" 119 | -------------------------------------------------------------------------------- /templates/client/jsonapi/customer/review/standard.php: -------------------------------------------------------------------------------- 1 | encoder(); 12 | 13 | $target = $this->config( 'client/jsonapi/url/target' ); 14 | $cntl = $this->config( 'client/jsonapi/url/controller', 'jsonapi' ); 15 | $action = $this->config( 'client/jsonapi/url/action', 'get' ); 16 | $config = $this->config( 'client/jsonapi/url/config', [] ); 17 | 18 | 19 | $ref = array( 'resource', 'id', 'related', 'relatedid', 'filter', 'page', 'sort', 'include', 'fields' ); 20 | $params = array_intersect_key( $this->param(), array_flip( $ref ) ); 21 | 22 | $pretty = $this->param( 'pretty' ) ? JSON_PRETTY_PRINT : 0; 23 | $fields = $this->param( 'fields', [] ); 24 | 25 | foreach( (array) $fields as $resource => $list ) { 26 | $fields[$resource] = array_flip( explode( ',', $list ) ); 27 | } 28 | 29 | 30 | $entryFcn = function( \Aimeos\MShop\Review\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) 31 | { 32 | $relid = $item->getId(); 33 | $attributes = $item->toArray(); 34 | $id = $this->get( 'customerid' ); 35 | $params = array( 'resource' => 'customer', 'id' => $id, 'related' => 'review', 'relatedid' => $relid ); 36 | $rtype = 'review'; 37 | 38 | if( isset( $fields[$rtype] ) ) { 39 | $attributes = array_intersect_key( $attributes, $fields[$rtype] ); 40 | } 41 | 42 | $entry = array( 43 | 'id' => $relid, 44 | 'type' => $rtype, 45 | 'links' => array( 46 | 'self' => array( 47 | 'href' => $this->url( $target, $cntl, $action, $params, [], $config ), 48 | 'allow' => array( 'DELETE', 'GET', 'PATCH' ), 49 | ), 50 | ), 51 | 'attributes' => $attributes, 52 | ); 53 | 54 | return $entry; 55 | }; 56 | 57 | 58 | ?> 59 | { 60 | "meta": { 61 | "total": get( 'total', 0 ); ?>, 62 | "prefix": get( 'prefix' ) ); ?>, 63 | "content-baseurl": "config( 'resource/fs/baseurl' ); ?>", 64 | "content-baseurls": { 65 | "fs-media": "config( 'resource/fs-media/baseurl' ) ?>", 66 | "fs-mimeicon": "config( 'resource/fs-mimeicon/baseurl' ) ?>", 67 | "fs-theme": "config( 'resource/fs-theme/baseurl' ) ?>" 68 | } 69 | csrf()->name() != '' ) : ?> 70 | , "csrf": { 71 | "name": "csrf()->name(); ?>", 72 | "value": "csrf()->value(); ?>" 73 | } 74 | 75 | 76 | }, 77 | "links": { 78 | "self": "url( $target, $cntl, $action, $params, [], $config ); ?>", 79 | "related": "url( $target, $cntl, $action, map( $params )->except( 'relatedid' )->toArray(), [], $config ); ?>" 80 | } 81 | errors ) ) : ?> 82 | ,"errors": errors, $pretty ); ?> 83 | 84 | items ) ) : ?> 85 | get( 'items', [] ); 88 | 89 | if( is_map( $items ) ) 90 | { 91 | foreach( $items as $item ) { 92 | $data[] = $entryFcn( $item ); 93 | } 94 | } 95 | else 96 | { 97 | $data = $entryFcn( $items ); 98 | } 99 | ?> 100 | 101 | ,"data": 102 | 103 | 104 | 105 | } 106 | -------------------------------------------------------------------------------- /i18n/ru.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Aimeos, 2018 8 | # Irina Fedulova , 2020 9 | # Вячеслав Васильев , 2020 10 | # 11 | #, fuzzy 12 | msgid "" 13 | msgstr "" 14 | "Project-Id-Version: PACKAGE VERSION\n" 15 | "Report-Msgid-Bugs-To: \n" 16 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 17 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 18 | "Last-Translator: Вячеслав Васильев , 2020\n" 19 | "Language-Team: Russian (https://www.transifex.com/aimeos/teams/39015/ru/)\n" 20 | "MIME-Version: 1.0\n" 21 | "Content-Type: text/plain; charset=UTF-8\n" 22 | "Content-Transfer-Encoding: 8bit\n" 23 | "Language: ru\n" 24 | "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" 25 | 26 | #, php-format 27 | msgid "Address type or attributes are missing" 28 | msgstr "Тип адреса или атрибуты пропущены" 29 | 30 | #, php-format 31 | msgid "Attributes are missing" 32 | msgstr "Атрибуты пропущены" 33 | 34 | #, php-format 35 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 36 | msgstr "Класс \"%1$s\" не реализует \"%2$s\"" 37 | 38 | #, php-format 39 | msgid "Class \"%1$s\" not found" 40 | msgstr "Не найден класс \"%1$s\"" 41 | 42 | #, php-format 43 | msgid "Coupon code is missing" 44 | msgstr "Код купона пропущен" 45 | 46 | #, php-format 47 | msgid "ID is missing" 48 | msgstr "ID пропущен" 49 | 50 | #, php-format 51 | msgid "Invalid JSON in body" 52 | msgstr "" 53 | 54 | #, php-format 55 | msgid "Invalid characters in class name \"%1$s\"" 56 | msgstr "Недопустимые символы в названии класса \"%1$s\"" 57 | 58 | #, php-format 59 | msgid "Invalid class name \"%1$s\"" 60 | msgstr "Недопустимое название класса \"%1$s\"" 61 | 62 | #, php-format 63 | msgid "Invalid client \"%1$s\"" 64 | msgstr "" 65 | 66 | #, php-format 67 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 68 | msgstr "" 69 | 70 | #, php-format 71 | msgid "Invalid factory \"%1$s\"" 72 | msgstr "Недопустимая фабрика \"%1$s\"" 73 | 74 | #, php-format 75 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 76 | msgstr "" 77 | 78 | #, php-format 79 | msgid "No view available" 80 | msgstr "Нет доступных режимов вывода" 81 | 82 | msgid "Not allowed for this resource" 83 | msgstr "" 84 | 85 | #, php-format 86 | msgid "Position (ID) is missing" 87 | msgstr "" 88 | 89 | #, php-format 90 | msgid "Product ID is missing" 91 | msgstr "ID товара пропущен" 92 | 93 | #, php-format 94 | msgid "Required attribute \"order.baseid\" is missing" 95 | msgstr "" 96 | 97 | #, php-format 98 | msgid "Required parameter \"%1$s\" is missing" 99 | msgstr "Отсутствует обязательный параметр \"%1$s\"" 100 | 101 | #, php-format 102 | msgid "Service ID in attributes is missing" 103 | msgstr "" 104 | 105 | #, php-format 106 | msgid "Service attributes are missing" 107 | msgstr "" 108 | 109 | #, php-format 110 | msgid "Service type (ID) is missing" 111 | msgstr "" 112 | 113 | #, php-format 114 | msgid "Type (ID) is missing" 115 | msgstr "Тип (ID) пропущен" 116 | 117 | #, php-format 118 | msgid "Unable to call method \"%1$s\"" 119 | msgstr "Невозможно вызвать метод \"%1$s\"" 120 | -------------------------------------------------------------------------------- /templates/client/jsonapi/customer/relationships/standard.php: -------------------------------------------------------------------------------- 1 | encoder(); 12 | 13 | $target = $this->config( 'client/jsonapi/url/target' ); 14 | $cntl = $this->config( 'client/jsonapi/url/controller', 'jsonapi' ); 15 | $action = $this->config( 'client/jsonapi/url/action', 'get' ); 16 | $config = $this->config( 'client/jsonapi/url/config', [] ); 17 | 18 | 19 | $ref = array( 'resource', 'id', 'related', 'relatedid', 'filter', 'page', 'sort', 'include', 'fields' ); 20 | $params = array_intersect_key( $this->param(), array_flip( $ref ) ); 21 | 22 | $pretty = $this->param( 'pretty' ) ? JSON_PRETTY_PRINT : 0; 23 | $fields = $this->param( 'fields', [] ); 24 | 25 | foreach( (array) $fields as $resource => $list ) { 26 | $fields[$resource] = array_flip( explode( ',', $list ) ); 27 | } 28 | 29 | 30 | $entryFcn = function( \Aimeos\MShop\Common\Item\Lists\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) 31 | { 32 | $relid = $item->getId(); 33 | $id = $item->getParentId(); 34 | $attributes = $item->toArray(); 35 | $params = ['resource' => 'customer', 'id' => $id, 'related' => 'relationships', 'relatedid' => $relid]; 36 | $rtype = 'customer.lists'; 37 | 38 | if( $include = $this->param( 'include' ) ) { 39 | $params['include'] = $include; 40 | } 41 | 42 | if( isset( $fields[$rtype] ) ) { 43 | $attributes = array_intersect_key( $attributes, $fields[$rtype] ); 44 | } 45 | 46 | $entry = array( 47 | 'id' => $relid, 48 | 'type' => $rtype, 49 | 'links' => array( 50 | 'self' => array( 51 | 'href' => $this->url( $target, $cntl, $action, $params, [], $config ), 52 | 'allow' => array( 'DELETE', 'GET', 'PATCH' ), 53 | ), 54 | ), 55 | 'attributes' => $attributes, 56 | ); 57 | 58 | return $entry; 59 | }; 60 | 61 | 62 | ?> 63 | { 64 | "meta": { 65 | "total": get( 'total', 0 ); ?>, 66 | "prefix": get( 'prefix' ) ); ?>, 67 | "content-baseurl": "config( 'resource/fs/baseurl' ); ?>", 68 | "content-baseurls": { 69 | "fs-media": "config( 'resource/fs-media/baseurl' ) ?>", 70 | "fs-mimeicon": "config( 'resource/fs-mimeicon/baseurl' ) ?>", 71 | "fs-theme": "config( 'resource/fs-theme/baseurl' ) ?>" 72 | } 73 | csrf()->name() != '' ) : ?> 74 | , "csrf": { 75 | "name": "csrf()->name(); ?>", 76 | "value": "csrf()->value(); ?>" 77 | } 78 | 79 | 80 | }, 81 | "links": { 82 | "self": "url( $target, $cntl, $action, $params, [], $config ); ?>", 83 | "related": "url( $target, $cntl, $action, map( $params )->except( 'relatedid' )->toArray(), [], $config ); ?>" 84 | } 85 | errors ) ) : ?> 86 | ,"errors": errors, $pretty ); ?> 87 | 88 | items ) ) : ?> 89 | get( 'items', [] ); 92 | 93 | if( is_map( $items ) ) 94 | { 95 | foreach( $items as $item ) { 96 | $data[] = $entryFcn( $item ); 97 | } 98 | } 99 | else 100 | { 101 | $data = $entryFcn( $items ); 102 | } 103 | ?> 104 | 105 | ,"data": 106 | 107 | 108 | 109 | } 110 | -------------------------------------------------------------------------------- /i18n/de.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Aimeos, 2021 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 15 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 16 | "Last-Translator: Aimeos, 2021\n" 17 | "Language-Team: German (https://www.transifex.com/aimeos/teams/39015/de/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: de\n" 22 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 23 | 24 | #, php-format 25 | msgid "Address type or attributes are missing" 26 | msgstr "Adresstyp oder Adressattribute fehlen" 27 | 28 | #, php-format 29 | msgid "Attributes are missing" 30 | msgstr "Attribute fehlen" 31 | 32 | #, php-format 33 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 34 | msgstr "Die Klasse \"%1$s\" implementiert nicht \"%2$s\"" 35 | 36 | #, php-format 37 | msgid "Class \"%1$s\" not found" 38 | msgstr "Die Klasse \"%1$s\" ist unbekannt" 39 | 40 | #, php-format 41 | msgid "Coupon code is missing" 42 | msgstr "Code für Coupon fehlt" 43 | 44 | #, php-format 45 | msgid "ID is missing" 46 | msgstr "ID fehlt" 47 | 48 | #, php-format 49 | msgid "Invalid JSON in body" 50 | msgstr "Ungültiges JSON in der Anfrage" 51 | 52 | #, php-format 53 | msgid "Invalid characters in class name \"%1$s\"" 54 | msgstr "Klassenname \"%1$s\" enthält unerlaubte Zeichen" 55 | 56 | #, php-format 57 | msgid "Invalid class name \"%1$s\"" 58 | msgstr "Der Klassenname \"%1$s\" is ungültig" 59 | 60 | #, php-format 61 | msgid "Invalid client \"%1$s\"" 62 | msgstr "Unbekannter Client \"%1$s\"" 63 | 64 | #, php-format 65 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 66 | msgstr "Ungültiger Name \"%1$s\" des Clients in \"%2$s\"" 67 | 68 | #, php-format 69 | msgid "Invalid factory \"%1$s\"" 70 | msgstr "Ungültige Factory \"%1$s\"" 71 | 72 | #, php-format 73 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 74 | msgstr "Kein Warenkorb für \"order.baseid\" (\"%1$s\") gefunden" 75 | 76 | #, php-format 77 | msgid "No view available" 78 | msgstr "Es ist kein View vorhanden" 79 | 80 | msgid "Not allowed for this resource" 81 | msgstr "Für diese Resource nicht erlaubt" 82 | 83 | #, php-format 84 | msgid "Position (ID) is missing" 85 | msgstr "Position (ID) fehlt" 86 | 87 | #, php-format 88 | msgid "Product ID is missing" 89 | msgstr "Produkt -ID fehlt" 90 | 91 | #, php-format 92 | msgid "Required attribute \"order.baseid\" is missing" 93 | msgstr "Erforderliches Attribut \"order.baseid\" fehlt" 94 | 95 | #, php-format 96 | msgid "Required parameter \"%1$s\" is missing" 97 | msgstr "Notwendiger Parameter \"%1$s\" fehlt" 98 | 99 | #, php-format 100 | msgid "Service ID in attributes is missing" 101 | msgstr "Die Service-ID fehlt in den Attributen" 102 | 103 | #, php-format 104 | msgid "Service attributes are missing" 105 | msgstr "Die Service-Attribute fehlen" 106 | 107 | #, php-format 108 | msgid "Service type (ID) is missing" 109 | msgstr "Servicetyp (ID) fehlt" 110 | 111 | #, php-format 112 | msgid "Type (ID) is missing" 113 | msgstr "Typ (ID) fehlt" 114 | 115 | #, php-format 116 | msgid "Unable to call method \"%1$s\"" 117 | msgstr "Methode \"%1$s\" kann nicht aufgerufen werden" 118 | -------------------------------------------------------------------------------- /i18n/pt_BR.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Aimeos, 2017 8 | # Bruno Rodrigues , 2018 9 | # 10 | #, fuzzy 11 | msgid "" 12 | msgstr "" 13 | "Project-Id-Version: PACKAGE VERSION\n" 14 | "Report-Msgid-Bugs-To: \n" 15 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 16 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 17 | "Last-Translator: Bruno Rodrigues , 2018\n" 18 | "Language-Team: Portuguese (Brazil) (https://www.transifex.com/aimeos/teams/39015/pt_BR/)\n" 19 | "MIME-Version: 1.0\n" 20 | "Content-Type: text/plain; charset=UTF-8\n" 21 | "Content-Transfer-Encoding: 8bit\n" 22 | "Language: pt_BR\n" 23 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 24 | 25 | #, php-format 26 | msgid "Address type or attributes are missing" 27 | msgstr "Faltam tipo de endereço ou atributos" 28 | 29 | #, php-format 30 | msgid "Attributes are missing" 31 | msgstr "Faltam atributos" 32 | 33 | #, php-format 34 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 35 | msgstr "A classe \"%1$s\" não implementa \"%2$s\"" 36 | 37 | #, php-format 38 | msgid "Class \"%1$s\" not found" 39 | msgstr "Classe \"%1$s\" não encontrada" 40 | 41 | #, php-format 42 | msgid "Coupon code is missing" 43 | msgstr "Falta o código do cupom" 44 | 45 | #, php-format 46 | msgid "ID is missing" 47 | msgstr "Falta o ID" 48 | 49 | #, php-format 50 | msgid "Invalid JSON in body" 51 | msgstr "JSON inválido no body" 52 | 53 | #, php-format 54 | msgid "Invalid characters in class name \"%1$s\"" 55 | msgstr "Caracteres inválidos no nome da classe \"%1$s\"" 56 | 57 | #, php-format 58 | msgid "Invalid class name \"%1$s\"" 59 | msgstr "Nome de classe inválido \"%1$s\"" 60 | 61 | #, php-format 62 | msgid "Invalid client \"%1$s\"" 63 | msgstr "Cliente inválido \"%1$s\"" 64 | 65 | #, php-format 66 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 67 | msgstr "Cliente inválido \"%1$s\" em \"%2$s\"" 68 | 69 | #, php-format 70 | msgid "Invalid factory \"%1$s\"" 71 | msgstr "Fábrica inválida \"%1$s\"" 72 | 73 | #, php-format 74 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 75 | msgstr "Nenhum carrinho para \"ordem.baseid\" (\"%1$s\") encontrado" 76 | 77 | #, php-format 78 | msgid "No view available" 79 | msgstr "Sem visualização disponível" 80 | 81 | msgid "Not allowed for this resource" 82 | msgstr "" 83 | 84 | #, php-format 85 | msgid "Position (ID) is missing" 86 | msgstr "Falta posição (ID)" 87 | 88 | #, php-format 89 | msgid "Product ID is missing" 90 | msgstr "Falta o ID do produto" 91 | 92 | #, php-format 93 | msgid "Required attribute \"order.baseid\" is missing" 94 | msgstr "Falta atributo obrigatório \"ordem.baseid\" " 95 | 96 | #, php-format 97 | msgid "Required parameter \"%1$s\" is missing" 98 | msgstr "" 99 | 100 | #, php-format 101 | msgid "Service ID in attributes is missing" 102 | msgstr "Falta o ID do Serviço nos atributos" 103 | 104 | #, php-format 105 | msgid "Service attributes are missing" 106 | msgstr "Faltam atributos de serviço" 107 | 108 | #, php-format 109 | msgid "Service type (ID) is missing" 110 | msgstr "Falta tipo de serviço (ID)" 111 | 112 | #, php-format 113 | msgid "Type (ID) is missing" 114 | msgstr "Falta tipo (ID)" 115 | 116 | #, php-format 117 | msgid "Unable to call method \"%1$s\"" 118 | msgstr "Incapaz de chamar o método \"%1$s\"" 119 | -------------------------------------------------------------------------------- /i18n/sl.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Goran Sabo , 2020 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 15 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 16 | "Last-Translator: Goran Sabo , 2020\n" 17 | "Language-Team: Slovenian (https://www.transifex.com/aimeos/teams/39015/sl/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: sl\n" 22 | "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" 23 | 24 | #, php-format 25 | msgid "Address type or attributes are missing" 26 | msgstr "Address type or attributes are missing" 27 | 28 | #, php-format 29 | msgid "Attributes are missing" 30 | msgstr "Attributes are missing" 31 | 32 | #, php-format 33 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 34 | msgstr "Class \"%1$s\" does not implement \"%2$s\"" 35 | 36 | #, php-format 37 | msgid "Class \"%1$s\" not found" 38 | msgstr "Class \"%1$s\" not found" 39 | 40 | #, php-format 41 | msgid "Coupon code is missing" 42 | msgstr "Coupon code is missing" 43 | 44 | #, php-format 45 | msgid "ID is missing" 46 | msgstr "ID is missing" 47 | 48 | #, php-format 49 | msgid "Invalid JSON in body" 50 | msgstr "Invalid JSON in body" 51 | 52 | #, php-format 53 | msgid "Invalid characters in class name \"%1$s\"" 54 | msgstr "Invalid characters in class name \"%1$s\"" 55 | 56 | #, php-format 57 | msgid "Invalid class name \"%1$s\"" 58 | msgstr "Invalid class name \"%1$s\"" 59 | 60 | #, php-format 61 | msgid "Invalid client \"%1$s\"" 62 | msgstr "Invalid client \"%1$s\"" 63 | 64 | #, php-format 65 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 66 | msgstr "Invalid client \"%1$s\" in \"%2$s\"" 67 | 68 | #, php-format 69 | msgid "Invalid factory \"%1$s\"" 70 | msgstr "Invalid factory \"%1$s\"" 71 | 72 | #, php-format 73 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 74 | msgstr "No basket for the \"order.baseid\" (\"%1$s\") found" 75 | 76 | #, php-format 77 | msgid "No view available" 78 | msgstr "No view available" 79 | 80 | msgid "Not allowed for this resource" 81 | msgstr "" 82 | 83 | #, php-format 84 | msgid "Position (ID) is missing" 85 | msgstr "Position (ID) is missing" 86 | 87 | #, php-format 88 | msgid "Product ID is missing" 89 | msgstr "Product ID is missing" 90 | 91 | #, php-format 92 | msgid "Required attribute \"order.baseid\" is missing" 93 | msgstr "Required attribute \"order.baseid\" is missing" 94 | 95 | #, php-format 96 | msgid "Required parameter \"%1$s\" is missing" 97 | msgstr "Required parameter \"%1$s\" is missing" 98 | 99 | #, php-format 100 | msgid "Service ID in attributes is missing" 101 | msgstr "Service ID in attributes is missing" 102 | 103 | #, php-format 104 | msgid "Service attributes are missing" 105 | msgstr "Service attributes are missing" 106 | 107 | #, php-format 108 | msgid "Service type (ID) is missing" 109 | msgstr "Service type (ID) is missing" 110 | 111 | #, php-format 112 | msgid "Type (ID) is missing" 113 | msgstr "Type (ID) is missing" 114 | 115 | #, php-format 116 | msgid "Unable to call method \"%1$s\"" 117 | msgstr "Unable to call method \"%1$s\"" 118 | -------------------------------------------------------------------------------- /i18n/bg.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Aimeos, 2017 8 | # Bistra Kumanova , 2018 9 | # Plamen Petkov , 2019 10 | # 11 | #, fuzzy 12 | msgid "" 13 | msgstr "" 14 | "Project-Id-Version: PACKAGE VERSION\n" 15 | "Report-Msgid-Bugs-To: \n" 16 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 17 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 18 | "Last-Translator: Plamen Petkov , 2019\n" 19 | "Language-Team: Bulgarian (https://www.transifex.com/aimeos/teams/39015/bg/)\n" 20 | "MIME-Version: 1.0\n" 21 | "Content-Type: text/plain; charset=UTF-8\n" 22 | "Content-Transfer-Encoding: 8bit\n" 23 | "Language: bg\n" 24 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 25 | 26 | #, php-format 27 | msgid "Address type or attributes are missing" 28 | msgstr "Тип или атрибути на адреса липсват" 29 | 30 | #, php-format 31 | msgid "Attributes are missing" 32 | msgstr "Атрибутите липсват" 33 | 34 | #, php-format 35 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 36 | msgstr "Класът \"%1$s\" не се изпълнява \"%2$s\"" 37 | 38 | #, php-format 39 | msgid "Class \"%1$s\" not found" 40 | msgstr "Класът \"%1$s\" не е намерен" 41 | 42 | #, php-format 43 | msgid "Coupon code is missing" 44 | msgstr "Кодът на купона липсва" 45 | 46 | #, php-format 47 | msgid "ID is missing" 48 | msgstr "Номерът липсва" 49 | 50 | #, php-format 51 | msgid "Invalid JSON in body" 52 | msgstr "Невалиден JSON в тялото" 53 | 54 | #, php-format 55 | msgid "Invalid characters in class name \"%1$s\"" 56 | msgstr "Недопустими символи в името на класа \"%1$s\"" 57 | 58 | #, php-format 59 | msgid "Invalid class name \"%1$s\"" 60 | msgstr "Невалидно име на клас \"%1$s\"" 61 | 62 | #, php-format 63 | msgid "Invalid client \"%1$s\"" 64 | msgstr "Невалиден потребител \"%1$s\"" 65 | 66 | #, php-format 67 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 68 | msgstr "Невалиден клиент \"%1$s\" в \"%2$s\"" 69 | 70 | #, php-format 71 | msgid "Invalid factory \"%1$s\"" 72 | msgstr "Невалидна фабрика \"%1$s\"" 73 | 74 | #, php-format 75 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 76 | msgstr "Не е намерена кошница за \"order.baseid\" (\"%1$s\")" 77 | 78 | #, php-format 79 | msgid "No view available" 80 | msgstr "View не е налично" 81 | 82 | msgid "Not allowed for this resource" 83 | msgstr "" 84 | 85 | #, php-format 86 | msgid "Position (ID) is missing" 87 | msgstr "Позиция (Номер) липсва" 88 | 89 | #, php-format 90 | msgid "Product ID is missing" 91 | msgstr "Продукт Номер липсва" 92 | 93 | #, php-format 94 | msgid "Required attribute \"order.baseid\" is missing" 95 | msgstr "Изисква се атрибутът \"order.baseid\" " 96 | 97 | #, php-format 98 | msgid "Required parameter \"%1$s\" is missing" 99 | msgstr "" 100 | 101 | #, php-format 102 | msgid "Service ID in attributes is missing" 103 | msgstr "Услуга Номер в атрибутите липсва" 104 | 105 | #, php-format 106 | msgid "Service attributes are missing" 107 | msgstr "Атрибутите на услугата липсват" 108 | 109 | #, php-format 110 | msgid "Service type (ID) is missing" 111 | msgstr "Услуга тип (Номер) липсва" 112 | 113 | #, php-format 114 | msgid "Type (ID) is missing" 115 | msgstr "Тип (Номер) липсва" 116 | 117 | #, php-format 118 | msgid "Unable to call method \"%1$s\"" 119 | msgstr "Невъзможно е да се извика метод \"%1$s\"" 120 | -------------------------------------------------------------------------------- /i18n/tr.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Aimeos, 2018 8 | # Metal , 2021 9 | # 10 | #, fuzzy 11 | msgid "" 12 | msgstr "" 13 | "Project-Id-Version: PACKAGE VERSION\n" 14 | "Report-Msgid-Bugs-To: \n" 15 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 16 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 17 | "Last-Translator: Metal , 2021\n" 18 | "Language-Team: Turkish (https://www.transifex.com/aimeos/teams/39015/tr/)\n" 19 | "MIME-Version: 1.0\n" 20 | "Content-Type: text/plain; charset=UTF-8\n" 21 | "Content-Transfer-Encoding: 8bit\n" 22 | "Language: tr\n" 23 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 24 | 25 | #, php-format 26 | msgid "Address type or attributes are missing" 27 | msgstr "Adres türü veya nitelikler eksik" 28 | 29 | #, php-format 30 | msgid "Attributes are missing" 31 | msgstr "Nitelikler eksik" 32 | 33 | #, php-format 34 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 35 | msgstr "Class \"%1$s\" \"%2$s\" uygulamıyor" 36 | 37 | #, php-format 38 | msgid "Class \"%1$s\" not found" 39 | msgstr "Class \"%1$s\" bulunamadı" 40 | 41 | #, php-format 42 | msgid "Coupon code is missing" 43 | msgstr "Kupon kodu eksik" 44 | 45 | #, php-format 46 | msgid "ID is missing" 47 | msgstr "Kimlik numarası eksik" 48 | 49 | #, php-format 50 | msgid "Invalid JSON in body" 51 | msgstr "Gövdede geçersiz JSON" 52 | 53 | #, php-format 54 | msgid "Invalid characters in class name \"%1$s\"" 55 | msgstr "%1$s\" class adında geçersiz karakterler" 56 | 57 | #, php-format 58 | msgid "Invalid class name \"%1$s\"" 59 | msgstr "Geçersiz class adı \"%1$s\"" 60 | 61 | #, php-format 62 | msgid "Invalid client \"%1$s\"" 63 | msgstr "Geçersiz istemci \"%1$s\"" 64 | 65 | #, php-format 66 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 67 | msgstr "\"%2$s\" içinde geçersiz istemci \"%1$s\"" 68 | 69 | #, php-format 70 | msgid "Invalid factory \"%1$s\"" 71 | msgstr "Geçersiz fabrika \"%1$s\"" 72 | 73 | #, php-format 74 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 75 | msgstr "\"order.baseid\" (\"%1$s\") için sepet bulunamadı" 76 | 77 | #, php-format 78 | msgid "No view available" 79 | msgstr "Hiçbir görünüm mevcut değil" 80 | 81 | msgid "Not allowed for this resource" 82 | msgstr "Bu kaynak için izin verilmiyor" 83 | 84 | #, php-format 85 | msgid "Position (ID) is missing" 86 | msgstr "Pozisyon (kimlik numarası) eksik" 87 | 88 | #, php-format 89 | msgid "Product ID is missing" 90 | msgstr "Ürün kimlik numarası eksik" 91 | 92 | #, php-format 93 | msgid "Required attribute \"order.baseid\" is missing" 94 | msgstr "Gerekli olan \"order.baseid\" niteliği eksik" 95 | 96 | #, php-format 97 | msgid "Required parameter \"%1$s\" is missing" 98 | msgstr "Gerekli parametre \"%1$s\" eksik" 99 | 100 | #, php-format 101 | msgid "Service ID in attributes is missing" 102 | msgstr "Niteliklerdeki hizmet kimlik numarası eksik" 103 | 104 | #, php-format 105 | msgid "Service attributes are missing" 106 | msgstr "Hizmet nitelikleri eksik" 107 | 108 | #, php-format 109 | msgid "Service type (ID) is missing" 110 | msgstr "Hizmet türü (kimlik numarası) eksik" 111 | 112 | #, php-format 113 | msgid "Type (ID) is missing" 114 | msgstr "Tür (kimlik numarası) eksik" 115 | 116 | #, php-format 117 | msgid "Unable to call method \"%1$s\"" 118 | msgstr "Metot \"%1$s\" çağrılamıyor" 119 | -------------------------------------------------------------------------------- /i18n/nl.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Aimeos, 2018 8 | # CROB Support , 2020 9 | # 10 | #, fuzzy 11 | msgid "" 12 | msgstr "" 13 | "Project-Id-Version: PACKAGE VERSION\n" 14 | "Report-Msgid-Bugs-To: \n" 15 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 16 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 17 | "Last-Translator: CROB Support , 2020\n" 18 | "Language-Team: Dutch (https://www.transifex.com/aimeos/teams/39015/nl/)\n" 19 | "MIME-Version: 1.0\n" 20 | "Content-Type: text/plain; charset=UTF-8\n" 21 | "Content-Transfer-Encoding: 8bit\n" 22 | "Language: nl\n" 23 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 24 | 25 | #, php-format 26 | msgid "Address type or attributes are missing" 27 | msgstr "Adrestype of attributen ontbreken" 28 | 29 | #, php-format 30 | msgid "Attributes are missing" 31 | msgstr "Er ontbreken attributen" 32 | 33 | #, php-format 34 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 35 | msgstr "\"%2$s\" wordt niet geïmplementeerd door Class \"%1$s\" " 36 | 37 | #, php-format 38 | msgid "Class \"%1$s\" not found" 39 | msgstr "Class \"%1$s\" niet gevonden" 40 | 41 | #, php-format 42 | msgid "Coupon code is missing" 43 | msgstr "Couponcode ontbreekt" 44 | 45 | #, php-format 46 | msgid "ID is missing" 47 | msgstr "ID ontbreekt" 48 | 49 | #, php-format 50 | msgid "Invalid JSON in body" 51 | msgstr "Foutieve JSON in body" 52 | 53 | #, php-format 54 | msgid "Invalid characters in class name \"%1$s\"" 55 | msgstr "Ongeldige karakters in class naam \"%1$s\"" 56 | 57 | #, php-format 58 | msgid "Invalid class name \"%1$s\"" 59 | msgstr "Niet toegestane class naam \"%1$s\"" 60 | 61 | #, php-format 62 | msgid "Invalid client \"%1$s\"" 63 | msgstr "Ongeldige client \"%1$s\"" 64 | 65 | #, php-format 66 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 67 | msgstr "Foutieve client \"%1$s\" in \"%2$s\"" 68 | 69 | #, php-format 70 | msgid "Invalid factory \"%1$s\"" 71 | msgstr "Ongeldige Factory \"%1$s\"" 72 | 73 | #, php-format 74 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 75 | msgstr "Geen basket voor de \"order.baseid\" (\"%1$s\") gevonden" 76 | 77 | #, php-format 78 | msgid "No view available" 79 | msgstr "Geen weergave beschikbaar" 80 | 81 | msgid "Not allowed for this resource" 82 | msgstr "" 83 | 84 | #, php-format 85 | msgid "Position (ID) is missing" 86 | msgstr "Positie (ID) ontbreekt" 87 | 88 | #, php-format 89 | msgid "Product ID is missing" 90 | msgstr "Product ID ontbreekt" 91 | 92 | #, php-format 93 | msgid "Required attribute \"order.baseid\" is missing" 94 | msgstr "Vereiste attribuut \"order.baseid\" ontbreekt" 95 | 96 | #, php-format 97 | msgid "Required parameter \"%1$s\" is missing" 98 | msgstr "Vereiste parameter \"%1$s\" ontbreekt" 99 | 100 | #, php-format 101 | msgid "Service ID in attributes is missing" 102 | msgstr "Service ID in attributen ontbreekt" 103 | 104 | #, php-format 105 | msgid "Service attributes are missing" 106 | msgstr "Service attributen ontbreken" 107 | 108 | #, php-format 109 | msgid "Service type (ID) is missing" 110 | msgstr "Service type (ID) ontbreekt" 111 | 112 | #, php-format 113 | msgid "Type (ID) is missing" 114 | msgstr "Type (ID) ontbreekt" 115 | 116 | #, php-format 117 | msgid "Unable to call method \"%1$s\"" 118 | msgstr "Call method \"%1$s\" kon niet worden aangeroepen" 119 | -------------------------------------------------------------------------------- /src/Client/JsonApi/Iface.php: -------------------------------------------------------------------------------- 1 | , YEAR. 5 | # 6 | # Translators: 7 | # Aimeos, 2018 8 | # Lara Merlotto , 2020 9 | # S 0l, 2021 10 | # 11 | #, fuzzy 12 | msgid "" 13 | msgstr "" 14 | "Project-Id-Version: PACKAGE VERSION\n" 15 | "Report-Msgid-Bugs-To: \n" 16 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 17 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 18 | "Last-Translator: S 0l, 2021\n" 19 | "Language-Team: Spanish (https://www.transifex.com/aimeos/teams/39015/es/)\n" 20 | "MIME-Version: 1.0\n" 21 | "Content-Type: text/plain; charset=UTF-8\n" 22 | "Content-Transfer-Encoding: 8bit\n" 23 | "Language: es\n" 24 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 25 | 26 | #, php-format 27 | msgid "Address type or attributes are missing" 28 | msgstr "Faltan tipos de dirección o atributos " 29 | 30 | #, php-format 31 | msgid "Attributes are missing" 32 | msgstr "Faltan atributos " 33 | 34 | #, php-format 35 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 36 | msgstr "La clase \"%1$s\" no implementa \"%2$s\"" 37 | 38 | #, php-format 39 | msgid "Class \"%1$s\" not found" 40 | msgstr "Clase \"%1$s\" no encontrada" 41 | 42 | #, php-format 43 | msgid "Coupon code is missing" 44 | msgstr "Falta el código de cupón " 45 | 46 | #, php-format 47 | msgid "ID is missing" 48 | msgstr "Falta el ID" 49 | 50 | #, php-format 51 | msgid "Invalid JSON in body" 52 | msgstr "JSON no válido en el cuerpo" 53 | 54 | #, php-format 55 | msgid "Invalid characters in class name \"%1$s\"" 56 | msgstr "Caracteres no válidos en el nombre de clase \"%1$s\"" 57 | 58 | #, php-format 59 | msgid "Invalid class name \"%1$s\"" 60 | msgstr "Nombre de clase no válido \"%1$s\"" 61 | 62 | #, php-format 63 | msgid "Invalid client \"%1$s\"" 64 | msgstr "Cliente %1$sinválida/o" 65 | 66 | #, php-format 67 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 68 | msgstr "Cliente no válido \"%1$s\" in \"%2$s\"" 69 | 70 | #, php-format 71 | msgid "Invalid factory \"%1$s\"" 72 | msgstr "Constructor no válido \"%1$s\"" 73 | 74 | #, php-format 75 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 76 | msgstr "No se ha encontrado ninguna cesta para \"order.baseid\" %1$s" 77 | 78 | #, php-format 79 | msgid "No view available" 80 | msgstr "No hay vistas disponibles" 81 | 82 | msgid "Not allowed for this resource" 83 | msgstr "" 84 | 85 | #, php-format 86 | msgid "Position (ID) is missing" 87 | msgstr "Falta la (ID) de la posición" 88 | 89 | #, php-format 90 | msgid "Product ID is missing" 91 | msgstr "Falta la ID del producto" 92 | 93 | #, php-format 94 | msgid "Required attribute \"order.baseid\" is missing" 95 | msgstr "Falta el atributo obligatorio \"order.baseid\" " 96 | 97 | #, php-format 98 | msgid "Required parameter \"%1$s\" is missing" 99 | msgstr "Falta el parámetro obligatorio \"%1$s\"" 100 | 101 | #, php-format 102 | msgid "Service ID in attributes is missing" 103 | msgstr "Falta el ID de servicio en los atributos" 104 | 105 | #, php-format 106 | msgid "Service attributes are missing" 107 | msgstr "Faltan atributos de servicio " 108 | 109 | #, php-format 110 | msgid "Service type (ID) is missing" 111 | msgstr "Falta el tipo de servicio (ID) " 112 | 113 | #, php-format 114 | msgid "Type (ID) is missing" 115 | msgstr "Falta el tipo (ID) " 116 | 117 | #, php-format 118 | msgid "Unable to call method \"%1$s\"" 119 | msgstr "No se ha podido invocar el método \"%1$s\"" 120 | -------------------------------------------------------------------------------- /templates/client/jsonapi/customer/address/standard.php: -------------------------------------------------------------------------------- 1 | encoder(); 12 | 13 | $target = $this->config( 'client/jsonapi/url/target' ); 14 | $cntl = $this->config( 'client/jsonapi/url/controller', 'jsonapi' ); 15 | $action = $this->config( 'client/jsonapi/url/action', 'get' ); 16 | $config = $this->config( 'client/jsonapi/url/config', [] ); 17 | 18 | 19 | $ref = array( 'resource', 'id', 'related', 'relatedid', 'filter', 'page', 'sort', 'include', 'fields' ); 20 | $params = array_intersect_key( $this->param(), array_flip( $ref ) ); 21 | 22 | $pretty = $this->param( 'pretty' ) ? JSON_PRETTY_PRINT : 0; 23 | $fields = $this->param( 'fields', [] ); 24 | 25 | foreach( (array) $fields as $resource => $list ) { 26 | $fields[$resource] = array_flip( explode( ',', $list ) ); 27 | } 28 | 29 | 30 | $entryFcn = function( \Aimeos\MShop\Customer\Item\Address\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) 31 | { 32 | $id = $item->getId(); 33 | $attributes = $item->toArray(); 34 | $rtype = str_replace( '/', '.', $item->getResourceType() ); 35 | 36 | $params = array( 'resource' => 'customer', 'id' => $item->getParentId(), 'related' => 'address', 'relatedid' => $id ); 37 | $basketParams = array( 'resource' => 'basket', 'id' => 'default', 'related' => 'address', 'relatedid' => 'delivery' ); 38 | 39 | if( isset( $fields[$rtype] ) ) { 40 | $attributes = array_intersect_key( $attributes, $fields[$rtype] ); 41 | } 42 | 43 | $entry = array( 44 | 'id' => $id, 45 | 'type' => $rtype, 46 | 'links' => array( 47 | 'self' => array( 48 | 'href' => $this->url( $target, $cntl, $action, $params, [], $config ), 49 | 'allow' => array( 'DELETE', 'GET', 'PATCH' ), 50 | ), 51 | 'basket.address' => array( 52 | 'href' => $this->url( $target, $cntl, $action, $basketParams, [], $config ), 53 | 'allow' => ['POST'], 54 | ), 55 | ), 56 | 'attributes' => $attributes, 57 | ); 58 | 59 | return $entry; 60 | }; 61 | 62 | 63 | ?> 64 | { 65 | "meta": { 66 | "total": get( 'total', 0 ); ?>, 67 | "prefix": get( 'prefix' ) ); ?>, 68 | "content-baseurl": "config( 'resource/fs/baseurl' ); ?>", 69 | "content-baseurls": { 70 | "fs-media": "config( 'resource/fs-media/baseurl' ) ?>", 71 | "fs-mimeicon": "config( 'resource/fs-mimeicon/baseurl' ) ?>", 72 | "fs-theme": "config( 'resource/fs-theme/baseurl' ) ?>" 73 | } 74 | csrf()->name() != '' ) : ?> 75 | , "csrf": { 76 | "name": "csrf()->name(); ?>", 77 | "value": "csrf()->value(); ?>" 78 | } 79 | 80 | 81 | }, 82 | "links": { 83 | "self": "url( $target, $cntl, $action, $params, [], $config ); ?>" 84 | } 85 | errors ) ) : ?> 86 | ,"errors": errors, $pretty ); ?> 87 | 88 | items ) ) : ?> 89 | get( 'items', [] ); 92 | 93 | if( is_map( $items ) ) 94 | { 95 | foreach( $items as $addrItem ) { 96 | $data[] = $entryFcn( $addrItem ); 97 | } 98 | } 99 | else 100 | { 101 | $data = $entryFcn( $items ); 102 | } 103 | ?> 104 | 105 | ,"data": 106 | 107 | 108 | 109 | } 110 | -------------------------------------------------------------------------------- /i18n/hu.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Aimeos, 2017 8 | # nzed , 2020 9 | # 10 | #, fuzzy 11 | msgid "" 12 | msgstr "" 13 | "Project-Id-Version: PACKAGE VERSION\n" 14 | "Report-Msgid-Bugs-To: \n" 15 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 16 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 17 | "Last-Translator: nzed , 2020\n" 18 | "Language-Team: Hungarian (https://www.transifex.com/aimeos/teams/39015/hu/)\n" 19 | "MIME-Version: 1.0\n" 20 | "Content-Type: text/plain; charset=UTF-8\n" 21 | "Content-Transfer-Encoding: 8bit\n" 22 | "Language: hu\n" 23 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 24 | 25 | #, php-format 26 | msgid "Address type or attributes are missing" 27 | msgstr "Címfajta vagy jellemzők hiányoznak" 28 | 29 | #, php-format 30 | msgid "Attributes are missing" 31 | msgstr "Jellemzők hiányoznak" 32 | 33 | #, php-format 34 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 35 | msgstr "\"%1$s\" class nem hajtja végre a \"%2$s\"-t" 36 | 37 | #, php-format 38 | msgid "Class \"%1$s\" not found" 39 | msgstr "A következő osztály nem található: \"%1$s\"" 40 | 41 | #, php-format 42 | msgid "Coupon code is missing" 43 | msgstr "Kupon kód hiányzik" 44 | 45 | #, php-format 46 | msgid "ID is missing" 47 | msgstr "Azonosító hiányzik" 48 | 49 | #, php-format 50 | msgid "Invalid JSON in body" 51 | msgstr "Érvénytelen JSON a tartalomban" 52 | 53 | #, php-format 54 | msgid "Invalid characters in class name \"%1$s\"" 55 | msgstr "Érvénytelen karakter a következő osztály nevében: \"%1$s\"" 56 | 57 | #, php-format 58 | msgid "Invalid class name \"%1$s\"" 59 | msgstr "Érvénytelen osztálynév: \"%1$s\"" 60 | 61 | #, php-format 62 | msgid "Invalid client \"%1$s\"" 63 | msgstr "Érvénytelen ügyfél: \"%1$s\"" 64 | 65 | #, php-format 66 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 67 | msgstr "Érvénytelen ügyfél \"%1$s\" ebben: %2$s" 68 | 69 | #, php-format 70 | msgid "Invalid factory \"%1$s\"" 71 | msgstr "Érvénytelen gyártó: \"%1$s\"" 72 | 73 | #, php-format 74 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 75 | msgstr "Nem található kosár az \"order.baseid\" (\"%1$s\") azonosítóhoz" 76 | 77 | #, php-format 78 | msgid "No view available" 79 | msgstr "Nincs elérhető nézet" 80 | 81 | msgid "Not allowed for this resource" 82 | msgstr "" 83 | 84 | #, php-format 85 | msgid "Position (ID) is missing" 86 | msgstr "Helyzet (ID) hiányzik" 87 | 88 | #, php-format 89 | msgid "Product ID is missing" 90 | msgstr "Termékazonosító hiányzik" 91 | 92 | #, php-format 93 | msgid "Required attribute \"order.baseid\" is missing" 94 | msgstr "\"order.baseid\" kötelező jellemző hiányzik" 95 | 96 | #, php-format 97 | msgid "Required parameter \"%1$s\" is missing" 98 | msgstr "\"%1$s\" kötelező segédváltozó hiányzik" 99 | 100 | #, php-format 101 | msgid "Service ID in attributes is missing" 102 | msgstr "A szolgáltatásazonosító a jellemzőkben hiányzik" 103 | 104 | #, php-format 105 | msgid "Service attributes are missing" 106 | msgstr "A szolgáltatásjellemzők hiányoznak" 107 | 108 | #, php-format 109 | msgid "Service type (ID) is missing" 110 | msgstr "Szolgáltatásfajta (ID) hiányzik" 111 | 112 | #, php-format 113 | msgid "Type (ID) is missing" 114 | msgstr "Fajta (ID) hiányzik" 115 | 116 | #, php-format 117 | msgid "Unable to call method \"%1$s\"" 118 | msgstr "Nem lehet, meghívni a \"%1$s\" eljárást" 119 | -------------------------------------------------------------------------------- /i18n/fa.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Aimeos, 2017 8 | # Mohammad Hossein Kiani Zahrani , 2018 9 | # hasan hojjati , 2018 10 | # محمد مسعودزاده, 2021 11 | # 12 | #, fuzzy 13 | msgid "" 14 | msgstr "" 15 | "Project-Id-Version: PACKAGE VERSION\n" 16 | "Report-Msgid-Bugs-To: \n" 17 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 18 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 19 | "Last-Translator: محمد مسعودزاده, 2021\n" 20 | "Language-Team: Persian (https://www.transifex.com/aimeos/teams/39015/fa/)\n" 21 | "MIME-Version: 1.0\n" 22 | "Content-Type: text/plain; charset=UTF-8\n" 23 | "Content-Transfer-Encoding: 8bit\n" 24 | "Language: fa\n" 25 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 26 | 27 | #, php-format 28 | msgid "Address type or attributes are missing" 29 | msgstr "نوع آدرس و یا مشخصات در دسترس نمیباشد" 30 | 31 | #, php-format 32 | msgid "Attributes are missing" 33 | msgstr "مشخصات در دسترس نمیباشد" 34 | 35 | #, php-format 36 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 37 | msgstr "کلاس \"%1$s\" کلاس \"%2$s\"را پیاده سازی نمیکند" 38 | 39 | #, php-format 40 | msgid "Class \"%1$s\" not found" 41 | msgstr "کلاس \"%1$s\" یافت نشد" 42 | 43 | #, php-format 44 | msgid "Coupon code is missing" 45 | msgstr "کد کوپن در دستری نمیباشد" 46 | 47 | #, php-format 48 | msgid "ID is missing" 49 | msgstr "شناسه موجود نیست" 50 | 51 | #, php-format 52 | msgid "Invalid JSON in body" 53 | msgstr "JSON نامعتبر در بدنه" 54 | 55 | #, php-format 56 | msgid "Invalid characters in class name \"%1$s\"" 57 | msgstr "کاراکترهای نا معتبر در کلاس \"%1$s\"" 58 | 59 | #, php-format 60 | msgid "Invalid class name \"%1$s\"" 61 | msgstr "نام کلاس \"%1$s\" معتبر نمی باشد" 62 | 63 | #, php-format 64 | msgid "Invalid client \"%1$s\"" 65 | msgstr "کلاینت \"%1$s\" معتبر نمیباشد" 66 | 67 | #, php-format 68 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 69 | msgstr "کلاینت نامعتبر \"%1$s\" در \"%2$s\"" 70 | 71 | #, php-format 72 | msgid "Invalid factory \"%1$s\"" 73 | msgstr "کارخانه‌ی \"%1$s\" معتبر نمی‌باشد" 74 | 75 | #, php-format 76 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 77 | msgstr "سبد خریدی برای \"order.baseid\" (\"%1$s\") یافت نشد" 78 | 79 | #, php-format 80 | msgid "No view available" 81 | msgstr "نمایشی موجود نمی‌باشد" 82 | 83 | msgid "Not allowed for this resource" 84 | msgstr "" 85 | 86 | #, php-format 87 | msgid "Position (ID) is missing" 88 | msgstr "موقعیت (ID) موجود نیست" 89 | 90 | #, php-format 91 | msgid "Product ID is missing" 92 | msgstr "شناسه محصول موجود نیست" 93 | 94 | #, php-format 95 | msgid "Required attribute \"order.baseid\" is missing" 96 | msgstr "مشخصات الزامی \"order.baseid\" موجود نیست" 97 | 98 | #, php-format 99 | msgid "Required parameter \"%1$s\" is missing" 100 | msgstr "پارامتر مورد نیاز \"%1$s\" وجود ندارد" 101 | 102 | #, php-format 103 | msgid "Service ID in attributes is missing" 104 | msgstr "شناسه سرویس در مشخصات موجود نمیباشد" 105 | 106 | #, php-format 107 | msgid "Service attributes are missing" 108 | msgstr "مشخصات سرویس موجود نمیباشند" 109 | 110 | #, php-format 111 | msgid "Service type (ID) is missing" 112 | msgstr "نوع سرویس (ID) موجود نمیباشد" 113 | 114 | #, php-format 115 | msgid "Type (ID) is missing" 116 | msgstr "نوع (ID) موجود نمیباشد" 117 | 118 | #, php-format 119 | msgid "Unable to call method \"%1$s\"" 120 | msgstr "صدا زدن متد \"%1$s\" غیرممکن می‌باشد" 121 | -------------------------------------------------------------------------------- /templates/client/jsonapi/locale/standard.php: -------------------------------------------------------------------------------- 1 | encoder(); 12 | 13 | $target = $this->config( 'client/jsonapi/url/target' ); 14 | $cntl = $this->config( 'client/jsonapi/url/controller', 'jsonapi' ); 15 | $action = $this->config( 'client/jsonapi/url/action', 'get' ); 16 | $config = $this->config( 'client/jsonapi/url/config', [] ); 17 | 18 | 19 | $offset = max( $this->param( 'page/offset', 0 ), 0 ); 20 | $limit = max( $this->param( 'page/limit', 100 ), 1 ); 21 | 22 | 23 | $ref = array( 'resource', 'id', 'related', 'relatedid', 'filter', 'page', 'sort', 'include', 'fields' ); 24 | $params = array_intersect_key( $this->param(), array_flip( $ref ) ); 25 | 26 | $pretty = $this->param( 'pretty' ) ? JSON_PRETTY_PRINT : 0; 27 | $fields = $this->param( 'fields', [] ); 28 | 29 | foreach( (array) $fields as $resource => $list ) { 30 | $fields[$resource] = array_flip( explode( ',', $list ) ); 31 | } 32 | 33 | 34 | $entryFcn = function( \Aimeos\MShop\Locale\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) 35 | { 36 | $id = $item->getId(); 37 | $attributes = $item->toArray(); 38 | $type = $item->getResourceType(); 39 | $optTarget = $this->config( 'client/jsonapi/url/target' ); 40 | 41 | $params = array( 'resource' => $type, 'id' => $id ); 42 | $resourceParams = ['locale' => $item->getLanguageId(), 'currency' => $item->getCurrencyId()]; 43 | 44 | if( isset( $fields[$type] ) ) { 45 | $attributes = array_intersect_key( $attributes, $fields[$type] ); 46 | } 47 | 48 | $entry = array( 49 | 'id' => $id, 50 | 'type' => $type, 51 | 'links' => array( 52 | 'self' => array( 53 | 'href' => $this->url( $target, $cntl, $action, $params, [], $config ), 54 | 'allow' => array( 'GET' ), 55 | ), 56 | 'resources' => array( 57 | 'href' => $this->url( $optTarget, $cntl, $action, $resourceParams, [], $config ), 58 | 'allow' => array( 'OPTIONS' ), 59 | ), 60 | ), 61 | 'attributes' => $attributes, 62 | ); 63 | 64 | return $entry; 65 | }; 66 | 67 | 68 | ?> 69 | { 70 | "meta": { 71 | "total": get( 'total', 0 ); ?>, 72 | "prefix": get( 'prefix' ) ); ?>, 73 | "content-baseurl": "config( 'resource/fs/baseurl' ); ?>", 74 | "content-baseurls": { 75 | "fs-media": "config( 'resource/fs-media/baseurl' ) ?>", 76 | "fs-mimeicon": "config( 'resource/fs-mimeicon/baseurl' ) ?>", 77 | "fs-theme": "config( 'resource/fs-theme/baseurl' ) ?>" 78 | } 79 | csrf()->name() != '' ) : ?> 80 | , "csrf": { 81 | "name": "csrf()->name(); ?>", 82 | "value": "csrf()->value(); ?>" 83 | } 84 | 85 | 86 | }, 87 | "links": { 88 | "self": "url( $target, $cntl, $action, $params, [], $config ); ?>" 89 | } 90 | errors ) ) : ?> 91 | ,"errors": errors, $pretty ); ?> 92 | 93 | items ) ) : ?> 94 | get( 'items', map() ); 97 | 98 | if( is_map( $items ) ) 99 | { 100 | foreach( $items as $localeItem ) { 101 | $data[] = $entryFcn( $localeItem ); 102 | } 103 | } 104 | else 105 | { 106 | $data = $entryFcn( $items ); 107 | } 108 | ?> 109 | 110 | ,"data": 111 | 112 | 113 | 114 | } 115 | -------------------------------------------------------------------------------- /i18n/it.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # alessandro massarelli , 2017 8 | # Enrico Porceddu , 2018 9 | # R M , 2019 10 | # isabella carlin , 2020 11 | # 12 | #, fuzzy 13 | msgid "" 14 | msgstr "" 15 | "Project-Id-Version: PACKAGE VERSION\n" 16 | "Report-Msgid-Bugs-To: \n" 17 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 18 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 19 | "Last-Translator: isabella carlin , 2020\n" 20 | "Language-Team: Italian (https://www.transifex.com/aimeos/teams/39015/it/)\n" 21 | "MIME-Version: 1.0\n" 22 | "Content-Type: text/plain; charset=UTF-8\n" 23 | "Content-Transfer-Encoding: 8bit\n" 24 | "Language: it\n" 25 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 26 | 27 | #, php-format 28 | msgid "Address type or attributes are missing" 29 | msgstr "Mancano il tipo di indirizzo o gli attributi" 30 | 31 | #, php-format 32 | msgid "Attributes are missing" 33 | msgstr "Attributi mancanti" 34 | 35 | #, php-format 36 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 37 | msgstr "La classe \"%1$s\" non implementa \"%2$s\"" 38 | 39 | #, php-format 40 | msgid "Class \"%1$s\" not found" 41 | msgstr "Classe \" 1 %1$s\" non trovata" 42 | 43 | #, php-format 44 | msgid "Coupon code is missing" 45 | msgstr "Manca il codice del coupon" 46 | 47 | #, php-format 48 | msgid "ID is missing" 49 | msgstr "Manca l'ID" 50 | 51 | #, php-format 52 | msgid "Invalid JSON in body" 53 | msgstr "JSON non valido nel body" 54 | 55 | #, php-format 56 | msgid "Invalid characters in class name \"%1$s\"" 57 | msgstr "Carattere non valido nel nome della classe \" 1 %1$s \"" 58 | 59 | #, php-format 60 | msgid "Invalid class name \"%1$s\"" 61 | msgstr "Il nome della classe \" 1 %1$s \" non è valido" 62 | 63 | #, php-format 64 | msgid "Invalid client \"%1$s\"" 65 | msgstr "Client \" 1 %1$s \" non valido" 66 | 67 | #, php-format 68 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 69 | msgstr "Client \" 1 %1$s \" in \" 2 %2$s \" non valido" 70 | 71 | #, php-format 72 | msgid "Invalid factory \"%1$s\"" 73 | msgstr "Fattore \" 1 %1$s \" non valido" 74 | 75 | #, php-format 76 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 77 | msgstr "Nessun carrello trovato per \"order.baseid\" (\"%1$s\") " 78 | 79 | #, php-format 80 | msgid "No view available" 81 | msgstr "Nessuna vista disponibile" 82 | 83 | msgid "Not allowed for this resource" 84 | msgstr "" 85 | 86 | #, php-format 87 | msgid "Position (ID) is missing" 88 | msgstr "Manca la posizione (ID)" 89 | 90 | #, php-format 91 | msgid "Product ID is missing" 92 | msgstr "Manca l'ID prodotto" 93 | 94 | #, php-format 95 | msgid "Required attribute \"order.baseid\" is missing" 96 | msgstr "Manca l'attributo obbligatorio \"order.baseid\" " 97 | 98 | #, php-format 99 | msgid "Required parameter \"%1$s\" is missing" 100 | msgstr "Manca il parametro richiesto \"%1$s\"" 101 | 102 | #, php-format 103 | msgid "Service ID in attributes is missing" 104 | msgstr "Manca l'ID del servizio negli attributi" 105 | 106 | #, php-format 107 | msgid "Service attributes are missing" 108 | msgstr "Manca il servizio degli attributi" 109 | 110 | #, php-format 111 | msgid "Service type (ID) is missing" 112 | msgstr "Manca il tipo di servizio (ID)" 113 | 114 | #, php-format 115 | msgid "Type (ID) is missing" 116 | msgstr "Manca il tipo (ID)" 117 | 118 | #, php-format 119 | msgid "Unable to call method \"%1$s\"" 120 | msgstr "Impossibile chiamare il metodo \" 1 %1$s \"" 121 | -------------------------------------------------------------------------------- /tests/Client/JsonApi/BaseTest.php: -------------------------------------------------------------------------------- 1 | context = \TestHelper::context(); 27 | $this->view = $this->context->view(); 28 | 29 | $this->object = new \Aimeos\Client\JsonApi\Example( $this->context ); 30 | 31 | $this->object->setView( $this->view ); 32 | } 33 | 34 | 35 | public function testDelete() 36 | { 37 | $response = $this->object->delete( $this->view->request(), $this->view->response() ); 38 | $result = json_decode( (string) $response->getBody(), true ); 39 | 40 | $this->assertEquals( 403, $response->getStatusCode() ); 41 | $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); 42 | $this->assertArrayHasKey( 'errors', $result ); 43 | } 44 | 45 | 46 | public function testGet() 47 | { 48 | $response = $this->object->get( $this->view->request(), $this->view->response() ); 49 | $result = json_decode( (string) $response->getBody(), true ); 50 | 51 | $this->assertEquals( 403, $response->getStatusCode() ); 52 | $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); 53 | $this->assertArrayHasKey( 'errors', $result ); 54 | } 55 | 56 | 57 | public function testPatch() 58 | { 59 | $response = $this->object->patch( $this->view->request(), $this->view->response() ); 60 | $result = json_decode( (string) $response->getBody(), true ); 61 | 62 | $this->assertEquals( 403, $response->getStatusCode() ); 63 | $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); 64 | $this->assertArrayHasKey( 'errors', $result ); 65 | } 66 | 67 | 68 | public function testPost() 69 | { 70 | $response = $this->object->post( $this->view->request(), $this->view->response() ); 71 | $result = json_decode( (string) $response->getBody(), true ); 72 | 73 | $this->assertEquals( 403, $response->getStatusCode() ); 74 | $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); 75 | $this->assertArrayHasKey( 'errors', $result ); 76 | } 77 | 78 | 79 | public function testPut() 80 | { 81 | $response = $this->object->put( $this->view->request(), $this->view->response() ); 82 | $result = json_decode( (string) $response->getBody(), true ); 83 | 84 | $this->assertEquals( 403, $response->getStatusCode() ); 85 | $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); 86 | $this->assertArrayHasKey( 'errors', $result ); 87 | } 88 | 89 | 90 | public function testOptions() 91 | { 92 | $response = $this->object->options( $this->view->request(), $this->view->response() ); 93 | $result = json_decode( (string) $response->getBody(), true ); 94 | 95 | $this->assertEquals( 403, $response->getStatusCode() ); 96 | $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); 97 | $this->assertArrayHasKey( 'errors', $result ); 98 | } 99 | 100 | 101 | public function testGetContext() 102 | { 103 | $result = $this->access( 'context' )->invokeArgs( $this->object, [] ); 104 | $this->assertInstanceOf( \Aimeos\MShop\ContextIface::class, $result ); 105 | } 106 | 107 | 108 | protected function access( $name ) 109 | { 110 | $class = new \ReflectionClass( \Aimeos\Client\JsonApi\Base::class ); 111 | $method = $class->getMethod( $name ); 112 | $method->setAccessible( true ); 113 | 114 | return $method; 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /i18n/fr.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Aimeos, 2017 8 | # Nicolas Lapointe (ComradeNixco) , 2018 9 | # a270031086f2a0d3514bc0cb507b48f6, 2019 10 | # Jean-Baptiste Joulé , 2019 11 | # Six byNine , 2020 12 | # 13 | #, fuzzy 14 | msgid "" 15 | msgstr "" 16 | "Project-Id-Version: PACKAGE VERSION\n" 17 | "Report-Msgid-Bugs-To: \n" 18 | "POT-Creation-Date: 2022-03-05 08:51+0100\n" 19 | "PO-Revision-Date: 2017-02-28 11:36+0000\n" 20 | "Last-Translator: Six byNine , 2020\n" 21 | "Language-Team: French (https://www.transifex.com/aimeos/teams/39015/fr/)\n" 22 | "MIME-Version: 1.0\n" 23 | "Content-Type: text/plain; charset=UTF-8\n" 24 | "Content-Transfer-Encoding: 8bit\n" 25 | "Language: fr\n" 26 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 27 | 28 | #, php-format 29 | msgid "Address type or attributes are missing" 30 | msgstr "Le type d'adresse ou les attributs sont manquants" 31 | 32 | #, php-format 33 | msgid "Attributes are missing" 34 | msgstr "Des attributs sont manquants" 35 | 36 | #, php-format 37 | msgid "Class \"%1$s\" does not implement \"%2$s\"" 38 | msgstr "La classe \"%1$s\" n'implémente pas l'interface \"%2$s\"" 39 | 40 | #, php-format 41 | msgid "Class \"%1$s\" not found" 42 | msgstr "Classe \"%1$s\" non trouvée" 43 | 44 | #, php-format 45 | msgid "Coupon code is missing" 46 | msgstr "Le code de coupon est manquant" 47 | 48 | #, php-format 49 | msgid "ID is missing" 50 | msgstr "ID manquant" 51 | 52 | #, php-format 53 | msgid "Invalid JSON in body" 54 | msgstr "JSON invalide dans le \"body\"" 55 | 56 | #, php-format 57 | msgid "Invalid characters in class name \"%1$s\"" 58 | msgstr "Caractères non valides dans le nom de la classe \"%1$s\"" 59 | 60 | #, php-format 61 | msgid "Invalid class name \"%1$s\"" 62 | msgstr "Nom de classe \"%1$s\" non valide" 63 | 64 | #, php-format 65 | msgid "Invalid client \"%1$s\"" 66 | msgstr "Client invalide \"%1$s\"" 67 | 68 | #, php-format 69 | msgid "Invalid client \"%1$s\" in \"%2$s\"" 70 | msgstr "Client \"%1$s\" invalide dans \"%2$s\"" 71 | 72 | #, php-format 73 | msgid "Invalid factory \"%1$s\"" 74 | msgstr "Factory invalide \"%1$s\"" 75 | 76 | #, php-format 77 | msgid "No basket for the \"order.baseid\" (\"%1$s\") found" 78 | msgstr "Aucun panier trouvé pour le \"order.baseid\" (\"%1$s\")" 79 | 80 | #, php-format 81 | msgid "No view available" 82 | msgstr "Pas de vue disponible" 83 | 84 | msgid "Not allowed for this resource" 85 | msgstr "" 86 | 87 | #, php-format 88 | msgid "Position (ID) is missing" 89 | msgstr "La position (ID) est manquante" 90 | 91 | #, php-format 92 | msgid "Product ID is missing" 93 | msgstr "L'ID de produit est manquant" 94 | 95 | #, php-format 96 | msgid "Required attribute \"order.baseid\" is missing" 97 | msgstr "L'attribut requis \"order.baseid\" est manquant." 98 | 99 | #, php-format 100 | msgid "Required parameter \"%1$s\" is missing" 101 | msgstr "Le paramètre requis \"%1$s\" est manquant" 102 | 103 | #, php-format 104 | msgid "Service ID in attributes is missing" 105 | msgstr "L'ID de service dans les attributs est manquant" 106 | 107 | #, php-format 108 | msgid "Service attributes are missing" 109 | msgstr "Les attributs de service sont manquants" 110 | 111 | #, php-format 112 | msgid "Service type (ID) is missing" 113 | msgstr "Le type de service (ID) est manquant" 114 | 115 | #, php-format 116 | msgid "Type (ID) is missing" 117 | msgstr "Le type (ID) est manquant" 118 | 119 | #, php-format 120 | msgid "Unable to call method \"%1$s\"" 121 | msgstr "Impossible d'appeler la méthode \"%1$s\"" 122 | -------------------------------------------------------------------------------- /templates/client/jsonapi/site/standard.php: -------------------------------------------------------------------------------- 1 | encoder(); 12 | 13 | $target = $this->config( 'client/jsonapi/url/target' ); 14 | $cntl = $this->config( 'client/jsonapi/url/controller', 'jsonapi' ); 15 | $action = $this->config( 'client/jsonapi/url/action', 'get' ); 16 | $config = $this->config( 'client/jsonapi/url/config', [] ); 17 | 18 | $offset = max( $this->param( 'page/offset', 0 ), 0 ); 19 | $limit = max( $this->param( 'page/limit', 100 ), 1 ); 20 | 21 | $ref = array( 'resource', 'id', 'related', 'relatedid', 'filter', 'page', 'sort', 'include', 'fields' ); 22 | $params = array_intersect_key( $this->param(), array_flip( $ref ) ); 23 | 24 | $pretty = $this->param( 'pretty' ) ? JSON_PRETTY_PRINT : 0; 25 | $fields = $this->param( 'fields', [] ); 26 | 27 | foreach( (array) $fields as $resource => $list ) { 28 | $fields[$resource] = array_flip( explode( ',', $list ) ); 29 | } 30 | 31 | 32 | $entryFcn = function( \Aimeos\MShop\Locale\Item\Site\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) 33 | { 34 | if( $item->isAvailable() === false ) { 35 | return []; 36 | } 37 | 38 | $id = $item->getId(); 39 | $type = $item->getResourceType(); 40 | $params = array( 'resource' => 'site', 'id' => $item->getId() ); 41 | $attributes = $item->toArray(); 42 | 43 | if( isset( $fields[$type] ) ) { 44 | $attributes = array_intersect_key( $attributes, $fields[$type] ); 45 | } 46 | 47 | $entry = array( 48 | 'id' => $id, 49 | 'type' => $type, 50 | 'links' => array( 51 | 'self' => array( 52 | 'href' => $this->url( $target, $cntl, $action, $params, [], $config ), 53 | 'allow' => array( 'GET' ), 54 | ), 55 | ), 56 | 'attributes' => $attributes, 57 | ); 58 | 59 | foreach( $item->getChildren() as $catItem ) 60 | { 61 | if( $catItem->isAvailable() ) { 62 | $entry['relationships']['site']['data'][] = array( 'id' => $catItem->getId(), 'type' => 'site' ); 63 | } 64 | } 65 | 66 | return $entry; 67 | }; 68 | 69 | 70 | $siteFcn = function( \Aimeos\MShop\Locale\Item\Site\Iface $item, array $entry ) use ( $target, $cntl, $action, $config ) 71 | { 72 | $params = ['resource' => 'site', 'id' => $item->getId()]; 73 | $entry['links'] = [ 74 | 'self' => [ 75 | 'href' => $this->url( $target, $cntl, $action, $params, [], $config ), 76 | 'allow' => ['GET'] 77 | ] 78 | ]; 79 | 80 | return $entry; 81 | }; 82 | 83 | 84 | ?> 85 | { 86 | "meta": { 87 | "total": get( 'total', 0 ) ?>, 88 | "prefix": get( 'prefix' ) ); ?>, 89 | "content-baseurl": "config( 'resource/fs/baseurl' ); ?>", 90 | "content-baseurls": { 91 | "fs-media": "config( 'resource/fs-media/baseurl' ) ?>", 92 | "fs-mimeicon": "config( 'resource/fs-mimeicon/baseurl' ) ?>", 93 | "fs-theme": "config( 'resource/fs-theme/baseurl' ) ?>" 94 | } 95 | csrf()->name() != '' ) : ?> 96 | , "csrf": { 97 | "name": "csrf()->name(); ?>", 98 | "value": "csrf()->value(); ?>" 99 | } 100 | 101 | 102 | }, 103 | "links": { 104 | "self": "url( $target, $cntl, $action, $params, [], $config ); ?>" 105 | } 106 | errors ) ) : ?> 107 | ,"errors": errors, $pretty ); ?> 108 | 109 | items ) ) : ?> 110 | get( 'items', map() ); 113 | $included = $this->jincluded( $items, $fields, ['site' => $siteFcn] ); 114 | 115 | if( is_map( $items ) ) 116 | { 117 | foreach( $items as $item ) { 118 | $data[] = $entryFcn( $item ); 119 | } 120 | } 121 | else 122 | { 123 | $data = $entryFcn( $items ); 124 | } 125 | ?> 126 | 127 | ,"data": 128 | 129 | ,"included": flat( 1 )->toJson( $pretty ) ?> 130 | 131 | 132 | 133 | } 134 | -------------------------------------------------------------------------------- /tests/TestHelper.php: -------------------------------------------------------------------------------- 1 | setView( self::view( self::$context[$site]->config() ) ); 28 | } 29 | 30 | return ( clone self::$context[$site] )->setToken( md5( microtime( true ) ) ); 31 | } 32 | 33 | 34 | public static function view( \Aimeos\Base\Config\Iface $config ) 35 | { 36 | $view = new \Aimeos\Base\View\Standard( self::getTemplatePaths() ); 37 | 38 | $trans = new \Aimeos\Base\Translation\None( 'en' ); 39 | $helper = new \Aimeos\Base\View\Helper\Translate\Standard( $view, $trans ); 40 | $view->addHelper( 'translate', $helper ); 41 | 42 | $helper = new \Aimeos\Base\View\Helper\Url\Standard( $view, 'baseurl' ); 43 | $view->addHelper( 'url', $helper ); 44 | 45 | $helper = new \Aimeos\Base\View\Helper\Number\Standard( $view, '.', '' ); 46 | $view->addHelper( 'number', $helper ); 47 | 48 | $helper = new \Aimeos\Base\View\Helper\Date\Standard( $view, 'Y-m-d' ); 49 | $view->addHelper( 'date', $helper ); 50 | 51 | $helper = new \Aimeos\Base\View\Helper\Config\Standard( $view, $config ); 52 | $view->addHelper( 'config', $helper ); 53 | 54 | $psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory(); 55 | $helper = new \Aimeos\Base\View\Helper\Request\Standard( $view, $psr17Factory->createServerRequest( 'GET', 'https://aimeos.org' ) ); 56 | $view->addHelper( 'request', $helper ); 57 | 58 | $helper = new \Aimeos\Base\View\Helper\Response\Standard( $view, $psr17Factory->createResponse() ); 59 | $view->addHelper( 'response', $helper ); 60 | 61 | return $view; 62 | } 63 | 64 | 65 | public static function getTemplatePaths() 66 | { 67 | return self::getAimeos()->getTemplatePaths( 'client/jsonapi/templates' ); 68 | } 69 | 70 | 71 | private static function getAimeos() 72 | { 73 | if( !isset( self::$aimeos ) ) 74 | { 75 | require_once 'Bootstrap.php'; 76 | spl_autoload_register( 'Aimeos\\Bootstrap::autoload' ); 77 | 78 | $extdir = dirname( dirname( dirname( dirname( __DIR__ ) ) ) ); 79 | self::$aimeos = new \Aimeos\Bootstrap( array( $extdir ), true ); 80 | } 81 | 82 | return self::$aimeos; 83 | } 84 | 85 | 86 | private static function createContext( $site ) 87 | { 88 | $ctx = new \Aimeos\MShop\Context(); 89 | $aimeos = self::getAimeos(); 90 | 91 | 92 | $paths = $aimeos->getConfigPaths(); 93 | $paths[] = __DIR__ . DIRECTORY_SEPARATOR . 'config'; 94 | $file = __DIR__ . DIRECTORY_SEPARATOR . 'confdoc.ser'; 95 | 96 | $conf = new \Aimeos\Base\Config\PHPArray( ['client' => ['jsonapi' => ['debug' => true]]], $paths ); 97 | $conf = new \Aimeos\Base\Config\Decorator\Memory( $conf ); 98 | $conf = new \Aimeos\Base\Config\Decorator\Documentor( $conf, $file ); 99 | $ctx->setConfig( $conf ); 100 | 101 | 102 | $dbm = new \Aimeos\Base\DB\Manager\Standard( $conf->get( 'resource', [] ), 'DBAL' ); 103 | $ctx->setDatabaseManager( $dbm ); 104 | 105 | 106 | $mq = new \Aimeos\Base\MQueue\Manager\Standard( $conf->get( 'resource', [] ) ); 107 | $ctx->setMessageQueueManager( $mq ); 108 | 109 | 110 | $logger = new \Aimeos\Base\Logger\File( $site . '.log', \Aimeos\Base\Logger\Iface::DEBUG ); 111 | $ctx->setLogger( $logger ); 112 | 113 | 114 | $cache = new \Aimeos\Base\Cache\None(); 115 | $ctx->setCache( $cache ); 116 | 117 | 118 | $i18n = new \Aimeos\Base\Translation\None( 'en' ); 119 | $ctx->setI18n( array( 'en' => $i18n ) ); 120 | 121 | 122 | $passwd = new \Aimeos\Base\Password\Standard(); 123 | $ctx->setPassword( $passwd ); 124 | 125 | 126 | $session = new \Aimeos\Base\Session\None(); 127 | $ctx->setSession( $session ); 128 | 129 | 130 | $localeManager = \Aimeos\MShop::create( $ctx, 'locale' ); 131 | $locale = $localeManager->bootstrap( $site, '', '', false ); 132 | $ctx->setLocale( $locale ); 133 | 134 | 135 | $ctx->setEditor( 'ai-client-jsonapi' ); 136 | 137 | return $ctx; 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /templates/client/jsonapi/review/standard.php: -------------------------------------------------------------------------------- 1 | encoder(); 11 | 12 | $target = $this->config( 'client/jsonapi/url/target' ); 13 | $cntl = $this->config( 'client/jsonapi/url/controller', 'jsonapi' ); 14 | $action = $this->config( 'client/jsonapi/url/action', 'get' ); 15 | $config = $this->config( 'client/jsonapi/url/config', [] ); 16 | 17 | 18 | $total = $this->get( 'total', 0 ); 19 | $offset = max( $this->param( 'page/offset', 0 ), 0 ); 20 | $limit = max( $this->param( 'page/limit', 10 ), 1 ); 21 | 22 | $first = ( $offset > 0 ? 0 : null ); 23 | $prev = ( $offset - $limit >= 0 ? $offset - $limit : null ); 24 | $next = ( $offset + $limit < $total ? $offset + $limit : null ); 25 | $last = ( ( (int) ( $total / $limit ) ) * $limit > $offset ? ( (int) ( $total / $limit ) ) * $limit : null ); 26 | 27 | 28 | $ref = array( 'resource', 'id', 'filter', 'page', 'sort', 'include', 'fields' ); 29 | $params = array_intersect_key( $this->param(), array_flip( $ref ) ); 30 | 31 | $pretty = $this->param( 'pretty' ) ? JSON_PRETTY_PRINT : 0; 32 | $fields = $this->param( 'fields', [] ); 33 | 34 | foreach( (array) $fields as $resource => $list ) { 35 | $fields[$resource] = array_flip( explode( ',', $list ) ); 36 | } 37 | 38 | 39 | $entryFcn = function( \Aimeos\MShop\Review\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) 40 | { 41 | $id = $item->getId(); 42 | $attributes = $item->toArray(); 43 | $type = $item->getResourceType(); 44 | $params = array( 'resource' => $type, 'id' => $id ); 45 | 46 | if( isset( $fields[$type] ) ) { 47 | $attributes = array_intersect_key( $attributes, $fields[$type] ); 48 | } 49 | 50 | $entry = array( 51 | 'id' => $id, 52 | 'type' => $type, 53 | 'links' => array( 54 | 'self' => array( 55 | 'href' => $this->url( $target, $cntl, $action, $params, [], $config ), 56 | 'allow' => array( 'GET' ), 57 | ), 58 | ), 59 | 'attributes' => $attributes, 60 | ); 61 | 62 | return $entry; 63 | }; 64 | 65 | 66 | ?> 67 | { 68 | "meta": { 69 | "total": get( 'total', 0 ); ?>, 70 | "prefix": get( 'prefix' ) ); ?>, 71 | "content-baseurl": "config( 'resource/fs/baseurl' ); ?>", 72 | "content-baseurls": { 73 | "fs-media": "config( 'resource/fs-media/baseurl' ) ?>", 74 | "fs-mimeicon": "config( 'resource/fs-mimeicon/baseurl' ) ?>", 75 | "fs-theme": "config( 'resource/fs-theme/baseurl' ) ?>" 76 | } 77 | 78 | csrf()->name() != '' ) : ?> 79 | , "csrf": { 80 | "name": "csrf()->name(); ?>", 81 | "value": "csrf()->value(); ?>" 82 | } 83 | 84 | 85 | }, 86 | "links": { 87 | get( 'items' ) ) ) : ?> 88 | 89 | "first": "url( $target, $cntl, $action, $params, [], $config ); ?>", 90 | 91 | 92 | "prev": "url( $target, $cntl, $action, $params, [], $config ); ?>", 93 | 94 | 95 | "next": "url( $target, $cntl, $action, $params, [], $config ); ?>", 96 | 97 | 98 | "last": "url( $target, $cntl, $action, $params, [], $config ); ?>", 99 | 100 | 101 | "self": "url( $target, $cntl, $action, $params, [], $config ); ?>" 102 | } 103 | 104 | errors ) ) : ?> 105 | ,"errors": errors, $pretty ); ?> 106 | 107 | items ) ) : ?> 108 | get( 'items', map() ); 111 | 112 | if( is_map( $items ) ) 113 | { 114 | foreach( $items as $item ) { 115 | $data[] = $entryFcn( $item ); 116 | } 117 | } 118 | else 119 | { 120 | $data = $entryFcn( $items ); 121 | } 122 | ?> 123 | 124 | ,"data": 125 | 126 | 127 | 128 | } 129 | -------------------------------------------------------------------------------- /templates/client/jsonapi/catalog/standard.php: -------------------------------------------------------------------------------- 1 | encoder(); 12 | 13 | $target = $this->config( 'client/jsonapi/url/target' ); 14 | $cntl = $this->config( 'client/jsonapi/url/controller', 'jsonapi' ); 15 | $action = $this->config( 'client/jsonapi/url/action', 'get' ); 16 | $config = $this->config( 'client/jsonapi/url/config', [] ); 17 | 18 | $offset = max( $this->param( 'page/offset', 0 ), 0 ); 19 | $limit = max( $this->param( 'page/limit', 100 ), 1 ); 20 | 21 | $ref = array( 'resource', 'id', 'related', 'relatedid', 'filter', 'page', 'sort', 'include', 'fields' ); 22 | $params = array_intersect_key( $this->param(), array_flip( $ref ) ); 23 | 24 | $pretty = $this->param( 'pretty' ) ? JSON_PRETTY_PRINT : 0; 25 | $fields = $this->param( 'fields', [] ); 26 | 27 | foreach( (array) $fields as $resource => $list ) { 28 | $fields[$resource] = array_flip( explode( ',', $list ) ); 29 | } 30 | 31 | 32 | $entryFcn = function( \Aimeos\MShop\Catalog\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) 33 | { 34 | if( $item->isAvailable() === false ) { 35 | return []; 36 | } 37 | 38 | $id = $item->getId(); 39 | $type = $item->getResourceType(); 40 | $params = array( 'resource' => $type, 'id' => $item->getId() ); 41 | $attributes = $item->toArray(); 42 | 43 | if( isset( $fields[$type] ) ) { 44 | $attributes = array_intersect_key( $attributes, $fields[$type] ); 45 | } 46 | 47 | $entry = array( 48 | 'id' => $id, 49 | 'type' => $type, 50 | 'links' => array( 51 | 'self' => array( 52 | 'href' => $this->url( $target, $cntl, $action, $params, [], $config ), 53 | 'allow' => array( 'GET' ), 54 | ), 55 | ), 56 | 'attributes' => $attributes, 57 | ); 58 | 59 | foreach( $item->getChildren() as $catItem ) 60 | { 61 | if( $catItem->isAvailable() ) { 62 | $entry['relationships']['catalog']['data'][] = array( 'id' => $catItem->getId(), 'type' => 'catalog' ); 63 | } 64 | } 65 | 66 | foreach( $item->getListItems() as $listItem ) 67 | { 68 | if( ( $refItem = $listItem->getRefItem() ) !== null && $refItem->isAvailable() ) 69 | { 70 | $ltype = str_replace( '/', '.', $listItem->getResourceType() ); 71 | $rtype = str_replace( '/', '.', $refItem->getResourceType() ); 72 | $attributes = $listItem->toArray(); 73 | 74 | if( isset( $fields[$ltype] ) ) { 75 | $attributes = array_intersect_key( $attributes, $fields[$ltype] ); 76 | } 77 | 78 | $data = array( 'id' => $refItem->getId(), 'type' => $rtype, 'attributes' => $attributes ); 79 | $entry['relationships'][$rtype]['data'][] = $data; 80 | } 81 | } 82 | 83 | return $entry; 84 | }; 85 | 86 | 87 | $catFcn = function( \Aimeos\MShop\Catalog\Item\Iface $item, array $entry ) use ( $target, $cntl, $action, $config ) 88 | { 89 | $params = ['resource' => 'catalog', 'id' => $item->getId()]; 90 | $entry['links'] = [ 91 | 'self' => [ 92 | 'href' => $this->url( $target, $cntl, $action, $params, [], $config ), 93 | 'allow' => ['GET'] 94 | ] 95 | ]; 96 | 97 | return $entry; 98 | }; 99 | 100 | 101 | ?> 102 | { 103 | "meta": { 104 | "total": get( 'total', 0 ) ?>, 105 | "prefix": get( 'prefix' ) ); ?>, 106 | "content-baseurl": "config( 'resource/fs/baseurl' ); ?>", 107 | "content-baseurls": { 108 | "fs-media": "config( 'resource/fs-media/baseurl' ) ?>", 109 | "fs-mimeicon": "config( 'resource/fs-mimeicon/baseurl' ) ?>", 110 | "fs-theme": "config( 'resource/fs-theme/baseurl' ) ?>" 111 | } 112 | csrf()->name() != '' ) : ?> 113 | , "csrf": { 114 | "name": "csrf()->name(); ?>", 115 | "value": "csrf()->value(); ?>" 116 | } 117 | 118 | 119 | }, 120 | "links": { 121 | "self": "url( $target, $cntl, $action, $params, [], $config ); ?>" 122 | } 123 | errors ) ) : ?> 124 | ,"errors": errors, $pretty ); ?> 125 | 126 | items ) ) : ?> 127 | get( 'items', map() ); 130 | $included = $this->jincluded( $items, $fields, ['catalog' => $catFcn] ); 131 | 132 | if( is_map( $items ) ) 133 | { 134 | foreach( $items as $item ) { 135 | $data[] = $entryFcn( $item ); 136 | } 137 | } 138 | else 139 | { 140 | $data = $entryFcn( $items ); 141 | } 142 | ?> 143 | 144 | ,"data": 145 | 146 | ,"included": flat( 1 )->toJson( $pretty ) ?> 147 | 148 | 149 | 150 | } 151 | -------------------------------------------------------------------------------- /templates/client/jsonapi/stock/standard.php: -------------------------------------------------------------------------------- 1 | encoder(); 12 | 13 | $target = $this->config( 'client/jsonapi/url/target' ); 14 | $cntl = $this->config( 'client/jsonapi/url/controller', 'jsonapi' ); 15 | $action = $this->config( 'client/jsonapi/url/action', 'get' ); 16 | $config = $this->config( 'client/jsonapi/url/config', [] ); 17 | 18 | 19 | $total = $this->get( 'total', 0 ); 20 | $offset = max( $this->param( 'page/offset', 0 ), 0 ); 21 | $limit = max( $this->param( 'page/limit', 100 ), 1 ); 22 | 23 | $first = ( $offset > 0 ? 0 : null ); 24 | $prev = ( $offset - $limit >= 0 ? $offset - $limit : null ); 25 | $next = ( $offset + $limit < $total ? $offset + $limit : null ); 26 | $last = ( ( (int) ( $total / $limit ) ) * $limit > $offset ? ( (int) ( $total / $limit ) ) * $limit : null ); 27 | 28 | 29 | $ref = array( 'resource', 'id', 'related', 'relatedid', 'filter', 'page', 'sort', 'include', 'fields' ); 30 | $params = array_intersect_key( $this->param(), array_flip( $ref ) ); 31 | 32 | $pretty = $this->param( 'pretty' ) ? JSON_PRETTY_PRINT : 0; 33 | $fields = $this->param( 'fields', [] ); 34 | 35 | foreach( (array) $fields as $resource => $list ) { 36 | $fields[$resource] = array_flip( explode( ',', $list ) ); 37 | } 38 | 39 | 40 | $entryFcn = function( \Aimeos\MShop\Stock\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) 41 | { 42 | $id = $item->getId(); 43 | $type = $item->getResourceType(); 44 | $params = array( 'resource' => $type, 'id' => $id ); 45 | $attributes = $item->toArray(); 46 | 47 | if( isset( $fields[$type] ) ) { 48 | $attributes = array_intersect_key( $attributes, $fields[$type] ); 49 | } 50 | 51 | $entry = array( 52 | 'id' => $id, 53 | 'type' => $type, 54 | 'links' => array( 55 | 'self' => array( 56 | 'href' => $this->url( $target, $cntl, $action, $params, [], $config ), 57 | 'allow' => array( 'GET' ), 58 | ), 59 | ), 60 | 'attributes' => $attributes, 61 | ); 62 | 63 | if( $typeItem = $item->getTypeItem() ) 64 | { 65 | $entry['relationships'][$type . '.type']['data'][] = [ 66 | 'id' => $typeItem->getId(), 67 | 'type' => $type . '.type', 68 | ]; 69 | } 70 | 71 | return $entry; 72 | }; 73 | 74 | 75 | ?> 76 | { 77 | "meta": { 78 | "total": , 79 | "prefix": get( 'prefix' ) ); ?>, 80 | "content-baseurl": "config( 'resource/fs/baseurl' ); ?>", 81 | "content-baseurls": { 82 | "fs-media": "config( 'resource/fs-media/baseurl' ) ?>", 83 | "fs-mimeicon": "config( 'resource/fs-mimeicon/baseurl' ) ?>", 84 | "fs-theme": "config( 'resource/fs-theme/baseurl' ) ?>" 85 | } 86 | 87 | csrf()->name() != '' ) : ?> 88 | , "csrf": { 89 | "name": "csrf()->name(); ?>", 90 | "value": "csrf()->value(); ?>" 91 | } 92 | 93 | 94 | }, 95 | 96 | "links": { 97 | get( 'items' ) ) ) : ?> 98 | 99 | "first": "url( $target, $cntl, $action, $params, [], $config ); ?>", 100 | 101 | 102 | "prev": "url( $target, $cntl, $action, $params, [], $config ); ?>", 103 | 104 | 105 | "next": "url( $target, $cntl, $action, $params, [], $config ); ?>", 106 | 107 | 108 | "last": "url( $target, $cntl, $action, $params, [], $config ); ?>", 109 | 110 | 111 | "self": "url( $target, $cntl, $action, $params, [], $config ); ?>" 112 | } 113 | 114 | errors ) ) : ?> 115 | ,"errors": errors, $pretty ); ?> 116 | 117 | items ) ) : ?> 118 | get( 'items', map() ); 121 | $included = $this->jincluded( $items, $fields ); 122 | 123 | if( is_map( $items ) ) 124 | { 125 | foreach( $items as $item ) { 126 | $data[] = $entryFcn( $item ); 127 | } 128 | } 129 | else 130 | { 131 | $data = $entryFcn( $items ); 132 | } 133 | ?> 134 | 135 | ,"data": 136 | 137 | ,"included": flat( 1 )->toJson( $pretty ) ?> 138 | 139 | 140 | 141 | } 142 | -------------------------------------------------------------------------------- /templates/client/jsonapi/service/standard.php: -------------------------------------------------------------------------------- 1 | encoder(); 12 | 13 | $target = $this->config( 'client/jsonapi/url/target' ); 14 | $cntl = $this->config( 'client/jsonapi/url/controller', 'jsonapi' ); 15 | $action = $this->config( 'client/jsonapi/url/action', 'get' ); 16 | $config = $this->config( 'client/jsonapi/url/config', [] ); 17 | 18 | 19 | $ref = array( 'resource', 'id', 'related', 'relatedid', 'filter', 'page', 'sort', 'include', 'fields' ); 20 | $params = array_intersect_key( $this->param(), array_flip( $ref ) ); 21 | 22 | $pretty = $this->param( 'pretty' ) ? JSON_PRETTY_PRINT : 0; 23 | $fields = $this->param( 'fields', [] ); 24 | 25 | foreach( (array) $fields as $resource => $list ) { 26 | $fields[$resource] = array_flip( explode( ',', $list ) ); 27 | } 28 | 29 | 30 | $entryFcn = function( \Aimeos\MShop\Service\Item\Iface $item, \Aimeos\Map $prices, array $feConfig ) use ( $fields, $target, $cntl, $action, $config ) 31 | { 32 | $metadata = []; 33 | $id = $item->getId(); 34 | $type = $item->getResourceType(); 35 | 36 | $attributes = $item->toArray(); 37 | unset( $attributes['service.config'] ); // don't expose private information 38 | 39 | $params = array( 'resource' => $type, 'id' => $id ); 40 | $basketParams = ['resource' => 'basket', 'id' => 'default', 'related' => 'service', 'relatedid' => $item->getType()]; 41 | 42 | if( isset( $fields[$type] ) ) { 43 | $attributes = array_intersect_key( $attributes, $fields[$type] ); 44 | } 45 | 46 | if( ( $price = $prices->get( $id ) ) !== null ) { 47 | $attributes['price'] = $price->toArray(); 48 | } 49 | 50 | if( isset( $feConfig[$id] ) ) 51 | { 52 | foreach( $feConfig[$id] as $code => $attr ) { 53 | $metadata[$code] = $attr->toArray(); 54 | } 55 | } 56 | 57 | $entry = array( 58 | 'id' => $id, 59 | 'type' => $type, 60 | 'links' => array( 61 | 'self' => array( 62 | 'href' => $this->url( $target, $cntl, $action, $params, [], $config ), 63 | 'allow' => ['GET'], 64 | ), 65 | 'basket.service' => array( 66 | 'href' => $this->url( $target, $cntl, $action, $basketParams, [], $config ), 67 | 'allow' => ['POST'], 68 | 'meta' => $metadata, 69 | ), 70 | ), 71 | 'attributes' => $attributes, 72 | ); 73 | 74 | if( $typeItem = $item->getTypeItem() ) 75 | { 76 | $entry['relationships'][$type . '.type']['data'][] = [ 77 | 'id' => $typeItem->getId(), 78 | 'type' => $type . '.type', 79 | ]; 80 | } 81 | 82 | foreach( $item->getListItems() as $listItem ) 83 | { 84 | if( ( $refItem = $listItem->getRefItem() ) !== null && $refItem->isAvailable() ) 85 | { 86 | $ltype = str_replace( '/', '.', $listItem->getResourceType() ); 87 | $rtype = str_replace( '/', '.', $refItem->getResourceType() ); 88 | $attributes = $listItem->toArray(); 89 | 90 | if( isset( $fields[$ltype] ) ) { 91 | $attributes = array_intersect_key( $attributes, $fields[$ltype] ); 92 | } 93 | 94 | $data = array( 'id' => $refItem->getId(), 'type' => $rtype, 'attributes' => $attributes ); 95 | $entry['relationships'][$rtype]['data'][] = $data; 96 | } 97 | } 98 | 99 | return $entry; 100 | }; 101 | 102 | 103 | ?> 104 | { 105 | "meta": { 106 | "total": get( 'total', 0 ); ?>, 107 | "prefix": get( 'prefix' ) ); ?>, 108 | "content-baseurl": "config( 'resource/fs/baseurl' ); ?>", 109 | "content-baseurls": { 110 | "fs-media": "config( 'resource/fs-media/baseurl' ) ?>", 111 | "fs-mimeicon": "config( 'resource/fs-mimeicon/baseurl' ) ?>", 112 | "fs-theme": "config( 'resource/fs-theme/baseurl' ) ?>" 113 | } 114 | csrf()->name() != '' ) : ?> 115 | , "csrf": { 116 | "name": "csrf()->name(); ?>", 117 | "value": "csrf()->value(); ?>" 118 | } 119 | 120 | 121 | }, 122 | "links": { 123 | "self": "url( $target, $cntl, $action, $params, [], $config ); ?>" 124 | } 125 | errors ) ) : ?> 126 | ,"errors": errors, $pretty ); ?> 127 | 128 | items ) ) : ?> 129 | get( 'items', map() ); 132 | $prices = $this->get( 'prices', map() ); 133 | $feConfig = $this->get( 'attributes', [] ); 134 | $included = $this->jincluded( $this->items, $fields ); 135 | 136 | if( is_map( $items ) ) 137 | { 138 | foreach( $items as $item ) { 139 | $data[] = $entryFcn( $item, $prices, $feConfig ); 140 | } 141 | } 142 | else 143 | { 144 | $data = $entryFcn( $items, $prices, $feConfig ); 145 | } 146 | ?> 147 | 148 | ,"data": 149 | 150 | ,"included": flat( 1 )->toJson( $pretty ) ?> 151 | 152 | 153 | 154 | } 155 | -------------------------------------------------------------------------------- /templates/client/jsonapi/supplier/standard.php: -------------------------------------------------------------------------------- 1 | encoder(); 12 | 13 | $target = $this->config( 'client/jsonapi/url/target' ); 14 | $cntl = $this->config( 'client/jsonapi/url/controller', 'jsonapi' ); 15 | $action = $this->config( 'client/jsonapi/url/action', 'get' ); 16 | $config = $this->config( 'client/jsonapi/url/config', [] ); 17 | 18 | 19 | $total = $this->get( 'total', 0 ); 20 | $offset = max( $this->param( 'page/offset', 0 ), 0 ); 21 | $limit = max( $this->param( 'page/limit', 25 ), 1 ); 22 | 23 | $first = ( $offset > 0 ? 0 : null ); 24 | $prev = ( $offset - $limit >= 0 ? $offset - $limit : null ); 25 | $next = ( $offset + $limit < $total ? $offset + $limit : null ); 26 | $last = ( ( (int) ( $total / $limit ) ) * $limit > $offset ? ( (int) ( $total / $limit ) ) * $limit : null ); 27 | 28 | 29 | $ref = array( 'resource', 'id', 'related', 'relatedid', 'filter', 'page', 'sort', 'include', 'fields' ); 30 | $params = array_intersect_key( $this->param(), array_flip( $ref ) ); 31 | 32 | $pretty = $this->param( 'pretty' ) ? JSON_PRETTY_PRINT : 0; 33 | $fields = $this->param( 'fields', [] ); 34 | 35 | foreach( (array) $fields as $resource => $list ) { 36 | $fields[$resource] = array_flip( explode( ',', $list ) ); 37 | } 38 | 39 | 40 | $entryFcn = function( \Aimeos\MShop\Supplier\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) 41 | { 42 | $id = $item->getId(); 43 | $type = $item->getResourceType(); 44 | $params = array( 'resource' => $type, 'id' => $id ); 45 | $attributes = $item->toArray(); 46 | 47 | if( isset( $fields[$type] ) ) { 48 | $attributes = array_intersect_key( $attributes, $fields[$type] ); 49 | } 50 | 51 | $entry = array( 52 | 'id' => $id, 53 | 'type' => $type, 54 | 'links' => array( 55 | 'self' => array( 56 | 'href' => $this->url( $target, $cntl, $action, $params, [], $config ), 57 | 'allow' => array( 'GET' ), 58 | ), 59 | ), 60 | 'attributes' => $attributes, 61 | ); 62 | 63 | foreach( $item->getAddressItems() as $addrId => $addrItem ) 64 | { 65 | $entry['relationships']['supplier.address']['data'][] = [ 66 | 'id' => $addrId, 67 | 'type' => 'supplier.address', 68 | ]; 69 | } 70 | 71 | foreach( $item->getListItems() as $listItem ) 72 | { 73 | if( ( $refItem = $listItem->getRefItem() ) !== null && $refItem->isAvailable() ) 74 | { 75 | $ltype = str_replace( '/', '.', $listItem->getResourceType() ); 76 | $rtype = str_replace( '/', '.', $refItem->getResourceType() ); 77 | $attributes = $listItem->toArray(); 78 | 79 | if( isset( $fields[$ltype] ) ) { 80 | $attributes = array_intersect_key( $attributes, $fields[$ltype] ); 81 | } 82 | 83 | $data = array( 'id' => $refItem->getId(), 'type' => $rtype, 'attributes' => $attributes ); 84 | $entry['relationships'][$rtype]['data'][] = $data; 85 | } 86 | } 87 | 88 | return $entry; 89 | }; 90 | 91 | 92 | ?> 93 | { 94 | "meta": { 95 | "total": , 96 | "prefix": get( 'prefix' ) ); ?>, 97 | "content-baseurl": "config( 'resource/fs/baseurl' ); ?>", 98 | "content-baseurls": { 99 | "fs-media": "config( 'resource/fs-media/baseurl' ) ?>", 100 | "fs-mimeicon": "config( 'resource/fs-mimeicon/baseurl' ) ?>", 101 | "fs-theme": "config( 'resource/fs-theme/baseurl' ) ?>" 102 | } 103 | csrf()->name() != '' ) : ?> 104 | , "csrf": { 105 | "name": "csrf()->name(); ?>", 106 | "value": "csrf()->value(); ?>" 107 | } 108 | 109 | 110 | }, 111 | "links": { 112 | get( 'items' ) ) ) : ?> 113 | 114 | "first": "url( $target, $cntl, $action, $params, [], $config ); ?>", 115 | 116 | 117 | "prev": "url( $target, $cntl, $action, $params, [], $config ); ?>", 118 | 119 | 120 | "next": "url( $target, $cntl, $action, $params, [], $config ); ?>", 121 | 122 | 123 | "last": "url( $target, $cntl, $action, $params, [], $config ); ?>", 124 | 125 | 126 | "self": "url( $target, $cntl, $action, $params, [], $config ); ?>" 127 | } 128 | errors ) ) : ?> 129 | ,"errors": errors, $pretty ); ?> 130 | 131 | items ) ) : ?> 132 | get( 'items', map() ); 135 | $included = $this->jincluded( $items, $fields ); 136 | 137 | if( is_map( $items ) ) 138 | { 139 | foreach( $items as $item ) { 140 | $data[] = $entryFcn( $item ); 141 | } 142 | } 143 | else 144 | { 145 | $data = $entryFcn( $items ); 146 | } 147 | ?> 148 | 149 | ,"data": 150 | 151 | ,"included": flat( 1 )->toJson( $pretty ) ?> 152 | 153 | 154 | 155 | } 156 | -------------------------------------------------------------------------------- /templates/client/jsonapi/attribute/standard.php: -------------------------------------------------------------------------------- 1 | encoder(); 12 | 13 | $target = $this->config( 'client/jsonapi/url/target' ); 14 | $cntl = $this->config( 'client/jsonapi/url/controller', 'jsonapi' ); 15 | $action = $this->config( 'client/jsonapi/url/action', 'get' ); 16 | $config = $this->config( 'client/jsonapi/url/config', [] ); 17 | 18 | 19 | $total = $this->get( 'total', 0 ); 20 | $offset = max( $this->param( 'page/offset', 0 ), 0 ); 21 | $limit = max( $this->param( 'page/limit', 100 ), 1 ); 22 | 23 | $first = ( $offset > 0 ? 0 : null ); 24 | $prev = ( $offset - $limit >= 0 ? $offset - $limit : null ); 25 | $next = ( $offset + $limit < $total ? $offset + $limit : null ); 26 | $last = ( ( (int) ( $total / $limit ) ) * $limit > $offset ? ( (int) ( $total / $limit ) ) * $limit : null ); 27 | 28 | 29 | $ref = array( 'resource', 'id', 'related', 'relatedid', 'filter', 'page', 'sort', 'include', 'fields' ); 30 | $params = array_intersect_key( $this->param(), array_flip( $ref ) ); 31 | 32 | $pretty = $this->param( 'pretty' ) ? JSON_PRETTY_PRINT : 0; 33 | $fields = $this->param( 'fields', [] ); 34 | 35 | foreach( (array) $fields as $resource => $list ) { 36 | $fields[$resource] = array_flip( explode( ',', $list ) ); 37 | } 38 | 39 | 40 | $entryFcn = function( \Aimeos\MShop\Attribute\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) 41 | { 42 | $id = $item->getId(); 43 | $type = $item->getResourceType(); 44 | $params = array( 'resource' => $type, 'id' => $id ); 45 | $attributes = $item->toArray(); 46 | 47 | if( isset( $fields[$type] ) ) { 48 | $attributes = array_intersect_key( $attributes, $fields[$type] ); 49 | } 50 | 51 | $entry = array( 52 | 'id' => $id, 53 | 'type' => $type, 54 | 'links' => array( 55 | 'self' => array( 56 | 'href' => $this->url( $target, $cntl, $action, $params, [], $config ), 57 | 'allow' => array( 'GET' ), 58 | ), 59 | ), 60 | 'attributes' => $attributes, 61 | ); 62 | 63 | if( $typeItem = $item->getTypeItem() ) 64 | { 65 | $entry['relationships'][$type . '.type']['data'][] = [ 66 | 'id' => $typeItem->getId(), 67 | 'type' => $type . '.type', 68 | ]; 69 | } 70 | 71 | foreach( $item->getPropertyItems() as $propItem ) 72 | { 73 | $entry['relationships'][$type . '.property']['data'][] = [ 74 | 'id' => $propItem->getId(), 75 | 'type' => $type . '.property', 76 | ]; 77 | } 78 | 79 | foreach( $item->getListItems() as $listItem ) 80 | { 81 | if( ( $refItem = $listItem->getRefItem() ) !== null && $refItem->isAvailable() ) 82 | { 83 | $ltype = str_replace( '/', '.', $listItem->getResourceType() ); 84 | $rtype = str_replace( '/', '.', $refItem->getResourceType() ); 85 | $attributes = $listItem->toArray(); 86 | 87 | if( isset( $fields[$ltype] ) ) { 88 | $attributes = array_intersect_key( $attributes, $fields[$ltype] ); 89 | } 90 | 91 | $data = array( 'id' => $refItem->getId(), 'type' => $rtype, 'attributes' => $attributes ); 92 | $entry['relationships'][$rtype]['data'][] = $data; 93 | } 94 | } 95 | 96 | return $entry; 97 | }; 98 | 99 | 100 | ?> 101 | { 102 | "meta": { 103 | "total": , 104 | "prefix": get( 'prefix' ) ); ?>, 105 | "content-baseurl": "config( 'resource/fs/baseurl' ); ?>", 106 | "content-baseurls": { 107 | "fs-media": "config( 'resource/fs-media/baseurl' ) ?>", 108 | "fs-mimeicon": "config( 'resource/fs-mimeicon/baseurl' ) ?>", 109 | "fs-theme": "config( 'resource/fs-theme/baseurl' ) ?>" 110 | } 111 | csrf()->name() != '' ) : ?> 112 | , "csrf": { 113 | "name": "csrf()->name(); ?>", 114 | "value": "csrf()->value(); ?>" 115 | } 116 | 117 | }, 118 | "links": { 119 | get( 'items' ) ) ) : ?> 120 | 121 | "first": "url( $target, $cntl, $action, $params, [], $config ); ?>", 122 | 123 | 124 | "prev": "url( $target, $cntl, $action, $params, [], $config ); ?>", 125 | 126 | 127 | "next": "url( $target, $cntl, $action, $params, [], $config ); ?>", 128 | 129 | 130 | "last": "url( $target, $cntl, $action, $params, [], $config ); ?>", 131 | 132 | 133 | "self": "url( $target, $cntl, $action, $params, [], $config ); ?>" 134 | } 135 | errors ) ) : ?> 136 | ,"errors": errors, $pretty ); ?> 137 | 138 | items ) ) : ?> 139 | get( 'items', map() ); 142 | $included = $this->jincluded( $items, $fields ); 143 | 144 | if( is_map( $items ) ) 145 | { 146 | foreach( $items as $item ) { 147 | $data[] = $entryFcn( $item ); 148 | } 149 | } 150 | else 151 | { 152 | $data = $entryFcn( $items ); 153 | } 154 | ?> 155 | 156 | ,"data": 157 | 158 | ,"included": flat( 1 )->toJson( $pretty ) ?> 159 | 160 | 161 | 162 | } 163 | -------------------------------------------------------------------------------- /tests/Client/JsonApi/Stock/StandardTest.php: -------------------------------------------------------------------------------- 1 | context = \TestHelper::context(); 24 | $this->view = $this->context->view(); 25 | 26 | $this->object = new \Aimeos\Client\JsonApi\Stock\Standard( $this->context ); 27 | $this->object->setView( $this->view ); 28 | } 29 | 30 | 31 | protected function tearDown() : void 32 | { 33 | \Aimeos\Controller\Frontend::cache( false ); 34 | unset( $this->view, $this->object, $this->context ); 35 | } 36 | 37 | 38 | public function testGetItem() 39 | { 40 | $manager = \Aimeos\MShop::create( $this->context, 'stock' ); 41 | $stockId = $manager->search( $manager->filter()->slice( 0, 1 ) )->getId()->first(); 42 | 43 | $params = array( 44 | 'id' => $stockId, 45 | 'fields' => array( 46 | 'stock' => 'stock.id,stock.productid,stock.stocklevel' 47 | ), 48 | 'sort' => 'stock.id', 49 | 'include' => 'stock.type' 50 | ); 51 | 52 | $helper = new \Aimeos\Base\View\Helper\Param\Standard( $this->view, $params ); 53 | $this->view->addHelper( 'param', $helper ); 54 | 55 | $response = $this->object->get( $this->view->request(), $this->view->response() ); 56 | $result = json_decode( (string) $response->getBody(), true ); 57 | 58 | $this->assertEquals( 200, $response->getStatusCode() ); 59 | $this->assertEquals( 1, count( $response->getHeader( 'Allow' ) ) ); 60 | $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); 61 | 62 | $this->assertEquals( 1, $result['meta']['total'] ); 63 | $this->assertEquals( 'stock', $result['data']['type'] ); 64 | $this->assertEquals( 3, count( $result['data']['attributes'] ) ); 65 | $this->assertNotEquals( '', $result['data']['attributes']['stock.productid'] ); 66 | $this->assertEquals( 1, count( $result['data']['relationships']['stock.type']['data'] ) ); 67 | $this->assertEquals( 1, count( $result['included'] ) ); 68 | 69 | $this->assertArrayNotHasKey( 'errors', $result ); 70 | } 71 | 72 | 73 | public function testGetItems() 74 | { 75 | $prodId = \Aimeos\MShop::create( $this->context, 'product' )->find( 'CNC' )->getId(); 76 | 77 | $params = array( 78 | 'filter' => ['s_prodid' => [$prodId]], 79 | 'sort' => 'stock.productid,-stock.dateback', 80 | ); 81 | $helper = new \Aimeos\Base\View\Helper\Param\Standard( $this->view, $params ); 82 | $this->view->addHelper( 'param', $helper ); 83 | 84 | $response = $this->object->get( $this->view->request(), $this->view->response() ); 85 | $result = json_decode( (string) $response->getBody(), true ); 86 | 87 | $this->assertEquals( 200, $response->getStatusCode() ); 88 | $this->assertEquals( 1, count( $response->getHeader( 'Allow' ) ) ); 89 | $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); 90 | 91 | $this->assertEquals( 1, $result['meta']['total'] ); 92 | $this->assertEquals( 1, count( $result['data'] ) ); 93 | $this->assertEquals( 'stock', $result['data'][0]['type'] ); 94 | 95 | $this->assertArrayNotHasKey( 'errors', $result ); 96 | } 97 | 98 | 99 | public function testGetMShopException() 100 | { 101 | $object = $this->getMockBuilder( \Aimeos\Client\JsonApi\Stock\Standard::class ) 102 | ->setConstructorArgs( [$this->context, 'stock'] ) 103 | ->onlyMethods( ['getItems'] ) 104 | ->getMock(); 105 | 106 | $object->expects( $this->once() )->method( 'getItems' ) 107 | ->will( $this->throwException( new \Aimeos\MShop\Exception() ) ); 108 | 109 | $object->setView( $this->view ); 110 | 111 | $response = $object->get( $this->view->request(), $this->view->response() ); 112 | $result = json_decode( (string) $response->getBody(), true ); 113 | 114 | 115 | $this->assertEquals( 404, $response->getStatusCode() ); 116 | $this->assertArrayHasKey( 'errors', $result ); 117 | } 118 | 119 | 120 | public function testGetException() 121 | { 122 | $object = $this->getMockBuilder( \Aimeos\Client\JsonApi\Stock\Standard::class ) 123 | ->setConstructorArgs( [$this->context, 'stock'] ) 124 | ->onlyMethods( ['getItems'] ) 125 | ->getMock(); 126 | 127 | $object->expects( $this->once() )->method( 'getItems' ) 128 | ->will( $this->throwException( new \Exception() ) ); 129 | 130 | $object->setView( $this->view ); 131 | 132 | $response = $object->get( $this->view->request(), $this->view->response() ); 133 | $result = json_decode( (string) $response->getBody(), true ); 134 | 135 | 136 | $this->assertEquals( 500, $response->getStatusCode() ); 137 | $this->assertArrayHasKey( 'errors', $result ); 138 | } 139 | 140 | 141 | public function testOptions() 142 | { 143 | $response = $this->object->options( $this->view->request(), $this->view->response() ); 144 | $result = json_decode( (string) $response->getBody(), true ); 145 | 146 | $this->assertEquals( 200, $response->getStatusCode() ); 147 | $this->assertEquals( 1, count( $response->getHeader( 'Allow' ) ) ); 148 | $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); 149 | 150 | $this->assertEquals( null, $result['meta']['prefix'] ); 151 | $this->assertEquals( 3, count( $result['meta']['filter'] ) ); 152 | $this->assertArrayNotHasKey( 'attributes', $result['meta'] ); 153 | $this->assertArrayNotHasKey( 'sort', $result['meta'] ); 154 | $this->assertArrayNotHasKey( 'errors', $result ); 155 | } 156 | } 157 | -------------------------------------------------------------------------------- /src/Client/JsonApi/Common/Decorator/Base.php: -------------------------------------------------------------------------------- 1 | client = $client; 43 | } 44 | 45 | 46 | /** 47 | * Passes unknown methods to wrapped objects 48 | * 49 | * @param string $name Name of the method 50 | * @param array $param List of method parameter 51 | * @return mixed Returns the value of the called method 52 | * @throws \Aimeos\Client\JsonApi\Exception If method call failed 53 | */ 54 | public function __call( string $name, array $param ) 55 | { 56 | return @call_user_func_array( array( $this->client, $name ), $param ); 57 | } 58 | 59 | 60 | /** 61 | * Deletes the resource or the resource list 62 | * 63 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object 64 | * @param \Psr\Http\Message\ResponseInterface $response Response object 65 | * @return \Psr\Http\Message\ResponseInterface Modified response object 66 | */ 67 | public function delete( ServerRequestInterface $request, ResponseInterface $response ) : \Psr\Http\Message\ResponseInterface 68 | { 69 | return $this->client->delete( $request, $response ); 70 | } 71 | 72 | 73 | /** 74 | * Returns the requested resource or the resource list 75 | * 76 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object 77 | * @param \Psr\Http\Message\ResponseInterface $response Response object 78 | * @return \Psr\Http\Message\ResponseInterface Modified response object 79 | */ 80 | public function get( ServerRequestInterface $request, ResponseInterface $response ) : \Psr\Http\Message\ResponseInterface 81 | { 82 | return $this->client->get( $request, $response ); 83 | } 84 | 85 | 86 | 87 | /** 88 | * Updates the resource or the resource list partitially 89 | * 90 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object 91 | * @param \Psr\Http\Message\ResponseInterface $response Response object 92 | * @return \Psr\Http\Message\ResponseInterface Modified response object 93 | */ 94 | public function patch( ServerRequestInterface $request, ResponseInterface $response ) : \Psr\Http\Message\ResponseInterface 95 | { 96 | return $this->client->patch( $request, $response ); 97 | } 98 | 99 | 100 | 101 | /** 102 | * Creates or updates the resource or the resource list 103 | * 104 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object 105 | * @param \Psr\Http\Message\ResponseInterface $response Response object 106 | * @return \Psr\Http\Message\ResponseInterface Modified response object 107 | */ 108 | public function post( ServerRequestInterface $request, ResponseInterface $response ) : \Psr\Http\Message\ResponseInterface 109 | { 110 | return $this->client->post( $request, $response ); 111 | } 112 | 113 | 114 | 115 | /** 116 | * Creates or updates the resource or the resource list 117 | * 118 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object 119 | * @param \Psr\Http\Message\ResponseInterface $response Response object 120 | * @return \Psr\Http\Message\ResponseInterface Modified response object 121 | */ 122 | public function put( ServerRequestInterface $request, ResponseInterface $response ) : \Psr\Http\Message\ResponseInterface 123 | { 124 | return $this->client->put( $request, $response ); 125 | } 126 | 127 | 128 | 129 | /** 130 | * Returns the available REST verbs 131 | * 132 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object 133 | * @param \Psr\Http\Message\ResponseInterface $response Response object 134 | * @return \Psr\Http\Message\ResponseInterface Modified response object 135 | */ 136 | public function options( ServerRequestInterface $request, ResponseInterface $response ) : \Psr\Http\Message\ResponseInterface 137 | { 138 | return $this->client->options( $request, $response ); 139 | } 140 | 141 | 142 | /** 143 | * Sets the view object that will generate the admin output. 144 | * 145 | * @param \Aimeos\Base\View\Iface $view The view object which generates the admin output 146 | * @return \Aimeos\Client\JsonApi\Iface Reference to this object for fluent calls 147 | */ 148 | public function setView( \Aimeos\Base\View\Iface $view ) : \Aimeos\Client\JsonApi\Iface 149 | { 150 | $this->client->setView( $view ); 151 | parent::setView( $view ); 152 | 153 | return $this; 154 | } 155 | 156 | 157 | /** 158 | * Returns the underlying client object; 159 | * 160 | * @return \Aimeos\Client\JsonApi\Iface Client object 161 | */ 162 | protected function getClient() : \Aimeos\Client\JsonApi\Iface 163 | { 164 | return $this->client; 165 | } 166 | } 167 | -------------------------------------------------------------------------------- /src/Client/JsonApi/Standard.php: -------------------------------------------------------------------------------- 1 | view(); 37 | 38 | /** client/jsonapi/template-get 39 | * Relative path to the default JSON API template for unknown GET request 40 | * 41 | * The template file contains the code and processing instructions 42 | * to generate the result shown in the JSON API body. The 43 | * configuration string is the path to the template file relative 44 | * to the templates directory (usually in templates/client/jsonapi). 45 | * 46 | * You can overwrite the template file configuration in extensions and 47 | * provide alternative templates. These alternative templates should be 48 | * named like the default one but with the string "standard" replaced by 49 | * an unique name. You may use the name of your project for this. If 50 | * you've implemented an alternative client class as well, "standard" 51 | * should be replaced by the name of the new class. 52 | * 53 | * @param string Relative path to the template creating the body for the JSON API GET response 54 | * @since 2017.05 55 | * @category Developer 56 | * @see client/jsonapi/template-options 57 | */ 58 | $tplconf = 'client/jsonapi/template-get'; 59 | $default = 'get-standard'; 60 | 61 | $body = $view->render( $view->config( $tplconf, $default ) ); 62 | 63 | return $response->withHeader( 'Allow', 'OPTIONS' ) 64 | ->withHeader( 'Cache-Control', 'max-age=300' ) 65 | ->withHeader( 'Content-Type', 'application/vnd.api+json' ) 66 | ->withBody( $view->response()->createStreamFromString( $body ) ) 67 | ->withStatus( 200 ); 68 | } 69 | 70 | 71 | /** 72 | * Returns the available REST verbs and the available resources 73 | * 74 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object 75 | * @param \Psr\Http\Message\ResponseInterface $response Response object 76 | * @return \Psr\Http\Message\ResponseInterface Modified response object 77 | */ 78 | public function options( ServerRequestInterface $request, ResponseInterface $response ) : \Psr\Http\Message\ResponseInterface 79 | { 80 | $view = $this->view(); 81 | 82 | try 83 | { 84 | /** client/jsonapi/resources 85 | * A list of resource names whose clients are available for the JSON API 86 | * 87 | * The HTTP OPTIONS method returns a list of resources known by the 88 | * JSON API including their URLs. The list of available resources 89 | * can be exteded dynamically be implementing a new Jsonadm client 90 | * class handling request for this new domain. 91 | * 92 | * To add the new domain client to the list of resources returned 93 | * by the HTTP OPTIONS method, you have to add its name in lower case 94 | * to the existing configuration. 95 | * 96 | * @param array List of resource names 97 | * @since 2017.03 98 | * @category Developer 99 | */ 100 | $resources = $this->context()->config()->get( 'client/jsonapi/resources', [] ); 101 | 102 | $view->locale = $this->context()->locale()->toArray(); 103 | $view->resources = (array) $resources; 104 | $status = 200; 105 | } 106 | catch( \Exception $e ) 107 | { 108 | $status = 500; 109 | $view->errors = $this->getErrorDetails( $e ); 110 | } 111 | 112 | /** client/jsonapi/template-options 113 | * Relative path to the JSON API template for OPTIONS requests 114 | * 115 | * The template file contains the code and processing instructions 116 | * to generate the result shown in the JSON API body. The 117 | * configuration string is the path to the template file relative 118 | * to the templates directory (usually in templates/client/jsonapi). 119 | * 120 | * You can overwrite the template file configuration in extensions and 121 | * provide alternative templates. These alternative templates should be 122 | * named like the default one but with the string "standard" replaced by 123 | * an unique name. You may use the name of your project for this. If 124 | * you've implemented an alternative client class as well, "standard" 125 | * should be replaced by the name of the new class. 126 | * 127 | * @param string Relative path to the template creating the body for the OPTIONS method of the JSON API 128 | * @since 2017.02 129 | * @category Developer 130 | * @see client/jsonapi/template-get 131 | */ 132 | $tplconf = 'client/jsonapi/template-options'; 133 | $default = 'options-standard'; 134 | 135 | $body = $view->render( $view->config( $tplconf, $default ) ); 136 | 137 | return $response->withHeader( 'Allow', 'GET' ) 138 | ->withHeader( 'Cache-Control', 'max-age=300' ) 139 | ->withHeader( 'Content-Type', 'application/vnd.api+json' ) 140 | ->withBody( $view->response()->createStreamFromString( $body ) ) 141 | ->withStatus( $status ); 142 | } 143 | } 144 | --------------------------------------------------------------------------------