├── storage ├── registrations │ └── .gitignore └── xpto ├── src ├── Infra │ ├── Http │ │ └── Controllers │ │ │ ├── Presentation.php │ │ │ └── ExportRegistrationController.php │ ├── Presentation │ │ └── ExportRegistrationPresenter.php │ ├── Adapters │ │ ├── LocalStorageAdapter.php │ │ ├── DomPdfAdapter.php │ │ └── Html2PdfAdapter.php │ ├── Cli │ │ └── Commands │ │ │ └── ExportRegistrationCommand.php │ └── Repositories │ │ └── MySQL │ │ └── PdoRegistrationRepository.php ├── Application │ ├── Contracts │ │ ├── Storage.php │ │ └── ExportRegistrationPdfExporter.php │ └── Usecases │ │ └── ExportRegistration │ │ ├── OutputBoundary.php │ │ ├── InputBoundary.php │ │ └── ExportRegistration.php └── Domain │ ├── Repositories │ └── LoadRegistrationRepository.php │ ├── Exceptions │ └── RegistrationNotFoundException.php │ ├── ValueObjects │ ├── Email.php │ └── Cpf.php │ └── Entities │ └── Registration.php ├── config └── app.php ├── .gitignore ├── docs └── db.sql ├── .editorconfig ├── composer.json ├── docker-compose.yml ├── index-cli.php ├── public └── index.php └── composer.lock /storage/registrations/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/xpto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dersonsena/clean-arch-youtube/HEAD/storage/xpto -------------------------------------------------------------------------------- /src/Infra/Http/Controllers/Presentation.php: -------------------------------------------------------------------------------- 1 | [ 5 | 'host' => 'clean-arch-youtube-db', 6 | 'username' => 'root', 7 | 'password' => 'secret', 8 | 'port' => '3306', 9 | 'dbname' => 'clean_arch_youtube', 10 | 'charset' => 'utf8' 11 | ] 12 | ]; 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # phpstorm project files 2 | .idea 3 | vendor 4 | 5 | # netbeans project files 6 | nbproject 7 | 8 | # zend studio for eclipse project files 9 | .buildpath 10 | .project 11 | .settings 12 | 13 | # windows thumbnail cache 14 | Thumbs.db 15 | 16 | # Mac DS_Store Files 17 | .DS_Store 18 | .docker 19 | -------------------------------------------------------------------------------- /src/Application/Contracts/ExportRegistrationPdfExporter.php: -------------------------------------------------------------------------------- 1 | fullFileName = $fullFileName; 14 | } 15 | 16 | public function getFullFileName(): string 17 | { 18 | return $this->fullFileName; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Domain/Exceptions/RegistrationNotFoundException.php: -------------------------------------------------------------------------------- 1 | email = $email; 20 | } 21 | 22 | public function __toString(): string 23 | { 24 | return $this->email; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dersonsena/clean-arch-youtube", 3 | "description": "", 4 | "type": "project", 5 | "authors": [ 6 | { 7 | "name": "Kilderson Sena", 8 | "email": "dersonsena@gmail.com" 9 | } 10 | ], 11 | "require": { 12 | "php": ">=7.4", 13 | "ext-pdo": "*", 14 | "ext-json": "*", 15 | "spipu/html2pdf": "^4.6", 16 | "guzzlehttp/psr7": "^1.8", 17 | "dompdf/dompdf": "^1.0" 18 | }, 19 | "autoload": { 20 | "psr-4": { 21 | "App\\": "src/" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Infra/Adapters/DomPdfAdapter.php: -------------------------------------------------------------------------------- 1 | loadHtml("
Nome: {$registration->getName()}
CPF: {$registration->getRegistrationNumber()}
"); 17 | $dompdf->setPaper('A4', 'landscape'); 18 | $dompdf->render(); 19 | 20 | return $dompdf->output(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Application/Usecases/ExportRegistration/InputBoundary.php: -------------------------------------------------------------------------------- 1 | registrationNumber = $registrationNumber; 16 | $this->pdfFileName = $pdfFileName; 17 | $this->path = $path; 18 | } 19 | 20 | public function getRegistrationNumber(): string 21 | { 22 | return $this->registrationNumber; 23 | } 24 | 25 | public function getPdfFileName(): string 26 | { 27 | return $this->pdfFileName; 28 | } 29 | 30 | public function getPath(): string 31 | { 32 | return $this->path; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.5' 2 | services: 3 | app: 4 | container_name: clean-arch-youtube-app 5 | image: dersonsena/php-nginx-dev 6 | volumes: 7 | - ./:/var/www/html 8 | environment: 9 | - XDEBUG_START_WITH_REQUEST=yes 10 | - XDEBUG_DISCOVER_CLIENT_HOST=false 11 | ports: 12 | - '8080:80' 13 | - '443:443' 14 | networks: 15 | - clean-arch-youtube-network 16 | 17 | mysql: 18 | image: mysql:5.7 19 | container_name: clean-arch-youtube-db 20 | command: --default-authentication-plugin=mysql_native_password --explicit_defaults_for_timestamp=1 21 | restart: always 22 | ports: 23 | - "3306:3306" 24 | environment: 25 | MYSQL_ROOT_PASSWORD: secret 26 | MYSQL_DATABASE: clean_arch_youtube 27 | networks: 28 | - clean-arch-youtube-network 29 | volumes: 30 | - ./.docker/data:/var/lib/mysql 31 | 32 | networks: 33 | clean-arch-youtube-network: 34 | driver: bridge 35 | -------------------------------------------------------------------------------- /src/Infra/Adapters/Html2PdfAdapter.php: -------------------------------------------------------------------------------- 1 | setDefaultFont('Arial'); 20 | $html2pdf->writeHTML( 21 | "Nome: {$registration->getName()}
CPF: {$registration->getRegistrationNumber()}
" 22 | ); 23 | 24 | return $html2pdf->output('', 'S'); 25 | } catch (HTML2PDF_exception $e) { 26 | $html2pdf->clean(); 27 | 28 | $formatter = new ExceptionFormatter($e); 29 | echo $formatter->getHtmlMessage(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Infra/Cli/Commands/ExportRegistrationCommand.php: -------------------------------------------------------------------------------- 1 | useCase = $useCase; 18 | } 19 | 20 | public function handle(Presentation $presentation): string 21 | { 22 | $inputBoundary = new InputBoundary( 23 | '01234567890', 24 | 'xpto-cli.pdf', 25 | __DIR__ . '/../../../../storage/registrations' 26 | ); 27 | 28 | $output = $this->useCase->handle($inputBoundary); 29 | 30 | return $presentation->output([ 31 | 'fullFileName' => $output->getFullFileName() 32 | ]); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Domain/ValueObjects/Cpf.php: -------------------------------------------------------------------------------- 1 | validate($cpf)) { 16 | throw new DomainException('CPF is not valid'); 17 | } 18 | 19 | $this->cpf = $cpf; 20 | } 21 | 22 | private function validate(string $cpf) 23 | { 24 | $cpf = preg_replace( '/[^0-9]/is', '', $cpf ); 25 | 26 | if (strlen($cpf) != 11) { 27 | return false; 28 | } 29 | 30 | if (preg_match('/(\d)\1{10}/', $cpf)) { 31 | return false; 32 | } 33 | 34 | for ($t = 9; $t < 11; $t++) { 35 | for ($d = 0, $c = 0; $c < $t; $c++) { 36 | $d += $cpf[$c] * (($t + 1) - $c); 37 | } 38 | $d = ((10 * $d) % 11) % 10; 39 | if ($cpf[$c] != $d) { 40 | return false; 41 | } 42 | } 43 | 44 | return true; 45 | } 46 | 47 | public function __toString(): string 48 | { 49 | return $this->cpf; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Application/Usecases/ExportRegistration/ExportRegistration.php: -------------------------------------------------------------------------------- 1 | repository = $repository; 24 | $this->pdfExporter = $pdfExporter; 25 | $this->storage = $storage; 26 | } 27 | 28 | public function handle(InputBoundary $input): OutputBoundary 29 | { 30 | $cpf = new Cpf($input->getRegistrationNumber()); 31 | $registration = $this->repository->loadByRegistrationNumber($cpf); 32 | $fileContent = $this->pdfExporter->generate($registration); 33 | 34 | $this->storage->store($input->getPdfFileName(), $input->getPath(), $fileContent); 35 | 36 | return new OutputBoundary($input->getPath() . DIRECTORY_SEPARATOR . $input->getPdfFileName()); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Infra/Http/Controllers/ExportRegistrationController.php: -------------------------------------------------------------------------------- 1 | request = $request; 24 | $this->response = $response; 25 | $this->useCase = $useCase; 26 | } 27 | 28 | public function handle(Presentation $presentation): Response 29 | { 30 | $inputBoundary = new InputBoundary( 31 | '01234567890', 32 | 'xpto-dompdf.pdf', 33 | __DIR__ . '/../../../../storage/registrations' 34 | ); 35 | 36 | $output = $this->useCase->handle($inputBoundary); 37 | 38 | $this->response 39 | ->getBody() 40 | ->write($presentation->output([ 41 | 'fullFileName' => $output->getFullFileName() 42 | ])); 43 | 44 | return $this->response 45 | ->withHeader('Content-Type', 'application/json') 46 | ->withStatus(200); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Infra/Repositories/MySQL/PdoRegistrationRepository.php: -------------------------------------------------------------------------------- 1 | pdo = $pdo; 22 | } 23 | 24 | public function loadByRegistrationNumber(Cpf $cpf): Registration 25 | { 26 | $statement = $this->pdo->prepare( 27 | "SELECT * FROM `registrations` WHERE registration_number = :cpf" 28 | ); 29 | 30 | $statement->execute([':cpf' => (string)$cpf]); 31 | $record = $statement->fetch(); 32 | 33 | if (!$record) { 34 | throw new RegistrationNotFoundException($cpf); 35 | } 36 | 37 | $registration = new Registration(); 38 | $registration->setName($record['name']) 39 | ->setBirthDate(new DateTimeImmutable($record['birth_date'])) 40 | ->setEmail(new Email($record['email'])) 41 | ->setRegistrationAt(new DateTimeImmutable($record['created_at'])) 42 | ->setRegistrationNumber(new Cpf($record['registration_number'])); 43 | 44 | return $registration; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /index-cli.php: -------------------------------------------------------------------------------- 1 | setName('Kilderson Sena') 23 | ->setBirthDate(new DateTimeImmutable('1988-02-14')) 24 | ->setEmail(new Email('dersonsena@gmail.com')) 25 | ->setRegistrationAt(new DateTimeImmutable()) 26 | ->setRegistrationNumber(new Cpf('01234567890')); 27 | 28 | // Use cases 29 | $dsn = sprintf( 30 | 'mysql:host=%s;port=%s;dbname=%s;charset=%s', 31 | $appConfig['db']['host'], 32 | $appConfig['db']['port'], 33 | $appConfig['db']['dbname'], 34 | $appConfig['db']['charset'] 35 | ); 36 | 37 | $pdo = new PDO($dsn, $appConfig['db']['username'], $appConfig['db']['password'], [ 38 | PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, 39 | PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, 40 | PDO::ATTR_PERSISTENT => TRUE 41 | ]); 42 | 43 | $loadRegistrationRepo = new PdoRegistrationRepository($pdo); 44 | //$pdfExporter = new Html2PdfAdapter(); 45 | $pdfExporter = new DomPdfAdapter(); 46 | $storage = new LocalStorageAdapter(); 47 | 48 | $exportRegistrationUseCase = new ExportRegistration($loadRegistrationRepo, $pdfExporter, $storage); 49 | $exportRegistrationCommand = new ExportRegistrationCommand($exportRegistrationUseCase); 50 | $exportRegistrationPresenter = new ExportRegistrationPresenter(); 51 | 52 | echo $exportRegistrationCommand->handle($exportRegistrationPresenter); 53 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | setName('Kilderson Sena') 27 | ->setBirthDate(new DateTimeImmutable('1988-02-14')) 28 | ->setEmail(new Email('dersonsena@gmail.com')) 29 | ->setRegistrationAt(new DateTimeImmutable()) 30 | ->setRegistrationNumber(new Cpf('01234567890')); 31 | 32 | 33 | 34 | // Use cases 35 | $dsn = sprintf( 36 | 'mysql:host=%s;port=%s;dbname=%s;charset=%s', 37 | $appConfig['db']['host'], 38 | $appConfig['db']['port'], 39 | $appConfig['db']['dbname'], 40 | $appConfig['db']['charset'] 41 | ); 42 | 43 | $pdo = new PDO($dsn, $appConfig['db']['username'], $appConfig['db']['password'], [ 44 | PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, 45 | PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, 46 | PDO::ATTR_PERSISTENT => TRUE 47 | ]); 48 | 49 | $loadRegistrationRepo = new PdoRegistrationRepository($pdo); 50 | //$pdfExporter = new Html2PdfAdapter(); 51 | $pdfExporter = new DomPdfAdapter(); 52 | $storage = new LocalStorageAdapter(); 53 | 54 | $exportRegistrationUseCase = new ExportRegistration($loadRegistrationRepo, $pdfExporter, $storage); 55 | $request = new Request('GET', 'http://localhost:8080'); 56 | $response = new Response(); 57 | 58 | // Controllers 59 | 60 | $exportRegistrationController = new ExportRegistrationController( 61 | $request, 62 | $response, 63 | $exportRegistrationUseCase 64 | ); 65 | 66 | $exportRegistrationPresenter = new ExportRegistrationPresenter(); 67 | 68 | echo $exportRegistrationController 69 | ->handle($exportRegistrationPresenter) 70 | ->getBody(); 71 | -------------------------------------------------------------------------------- /src/Domain/Entities/Registration.php: -------------------------------------------------------------------------------- 1 | name; 25 | } 26 | 27 | /** 28 | * @param string $name 29 | * @return Registration 30 | */ 31 | public function setName(string $name): Registration 32 | { 33 | $this->name = $name; 34 | return $this; 35 | } 36 | 37 | /** 38 | * @return Email 39 | */ 40 | public function getEmail(): Email 41 | { 42 | return $this->email; 43 | } 44 | 45 | /** 46 | * @param Email $email 47 | * @return Registration 48 | */ 49 | public function setEmail(Email $email): Registration 50 | { 51 | $this->email = $email; 52 | return $this; 53 | } 54 | 55 | /** 56 | * @return DateTimeInterface 57 | */ 58 | public function getBirthDate(): DateTimeInterface 59 | { 60 | return $this->birthDate; 61 | } 62 | 63 | /** 64 | * @param DateTimeInterface $birthDate 65 | * @return Registration 66 | */ 67 | public function setBirthDate(DateTimeInterface $birthDate): Registration 68 | { 69 | $this->birthDate = $birthDate; 70 | return $this; 71 | } 72 | 73 | /** 74 | * @return Cpf 75 | */ 76 | public function getRegistrationNumber(): Cpf 77 | { 78 | return $this->registrationNumber; 79 | } 80 | 81 | /** 82 | * @param Cpf $registrationNumber 83 | * @return Registration 84 | */ 85 | public function setRegistrationNumber(Cpf $registrationNumber): Registration 86 | { 87 | $this->registrationNumber = $registrationNumber; 88 | return $this; 89 | } 90 | 91 | /** 92 | * @return DateTimeInterface 93 | */ 94 | public function getRegistrationAt(): DateTimeInterface 95 | { 96 | return $this->registrationAt; 97 | } 98 | 99 | /** 100 | * @param DateTimeInterface $registrationAt 101 | * @return Registration 102 | */ 103 | public function setRegistrationAt(DateTimeInterface $registrationAt): Registration 104 | { 105 | $this->registrationAt = $registrationAt; 106 | return $this; 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "c1f1809cce995fd43599b0b99c3f7a8e", 8 | "packages": [ 9 | { 10 | "name": "dompdf/dompdf", 11 | "version": "v1.0.2", 12 | "source": { 13 | "type": "git", 14 | "url": "https://github.com/dompdf/dompdf.git", 15 | "reference": "8768448244967a46d6e67b891d30878e0e15d25c" 16 | }, 17 | "dist": { 18 | "type": "zip", 19 | "url": "https://api.github.com/repos/dompdf/dompdf/zipball/8768448244967a46d6e67b891d30878e0e15d25c", 20 | "reference": "8768448244967a46d6e67b891d30878e0e15d25c", 21 | "shasum": "" 22 | }, 23 | "require": { 24 | "ext-dom": "*", 25 | "ext-mbstring": "*", 26 | "phenx/php-font-lib": "^0.5.2", 27 | "phenx/php-svg-lib": "^0.3.3", 28 | "php": "^7.1 || ^8.0" 29 | }, 30 | "require-dev": { 31 | "mockery/mockery": "^1.3", 32 | "phpunit/phpunit": "^7.5 || ^8 || ^9", 33 | "squizlabs/php_codesniffer": "^3.5" 34 | }, 35 | "suggest": { 36 | "ext-gd": "Needed to process images", 37 | "ext-gmagick": "Improves image processing performance", 38 | "ext-imagick": "Improves image processing performance", 39 | "ext-zlib": "Needed for pdf stream compression" 40 | }, 41 | "type": "library", 42 | "extra": { 43 | "branch-alias": { 44 | "dev-develop": "0.7-dev" 45 | } 46 | }, 47 | "autoload": { 48 | "psr-4": { 49 | "Dompdf\\": "src/" 50 | }, 51 | "classmap": [ 52 | "lib/" 53 | ] 54 | }, 55 | "notification-url": "https://packagist.org/downloads/", 56 | "license": [ 57 | "LGPL-2.1" 58 | ], 59 | "authors": [ 60 | { 61 | "name": "Fabien Ménager", 62 | "email": "fabien.menager@gmail.com" 63 | }, 64 | { 65 | "name": "Brian Sweeney", 66 | "email": "eclecticgeek@gmail.com" 67 | }, 68 | { 69 | "name": "Gabriel Bull", 70 | "email": "me@gabrielbull.com" 71 | } 72 | ], 73 | "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter", 74 | "homepage": "https://github.com/dompdf/dompdf", 75 | "support": { 76 | "issues": "https://github.com/dompdf/dompdf/issues", 77 | "source": "https://github.com/dompdf/dompdf/tree/v1.0.2" 78 | }, 79 | "time": "2021-01-08T14:18:52+00:00" 80 | }, 81 | { 82 | "name": "guzzlehttp/psr7", 83 | "version": "1.8.1", 84 | "source": { 85 | "type": "git", 86 | "url": "https://github.com/guzzle/psr7.git", 87 | "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1" 88 | }, 89 | "dist": { 90 | "type": "zip", 91 | "url": "https://api.github.com/repos/guzzle/psr7/zipball/35ea11d335fd638b5882ff1725228b3d35496ab1", 92 | "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1", 93 | "shasum": "" 94 | }, 95 | "require": { 96 | "php": ">=5.4.0", 97 | "psr/http-message": "~1.0", 98 | "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" 99 | }, 100 | "provide": { 101 | "psr/http-message-implementation": "1.0" 102 | }, 103 | "require-dev": { 104 | "ext-zlib": "*", 105 | "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" 106 | }, 107 | "suggest": { 108 | "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" 109 | }, 110 | "type": "library", 111 | "extra": { 112 | "branch-alias": { 113 | "dev-master": "1.7-dev" 114 | } 115 | }, 116 | "autoload": { 117 | "psr-4": { 118 | "GuzzleHttp\\Psr7\\": "src/" 119 | }, 120 | "files": [ 121 | "src/functions_include.php" 122 | ] 123 | }, 124 | "notification-url": "https://packagist.org/downloads/", 125 | "license": [ 126 | "MIT" 127 | ], 128 | "authors": [ 129 | { 130 | "name": "Michael Dowling", 131 | "email": "mtdowling@gmail.com", 132 | "homepage": "https://github.com/mtdowling" 133 | }, 134 | { 135 | "name": "Tobias Schultze", 136 | "homepage": "https://github.com/Tobion" 137 | } 138 | ], 139 | "description": "PSR-7 message implementation that also provides common utility methods", 140 | "keywords": [ 141 | "http", 142 | "message", 143 | "psr-7", 144 | "request", 145 | "response", 146 | "stream", 147 | "uri", 148 | "url" 149 | ], 150 | "support": { 151 | "issues": "https://github.com/guzzle/psr7/issues", 152 | "source": "https://github.com/guzzle/psr7/tree/1.8.1" 153 | }, 154 | "time": "2021-03-21T16:25:00+00:00" 155 | }, 156 | { 157 | "name": "phenx/php-font-lib", 158 | "version": "0.5.2", 159 | "source": { 160 | "type": "git", 161 | "url": "https://github.com/PhenX/php-font-lib.git", 162 | "reference": "ca6ad461f032145fff5971b5985e5af9e7fa88d8" 163 | }, 164 | "dist": { 165 | "type": "zip", 166 | "url": "https://api.github.com/repos/PhenX/php-font-lib/zipball/ca6ad461f032145fff5971b5985e5af9e7fa88d8", 167 | "reference": "ca6ad461f032145fff5971b5985e5af9e7fa88d8", 168 | "shasum": "" 169 | }, 170 | "require-dev": { 171 | "phpunit/phpunit": "^4.8.35 || ^5 || ^6 || ^7" 172 | }, 173 | "type": "library", 174 | "autoload": { 175 | "psr-4": { 176 | "FontLib\\": "src/FontLib" 177 | } 178 | }, 179 | "notification-url": "https://packagist.org/downloads/", 180 | "license": [ 181 | "LGPL-3.0" 182 | ], 183 | "authors": [ 184 | { 185 | "name": "Fabien Ménager", 186 | "email": "fabien.menager@gmail.com" 187 | } 188 | ], 189 | "description": "A library to read, parse, export and make subsets of different types of font files.", 190 | "homepage": "https://github.com/PhenX/php-font-lib", 191 | "support": { 192 | "issues": "https://github.com/PhenX/php-font-lib/issues", 193 | "source": "https://github.com/PhenX/php-font-lib/tree/0.5.2" 194 | }, 195 | "time": "2020-03-08T15:31:32+00:00" 196 | }, 197 | { 198 | "name": "phenx/php-svg-lib", 199 | "version": "v0.3.3", 200 | "source": { 201 | "type": "git", 202 | "url": "https://github.com/PhenX/php-svg-lib.git", 203 | "reference": "5fa61b65e612ce1ae15f69b3d223cb14ecc60e32" 204 | }, 205 | "dist": { 206 | "type": "zip", 207 | "url": "https://api.github.com/repos/PhenX/php-svg-lib/zipball/5fa61b65e612ce1ae15f69b3d223cb14ecc60e32", 208 | "reference": "5fa61b65e612ce1ae15f69b3d223cb14ecc60e32", 209 | "shasum": "" 210 | }, 211 | "require": { 212 | "sabberworm/php-css-parser": "^8.3" 213 | }, 214 | "require-dev": { 215 | "phpunit/phpunit": "^5.5|^6.5" 216 | }, 217 | "type": "library", 218 | "autoload": { 219 | "psr-4": { 220 | "Svg\\": "src/Svg" 221 | } 222 | }, 223 | "notification-url": "https://packagist.org/downloads/", 224 | "license": [ 225 | "LGPL-3.0" 226 | ], 227 | "authors": [ 228 | { 229 | "name": "Fabien Ménager", 230 | "email": "fabien.menager@gmail.com" 231 | } 232 | ], 233 | "description": "A library to read, parse and export to PDF SVG files.", 234 | "homepage": "https://github.com/PhenX/php-svg-lib", 235 | "support": { 236 | "issues": "https://github.com/PhenX/php-svg-lib/issues", 237 | "source": "https://github.com/PhenX/php-svg-lib/tree/master" 238 | }, 239 | "time": "2019-09-11T20:02:13+00:00" 240 | }, 241 | { 242 | "name": "psr/http-message", 243 | "version": "1.0.1", 244 | "source": { 245 | "type": "git", 246 | "url": "https://github.com/php-fig/http-message.git", 247 | "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" 248 | }, 249 | "dist": { 250 | "type": "zip", 251 | "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", 252 | "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", 253 | "shasum": "" 254 | }, 255 | "require": { 256 | "php": ">=5.3.0" 257 | }, 258 | "type": "library", 259 | "extra": { 260 | "branch-alias": { 261 | "dev-master": "1.0.x-dev" 262 | } 263 | }, 264 | "autoload": { 265 | "psr-4": { 266 | "Psr\\Http\\Message\\": "src/" 267 | } 268 | }, 269 | "notification-url": "https://packagist.org/downloads/", 270 | "license": [ 271 | "MIT" 272 | ], 273 | "authors": [ 274 | { 275 | "name": "PHP-FIG", 276 | "homepage": "http://www.php-fig.org/" 277 | } 278 | ], 279 | "description": "Common interface for HTTP messages", 280 | "homepage": "https://github.com/php-fig/http-message", 281 | "keywords": [ 282 | "http", 283 | "http-message", 284 | "psr", 285 | "psr-7", 286 | "request", 287 | "response" 288 | ], 289 | "support": { 290 | "source": "https://github.com/php-fig/http-message/tree/master" 291 | }, 292 | "time": "2016-08-06T14:39:51+00:00" 293 | }, 294 | { 295 | "name": "ralouphie/getallheaders", 296 | "version": "3.0.3", 297 | "source": { 298 | "type": "git", 299 | "url": "https://github.com/ralouphie/getallheaders.git", 300 | "reference": "120b605dfeb996808c31b6477290a714d356e822" 301 | }, 302 | "dist": { 303 | "type": "zip", 304 | "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", 305 | "reference": "120b605dfeb996808c31b6477290a714d356e822", 306 | "shasum": "" 307 | }, 308 | "require": { 309 | "php": ">=5.6" 310 | }, 311 | "require-dev": { 312 | "php-coveralls/php-coveralls": "^2.1", 313 | "phpunit/phpunit": "^5 || ^6.5" 314 | }, 315 | "type": "library", 316 | "autoload": { 317 | "files": [ 318 | "src/getallheaders.php" 319 | ] 320 | }, 321 | "notification-url": "https://packagist.org/downloads/", 322 | "license": [ 323 | "MIT" 324 | ], 325 | "authors": [ 326 | { 327 | "name": "Ralph Khattar", 328 | "email": "ralph.khattar@gmail.com" 329 | } 330 | ], 331 | "description": "A polyfill for getallheaders.", 332 | "support": { 333 | "issues": "https://github.com/ralouphie/getallheaders/issues", 334 | "source": "https://github.com/ralouphie/getallheaders/tree/develop" 335 | }, 336 | "time": "2019-03-08T08:55:37+00:00" 337 | }, 338 | { 339 | "name": "sabberworm/php-css-parser", 340 | "version": "8.3.1", 341 | "source": { 342 | "type": "git", 343 | "url": "https://github.com/sabberworm/PHP-CSS-Parser.git", 344 | "reference": "d217848e1396ef962fb1997cf3e2421acba7f796" 345 | }, 346 | "dist": { 347 | "type": "zip", 348 | "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/d217848e1396ef962fb1997cf3e2421acba7f796", 349 | "reference": "d217848e1396ef962fb1997cf3e2421acba7f796", 350 | "shasum": "" 351 | }, 352 | "require": { 353 | "php": ">=5.3.2" 354 | }, 355 | "require-dev": { 356 | "codacy/coverage": "^1.4", 357 | "phpunit/phpunit": "~4.8" 358 | }, 359 | "type": "library", 360 | "autoload": { 361 | "psr-0": { 362 | "Sabberworm\\CSS": "lib/" 363 | } 364 | }, 365 | "notification-url": "https://packagist.org/downloads/", 366 | "license": [ 367 | "MIT" 368 | ], 369 | "authors": [ 370 | { 371 | "name": "Raphael Schweikert" 372 | } 373 | ], 374 | "description": "Parser for CSS Files written in PHP", 375 | "homepage": "http://www.sabberworm.com/blog/2010/6/10/php-css-parser", 376 | "keywords": [ 377 | "css", 378 | "parser", 379 | "stylesheet" 380 | ], 381 | "support": { 382 | "issues": "https://github.com/sabberworm/PHP-CSS-Parser/issues", 383 | "source": "https://github.com/sabberworm/PHP-CSS-Parser/tree/8.3.1" 384 | }, 385 | "time": "2020-06-01T09:10:00+00:00" 386 | }, 387 | { 388 | "name": "spipu/html2pdf", 389 | "version": "v4.6.1", 390 | "source": { 391 | "type": "git", 392 | "url": "https://github.com/spipu/html2pdf.git", 393 | "reference": "4898439e170ebf032513b8d3a83f0f5ffe85fece" 394 | }, 395 | "dist": { 396 | "type": "zip", 397 | "url": "https://api.github.com/repos/spipu/html2pdf/zipball/4898439e170ebf032513b8d3a83f0f5ffe85fece", 398 | "reference": "4898439e170ebf032513b8d3a83f0f5ffe85fece", 399 | "shasum": "" 400 | }, 401 | "require": { 402 | "php": ">=5.3.2", 403 | "tecnickcom/tcpdf": "~6.2.0" 404 | }, 405 | "suggest": { 406 | "ext-gd": "Allows to embed images into the PDF", 407 | "fagundes/zff-html2pdf": "zff-html2pdf module ~0.1.1, if you need to integrate HTML2PDF with Zend Framework 2 (zf2)" 408 | }, 409 | "type": "library", 410 | "autoload": { 411 | "files": [ 412 | "html2pdf.class.php", 413 | "_class/exception.class.php", 414 | "_class/locale.class.php", 415 | "_class/myPdf.class.php", 416 | "_class/parsingHtml.class.php", 417 | "_class/parsingCss.class.php" 418 | ] 419 | }, 420 | "notification-url": "https://packagist.org/downloads/", 421 | "license": [ 422 | "LGPL" 423 | ], 424 | "authors": [ 425 | { 426 | "name": "Spipu", 427 | "homepage": "https://github.com/spipu", 428 | "role": "Developer" 429 | } 430 | ], 431 | "description": "HTML2PDF is a HTML to PDF converter written in PHP5 (it uses TCPDF). OFFICIAL PACKAGE", 432 | "homepage": "http://html2pdf.fr/", 433 | "keywords": [ 434 | "html", 435 | "html2pdf", 436 | "pdf" 437 | ], 438 | "support": { 439 | "issues": "https://github.com/spipu/html2pdf/issues", 440 | "source": "https://github.com/spipu/html2pdf/tree/4.6" 441 | }, 442 | "time": "2016-04-05T12:25:17+00:00" 443 | }, 444 | { 445 | "name": "tecnickcom/tcpdf", 446 | "version": "6.2.26", 447 | "source": { 448 | "type": "git", 449 | "url": "https://github.com/tecnickcom/TCPDF.git", 450 | "reference": "367241059ca166e3a76490f4448c284e0a161f15" 451 | }, 452 | "dist": { 453 | "type": "zip", 454 | "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/367241059ca166e3a76490f4448c284e0a161f15", 455 | "reference": "367241059ca166e3a76490f4448c284e0a161f15", 456 | "shasum": "" 457 | }, 458 | "require": { 459 | "php": ">=5.3.0" 460 | }, 461 | "type": "library", 462 | "autoload": { 463 | "classmap": [ 464 | "config", 465 | "include", 466 | "tcpdf.php", 467 | "tcpdf_parser.php", 468 | "tcpdf_import.php", 469 | "tcpdf_barcodes_1d.php", 470 | "tcpdf_barcodes_2d.php", 471 | "include/tcpdf_colors.php", 472 | "include/tcpdf_filters.php", 473 | "include/tcpdf_font_data.php", 474 | "include/tcpdf_fonts.php", 475 | "include/tcpdf_images.php", 476 | "include/tcpdf_static.php", 477 | "include/barcodes/datamatrix.php", 478 | "include/barcodes/pdf417.php", 479 | "include/barcodes/qrcode.php" 480 | ] 481 | }, 482 | "notification-url": "https://packagist.org/downloads/", 483 | "license": [ 484 | "LGPL-3.0" 485 | ], 486 | "authors": [ 487 | { 488 | "name": "Nicola Asuni", 489 | "email": "info@tecnick.com", 490 | "role": "lead" 491 | } 492 | ], 493 | "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", 494 | "homepage": "http://www.tcpdf.org/", 495 | "keywords": [ 496 | "PDFD32000-2008", 497 | "TCPDF", 498 | "barcodes", 499 | "datamatrix", 500 | "pdf", 501 | "pdf417", 502 | "qrcode" 503 | ], 504 | "support": { 505 | "source": "https://github.com/tecnickcom/TCPDF/tree/master" 506 | }, 507 | "time": "2018-10-16T17:24:05+00:00" 508 | } 509 | ], 510 | "packages-dev": [], 511 | "aliases": [], 512 | "minimum-stability": "stable", 513 | "stability-flags": [], 514 | "prefer-stable": false, 515 | "prefer-lowest": false, 516 | "platform": { 517 | "php": ">=7.4", 518 | "ext-pdo": "*", 519 | "ext-json": "*" 520 | }, 521 | "platform-dev": [], 522 | "plugin-api-version": "2.0.0" 523 | } 524 | --------------------------------------------------------------------------------