# imagify/1.10/vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php

Imagify Image Optimization: Optimize Images | Compress &amp; Convert to WebP/AVIF, version 1.10. 25 lines.

- Page: https://pluginprobe.com/plugins/imagify/1.10/code/vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php
- Raw: https://pluginprobe.com/plugins/imagify/1.10/raw/vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php
- Modified: 2019-05-06T14:27:06+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/imagify/1.10/code/vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php#L10-L20`.

```php
<?php
namespace Composer\Installers;

class OntoWikiInstaller extends BaseInstaller
{
    protected $locations = array(
        'extension' => 'extensions/{$name}/',
        'theme' => 'extensions/themes/{$name}/',
        'translation' => 'extensions/translations/{$name}/',
    );

    /**
     * Format package name to lower case and remove ".ontowiki" suffix
     */
    public function inflectPackageVars($vars)
    {
        $vars['name'] = strtolower($vars['name']);
        $vars['name'] = preg_replace('/.ontowiki$/', '', $vars['name']);
        $vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
        $vars['name'] = preg_replace('/-translation$/', '', $vars['name']);

        return $vars;
    }
}

```
