projector22/php-svg-tool 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

projector22/php-svg-tool

最新稳定版本:1.0.0

Composer 安装命令:

composer require projector22/php-svg-tool

包简介

A tool for handling SVG files with PHP

README 文档

README

A simple PHP tool to perform basic functions on SVG files.

At Present

This tool takes the input of an <svg></svg> markup, either from a .svg file or just typed in. It then allows you to set or change custom attributes on the <svg></svg> as desired.

Currently only the <svg> tag can be manipulated, as the inner markup is beyond the current need.

Build

This tool was built on PHP 8.1 - backwards compatibility to PHP 8.0 should be fine, but this tool should be incompatable with PHP 7.x and below as it uses a number of features introduced in PHP 8.0.

Example

<?php

$svg = new SVG( file_get_contents( 'path/to/file.svg' ) );
$svg->set_id( 'myId' )
    ->set_size( 150, 150 )
    ->add_to_classlist( 'myClass' )
    ->set_stroke( 'red' )
    ->echo();

echo $svg->return();

The above code will render the SVG image twice.

统计信息

  • 总下载量: 112
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: mit
  • 更新时间: 2022-06-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固