PHPackages                             baraja-core/url - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. baraja-core/url

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

baraja-core/url
===============

Simple URL manager.

v1.1.5(4y ago)3376.1k2[1 PRs](https://github.com/baraja-core/url/pulls)20MITPHPPHP ^8.0

Since Jan 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/baraja-core/url)[ Packagist](https://packagist.org/packages/baraja-core/url)[ Docs](https://github.com/baraja-core/url)[ RSS](/packages/baraja-core-url/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (17)Used By (20)

Baraja safe URL
===============

[](#baraja-safe-url)

[![Integrity check](https://github.com/baraja-core/url/workflows/Integrity%20check/badge.svg)](https://github.com/baraja-core/url/workflows/Integrity%20check/badge.svg)

Simple manager to get parts of the current URL. URL resolving is done in a secure way.

📦 Installation
--------------

[](#-installation)

It's best to use [Composer](https://getcomposer.org) for installation, and you can also find the package on [Packagist](https://packagist.org/packages/baraja-core/url) and [GitHub](https://github.com/baraja-core/url).

To install, simply use the command:

```
$ composer require baraja-core/url

```

You can use the package manually by creating an instance of the internal classes, or register a DIC extension to link the services directly to the Nette Framework.

How to use
----------

[](#how-to-use)

An easy-to-use library for obtaining and managing current URLs.

You will get the current URL:

```
echo \Baraja\Url\Url::get()->getCurrentUrl();
```

A base URL:

```
echo \Baraja\Url\Url::get()->getBaseUrl();
```

Or relative URL:

```
// return with query parameters (if used)
echo \Baraja\Url\Url::get()->getRelativeUrl();

// return only path
echo \Baraja\Url\Url::get()->getRelativeUrl(false);
```

Nette Url or Script Url can also be obtained for robust work with URL parts:

```
$netteUrl = \Baraja\Url\Url::get()->getNetteUrl();

echo $netteUrl->getDomain();
echo $netteUrl->getPort();
echo $netteUrl->getQuery();
```

And many other getters, [see the documentation](https://github.com/nette/http) for more.

📄 License
---------

[](#-license)

`baraja-core/url` is licensed under the MIT license. See the [LICENSE](https://github.com/baraja-core/url/blob/master/LICENSE) file for more details.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 94.4% 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.

###  Release Activity

Cadence

Every ~24 days

Recently: every ~18 days

Total

12

Last Release

1676d ago

PHP version history (2 changes)v1.0.0PHP &gt;=7.4.0

v1.1.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3382204?v=4)[baraja](/maintainers/baraja)[@baraja](https://github.com/baraja)

---

Top Contributors

[![janbarasek](https://avatars.githubusercontent.com/u/4738758?v=4)](https://github.com/janbarasek "janbarasek (34 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![exussum12](https://avatars.githubusercontent.com/u/1102850?v=4)](https://github.com/exussum12 "exussum12 (1 commits)")

---

Tags

managerparserurlurl-parser

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/baraja-core-url/health.svg)

```
[![Health](https://phpackages.com/badges/baraja-core-url/health.svg)](https://phpackages.com/packages/baraja-core-url)
```

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[hassankhan/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files

97513.5M170](/packages/hassankhan-config)[meyfa/php-svg

Read, edit, write, and render SVG files with PHP

54613.9M42](/packages/meyfa-php-svg)

PHPackages © 2026

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