PHPackages                             vairogs/functions-local - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. vairogs/functions-local

Abandoned → [valksor/php-functions-local](/?search=valksor%2Fphp-functions-local)Library[Utility &amp; Helpers](/categories/utility)

vairogs/functions-local
=======================

A PHP library providing utility functions for working with the local filesystem, environment variables, system resources, and more

00PHP

Since Apr 16Pushed 11mo agoCompare

[ Source](https://github.com/vairogs/functions-local)[ Packagist](https://packagist.org/packages/vairogs/functions-local)[ RSS](/packages/vairogs-functions-local/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Vairogs Functions: Local
========================

[](#vairogs-functions-local)

A PHP library providing utility functions for working with the local filesystem, environment variables, system resources, and more.

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require vairogs/functions-local
```

Requirements
------------

[](#requirements)

PHP 8.4 or higher

Usage
-----

[](#usage)

There are two ways to use this package: via the Functions class or by directly using the traits.

### Using the Functions Class

[](#using-the-functions-class)

The Functions class provides utility functions for working with the local filesystem, environment variables, system resources, and more.

```
use Vairogs\Functions\Local\Functions;

// Create a new Functions instance
$local = new Functions();

// Check if a file exists in the current working directory
$exists = $local->fileExistsCwd('filename.txt');

// Create a directory
$created = $local->mkdir('/path/to/directory');

// Get an environment variable
$value = $local->getenv('VARIABLE_NAME');

// Format a file size in a human-readable way
$size = $local->humanFileSize(1024 * 1024); // "1.00M"

// Check if PHP extensions or Composer packages are installed
$installed = $local->isInstalled(['package1', 'package2']);

// Check if a class from a package will be available at runtime
$available = $local->willBeAvailable('package-name', 'Namespace\\ClassName', ['parent-package']);

// Get the cURL user agent string
$userAgent = $local->getCurlUserAgent();
```

### Using Traits Directly

[](#using-traits-directly)

Alternatively, you can use the traits directly in your own classes:

```
use Vairogs\Functions\Local\Traits\_FileExistsCwd;
use Vairogs\Functions\Local\Traits\_MkDir;
use Vairogs\Functions\Local\Traits\_GetEnv;

class MyClass
{
    // Import the traits you need
    use _FileExistsCwd;
    use _MkDir;
    use _GetEnv;

    public function doSomething(): void
    {
        // Use the methods directly
        $exists = $this->fileExistsCwd('filename.txt');
        $created = $this->mkdir('/path/to/directory');
        $value = $this->getenv('VARIABLE_NAME');
    }
}
```

Features
--------

[](#features)

For a complete list of all functions available in this package, see [Features](docs/features.md).

License
-------

[](#license)

This package is licensed under the [BSD-3-Clause License](LICENSE).

About Vairogs
-------------

[](#about-vairogs)

This package is part of the [vairogs/vairogs](https://github.com/vairogs/vairogs) project - a comprehensive PHP library and Symfony bundle that provides a collection of utilities, components, and integrations for Symfony applications.

The main project includes:

- Various utility functions and components
- Doctrine ORM tools and extensions
- API Platform integrations
- Symfony bundle for easy configuration
- And much more

If you find this Local component useful, you might want to check out the full Vairogs project for additional tools and utilities that can enhance your Symfony application development.

To install the complete package:

```
composer require vairogs/vairogs
```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c4db85e32518c5a6caa2fd625032a2b016ef42d60cf8a101c165cc5c0048b221?d=identicon)[k0d3r1s](/maintainers/k0d3r1s)

---

Top Contributors

[![k0d3r1s](https://avatars.githubusercontent.com/u/38725938?v=4)](https://github.com/k0d3r1s "k0d3r1s (3 commits)")

### Embed Badge

![Health badge](/badges/vairogs-functions-local/health.svg)

```
[![Health](https://phpackages.com/badges/vairogs-functions-local/health.svg)](https://phpackages.com/packages/vairogs-functions-local)
```

###  Alternatives

[davmixcool/laravel-meta-manager

Laravel Meta Manager is an SEO tool that is used to improve SEO of a website or specific page by adding recommended meta tags to your application.

15040.8k1](/packages/davmixcool-laravel-meta-manager)[michaldudek/foundation

A set of useful PHP classes.

13111.9k13](/packages/michaldudek-foundation)[thunder/thunder-project

Project template for Thunder projects with composer

1039.4k](/packages/thunder-thunder-project)[codefog/contao-instagram

Instagram bundle for Contao Open Source CMS

167.5k](/packages/codefog-contao-instagram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
