Files
Cybrarist e3bee2b822 - fix logging error in StoreTemplate.php
- add newegg store
- fix missing stores images
- bump versions

Took 4 hours 59 minutes
2025-03-15 07:51:46 +04:00

30 lines
734 B
PHP

<?php
namespace App\Helpers;
class GeneralHelper
{
public static function get_numbers_only_with_dot($string): array|string|null
{
return preg_replace('/[^0-9.]/', '', $string);
}
public static function get_numbers_only($string): array|string|null
{
return preg_replace('/[^0-9]/', '', $string);
}
public static function get_value_from_meta_tag(array $meta_items, string $key, string $attribute): string
{
foreach ($meta_items as $meta) {
foreach ($meta->attributes() as $value) {
if ($value == $key) {
return $meta->attributes()[$attribute]->__toString();
}
}
}
return "";
}
}