-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvendor.php.stub
96 lines (84 loc) · 2.49 KB
/
vendor.php.stub
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?php
namespace App\Services\FluxIcons\Vendors;
use Ympact\FluxIcons\Types\SvgPath;
use Illuminate\Support\Collection;
use Ympact\FluxIcons\Types\Icon;
class VendorName{
/**
* Adjust the icon name
* @param Icon $icon
*/
public static function name(Icon $icon): Collection
{
$name = $icon->getBaseName();
// Your transformation logic here
return $name;
}
/**
* Transform SVG Paths of the icon
* @param Collection<SvgPath> $svgPaths
* @param Icon $icon
*/
public static function transform(Collection $svgPaths, Icon $icon): Collection
{
// Your transformation logic here
return $svgPaths;
}
/**
* Adjust the SVG attributes of the icon
* @param \Ympact\FluxIcons\Types\Icon $icon
* @return array
*/
public static function attributes(Icon $icon)
{
// Your attributes logic here
$attributes = [];
return $attributes;
}
/**
* Adjust the stroke width of the icon
* @param Icon $icon base name of the icon
* @return int|float
*/
public static function strokeWidth (Icon $icon): int|float
{
// logic to determine stroke width
$strokeWidth = $icon->getStrokeWidth();
return $strokeWidth;
}
/**
* Determine the correct prefix for the variant icon
* @param string $variant the variant of the source icon (outline, solid, mini, micro)
* @return string
*/
public static function prefix(string $variant = null): string
{
// your logic here
$prefix = 's-';
return $prefix;
}
/**
* Determine the correct suffix for the variant icon
* @param string $variant the variant of the source icon (outline, solid, mini, micro)
* @return string
*/
public static function suffix(string $variant = null): string
{
// your logic here
$suffix = '-solid';
return $suffix;
}
/**
* A filter callback to determine if a file should be processed as icon for the current variant.
* Optionally this callback can adjust the $icons array.
* @param string $file
* @param array|null $icons that are requested to be build
* @param string $variant the variant of the source icon (outline, solid, mini, micro)
* @return boolean
*/
public static function filter(string $file, array|null &$icons, string $variant): bool
{
// your logic here
return true;
}
}