<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
venture-oak-labs / favicon-generator-bundle example snippets
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new VentureOakLabs\FaviconGeneratorBundle\VentureOakLabsFaviconGeneratorBundle(),
// ...
);
}
// The bundle provides a service to generate the favicons package based on a set of options.
$generator = $this->container->get('venture_oak_labs.favicon_generator.generator');
// Options
$options = array(
'general' => array(
'src' => # Required ( URL For image or image content encoded in Base64),
'icons_path' => # Defaults to 'root'
),
'design' => array(
'desktop_browser', # By default provides Design for the classic desktop browsers. Configure the other as you like!
'ios',
'windows',
'firefox_app',
'android_chrome',
'coast',
'yandex_browser'
),
'settings' => array(
'compression',
'scaling_algorithm',
'error_on_image_too_small'
)
);
$response = $generator->generate($options)
// The generated files have an available limit time. You can download and unpack them.
$response->downloadAndUnpack($outputDirectory, $directoryName) # Directory Name defaults to 'favicon_package'
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.