Overview

Namespaces

  • LeadCommerce
    • Shopware
      • SDK
        • Entity
        • Exception
        • Query
        • Util

Classes

  • AddressQuery
  • ArticleQuery
  • Base
  • CacheQuery
  • CategoriesQuery
  • CountriesQuery
  • CustomerGroupsQuery
  • CustomerQuery
  • GenerateArticleImagesQuery
  • ManufacturersQuery
  • MediaQuery
  • OrdersQuery
  • PropertyGroupsQuery
  • ShopsQuery
  • TranslationsQuery
  • VariantsQuery
  • VersionQuery
  • Overview
  • Namespace
  • Class

Class Base

Class Base

Direct known subclasses

LeadCommerce\Shopware\SDK\Query\AddressQuery, LeadCommerce\Shopware\SDK\Query\ArticleQuery, LeadCommerce\Shopware\SDK\Query\OrdersQuery, LeadCommerce\Shopware\SDK\Query\PropertyGroupsQuery, LeadCommerce\Shopware\SDK\Query\ShopsQuery, LeadCommerce\Shopware\SDK\Query\TranslationsQuery, LeadCommerce\Shopware\SDK\Query\VariantsQuery, LeadCommerce\Shopware\SDK\Query\VersionQuery, LeadCommerce\Shopware\SDK\Query\CacheQuery, LeadCommerce\Shopware\SDK\Query\CategoriesQuery, LeadCommerce\Shopware\SDK\Query\CountriesQuery, LeadCommerce\Shopware\SDK\Query\CustomerGroupsQuery, LeadCommerce\Shopware\SDK\Query\CustomerQuery, LeadCommerce\Shopware\SDK\Query\GenerateArticleImagesQuery, LeadCommerce\Shopware\SDK\Query\ManufacturersQuery, LeadCommerce\Shopware\SDK\Query\MediaQuery
Abstract
Namespace: LeadCommerce\Shopware\SDK\Query
Copyright: 2016 LeadCommerce amahrt@leadcommerce.de
Author: Alexander Mahrt amahrt@leadcommerce.de
Located at LeadCommerce/Shopware/SDK/Query/Base.php
Methods summary
public
# __construct( $client )

Base constructor.

Base constructor.

Parameters

$client
abstract protected string
# getQueryPath( )

Gets the query path to look for entities. E.G: 'variants' or 'articles'

Gets the query path to look for entities. E.G: 'variants' or 'articles'

Returns

string
public LeadCommerce\Shopware\SDK\Entity\Base[]
# findAll( )

Finds all entities.

Finds all entities.

Returns

LeadCommerce\Shopware\SDK\Entity\Base[]
protected array|mixed
# fetch( $uri, string $method = 'GET', null $body = null, array $headers = [] )

Fetch and build entity.

Fetch and build entity.

Parameters

$uri
$method
$body
$headers

Returns

array|mixed
protected array|mixed
# createEntityFromResponse( Psr\Http\Message\ResponseInterface $response )

Creates an entity

Creates an entity

Parameters

$response

Returns

array|mixed
protected LeadCommerce\Shopware\SDK\Entity\Base
# createEntity( $content )

Creates an entity based on the getClass method.

Creates an entity based on the getClass method.

Parameters

$content

Returns

LeadCommerce\Shopware\SDK\Entity\Base
abstract protected string
# getClass( )

Gets the class for the entities.

Gets the class for the entities.

Returns

string
public LeadCommerce\Shopware\SDK\Entity\Base
# findOne( $id )

Finds an entity by its id.

Finds an entity by its id.

Parameters

$id

Returns

LeadCommerce\Shopware\SDK\Entity\Base
public LeadCommerce\Shopware\SDK\Entity\Base
# create( LeadCommerce\Shopware\SDK\Entity\Base $entity )

Creates an entity.

Creates an entity.

Parameters

$entity

Returns

LeadCommerce\Shopware\SDK\Entity\Base

Throws

LeadCommerce\Shopware\SDK\Exception\MethodNotAllowedException
public array|mixed
# update( LeadCommerce\Shopware\SDK\Entity\Base $entity )

Updates an entity.

Updates an entity.

Parameters

$entity

Returns

array|mixed

Throws

LeadCommerce\Shopware\SDK\Exception\MethodNotAllowedException
public LeadCommerce\Shopware\SDK\Entity\Base[]
# updateBatch( LeadCommerce\Shopware\SDK\Entity\Base[] $entities )

Updates a batch of this entity.

Updates a batch of this entity.

Parameters

$entities

Returns

LeadCommerce\Shopware\SDK\Entity\Base[]
public array|mixed
# delete( $id )

Deletes an entity by its id..

Deletes an entity by its id..

Parameters

$id

Returns

array|mixed

Throws

LeadCommerce\Shopware\SDK\Exception\MethodNotAllowedException
public array|mixed
# deleteBatch( array $ids )

Deletes a batch of this entity given by ids.

Deletes a batch of this entity given by ids.

Parameters

$ids

Returns

array|mixed

Throws

LeadCommerce\Shopware\SDK\Exception\MethodNotAllowedException
protected mixed|Psr\Http\Message\ResponseInterface
# fetchSimple( $uri, string $method = 'GET', null $body = null, array $headers = [] )

Parameters

$uri
$method
$body
$headers

Returns

mixed|Psr\Http\Message\ResponseInterface
protected false|stdClass
# fetchJson( $uri, string $method = 'GET', null $body = null, array $headers = [] )

Fetch as json object.

Fetch as json object.

Parameters

$uri
$method
$body
$headers

Returns

false|stdClass
Properties summary
protected LeadCommerce\Shopware\SDK\ShopwareClient $client
#
protected string $queryPath
#
protected array $methodsAllowed
# [ Constants::METHOD_CREATE, Constants::METHOD_GET, Constants::METHOD_GET_BATCH, Constants::METHOD_UPDATE, Constants::METHOD_UPDATE_BATCH, Constants::METHOD_DELETE, Constants::METHOD_DELETE_BATCH, ]
shopware-sdk API documentation generated by ApiGen