2017 © Pedro Peláez
 

library allegro-new-desc-html-transformer

Simple library to transform your html description to new Allegro.pl responsible description

image

imper86/allegro-new-desc-html-transformer

Simple library to transform your html description to new Allegro.pl responsible description

  • Friday, May 4, 2018
  • by imper86
  • Repository
  • 1 Watchers
  • 0 Stars
  • 57 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 8 % Grown

The README.md

allegro-new-desc-html-transformer

Simple library to transform your html description to new Allegro.pl responsible description, (*1)

Prerequisites

  • PHP ^7.1
  • composer

Installing

```$xslt composer require imper86/allegro-new-desc-html-transformer, (*2)


## Usage How to convert single HTML item with HtmlTransformer class: ```php use Imper86\AllegroNewDescHtmlTransformer\HtmlTransformer; $uproperHtml = '

Test test
, (*3)

'; $transformer = new HtmlTransformer(); $properHtml = $transformer->transformHtmlString($unproperHtml); var_dump($properHtml->getTransformedHtmlString()); var_dump($properHtml->getTransformedDom()); var_dump($properHtml->getOriginalDom()); var_dump($properHtml->getOriginalHtmlString());

Example of using JsonTransformer class. It can be used to transform completed structs to proper HTML format., (*4)

use Imper86\AllegroNewDescHtmlTransformer\JsonTransformer;

//WARNING!! it's up to you to build well formatted JSON structure, JsonTransformer will only check your HTML sections
$unproperStruct = '{"sections":[{"items":[{"type":"TEXT","content":"

UWAGA AUKCJA TESTOWA, PROSIMY NIE KUPOWAĆ, (*5)

"}]},{"items":[{"type":"IMAGE","url":"PHOTO_FID_16"},{"type":"TEXT","content":"

ADIDAS ZX FLUX K S74952

\n

Rozmiar: 38⅔½⅓

\n
    \n
  • Stan: nowy
  • \n
  • Producent: adidas
  • \n
  • Numer katalogowy: S74952
  • \n
  • Kolor dominujący: różowy
  • \n
  • Kolory dodatkowe: czarny, biały
  • \n
  • Materiał cholewki: materiał tekstylny + materiał syntetyczny
  • \n
  • Podeszwa: guma
  • \n
"}]},{"items":[{"type":"TEXT","content":"

Elegancki i nowoczesny z nutką stylu retro adidas Originals ZX Flux. Cholewka z materiału tekstylnego daje odpowiednią wentylację a gumowa podeszwa zapewnia amortyzację., (*6)

\n

Wewnątrz butów znajdują się wkładki z systemem Ortholite., (*7)

"}]},{"items":[{"type":"IMAGE","url":"PHOTO_FID_17"}]}]}'; $jsonTransformer = new JsonTransformer(); $properStruct = $jsonTransformer->transformJsonStruct($uproperStruct); var_dump($properStruct);

The Versions

04/05 2018

dev-master

9999999-dev

Simple library to transform your html description to new Allegro.pl responsible description

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adrian Szuszkiewicz

04/05 2018

1.0.7

1.0.7.0

Simple library to transform your html description to new Allegro.pl responsible description

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adrian Szuszkiewicz

09/11 2017

1.0.6

1.0.6.0

Simple library to transform your html description to new Allegro.pl responsible description

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adrian Szuszkiewicz

07/08 2017

1.0.5

1.0.5.0

Simple library to transform your html description to new Allegro.pl responsible description

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adrian Szuszkiewicz

07/08 2017

1.0.4

1.0.4.0

Simple library to transform your html description to new Allegro.pl responsible description

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adrian Szuszkiewicz

04/08 2017

1.0.3

1.0.3.0

Simple library to transform your html description to new Allegro.pl responsible description

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adrian Szuszkiewicz

04/08 2017

1.0.2

1.0.2.0

Simple library to transform your html description to new Allegro.pl responsible description

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adrian Szuszkiewicz

04/08 2017

1.0.1

1.0.1.0

Simple library to transform your html description to new Allegro.pl responsible description

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adrian Szuszkiewicz

04/08 2017

1.0.0

1.0.0.0

Simple library to transform your html description to new Allegro.pl responsible description

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adrian Szuszkiewicz