mirror of
https://github.com/letrunghieu/favicon.git
synced 2025-01-16 20:28:20 +01:00
Support functional helper
This commit is contained in:
parent
0f5d5d57f1
commit
1330846d1d
@ -22,18 +22,19 @@
|
||||
"symfony/console": "~2.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-imagick": "To use the binary and generate favicon images"
|
||||
},
|
||||
"ext-imagick": "To use the binary and generate favicon images"
|
||||
},
|
||||
"bin": [
|
||||
"favicon"
|
||||
],
|
||||
"favicon"
|
||||
],
|
||||
"config": {
|
||||
"bin-dir": "bin"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"HieuLe\\Favicon\\": "src/"
|
||||
}
|
||||
},
|
||||
"files": ["src/helpers.php"]
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
|
12
src/Html.php
12
src/Html.php
@ -10,6 +10,18 @@ namespace HieuLe\Favicon;
|
||||
class Html
|
||||
{
|
||||
|
||||
/**
|
||||
* Write meta and link tags
|
||||
*
|
||||
* @param bool $noOldApple exclude old apple touch link
|
||||
* @param bool $noAndroid exclude android manifest.json file
|
||||
* @param bool $noMs exclude msapplication meta tags
|
||||
* @param tring $tileColor the color of Windows tile
|
||||
* @param string $browserConfigFile the path to browserconfig.xml file or null to disable this
|
||||
* @param string $appName the name of application when pinned
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function output($noOldApple = false, $noAndroid = false, $noMs = false, $tileColor = '#FFF', $browserConfigFile = '', $appName = '')
|
||||
{
|
||||
$result = array();
|
||||
|
24
src/helpers.php
Normal file
24
src/helpers.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
if (!function_exists('favicon'))
|
||||
{
|
||||
|
||||
/**
|
||||
* Write meta and link tags
|
||||
*
|
||||
* @param bool $noOldApple exclude old apple touch link
|
||||
* @param bool $noAndroid exclude android manifest.json file
|
||||
* @param bool $noMs exclude msapplication meta tags
|
||||
* @param tring $tileColor the color of Windows tile
|
||||
* @param string $browserConfigFile the path to browserconfig.xml file or null to disable this
|
||||
* @param string $appName the name of application when pinned
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function favicon($noOldApple = false, $noAndroid = false, $noMs = false, $tileColor = '#FFF', $browserConfigFile = '', $appName = '')
|
||||
{
|
||||
return HieuLe\Favicon\Html::output($noOldApple, $noAndroid, $noMs, $tileColor, $browserConfigFile, $appName);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user