Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sanmai/parsed-url
Object-oriented interface to parse_url/parse_str
https://github.com/sanmai/parsed-url
Last synced: 21 days ago
JSON representation
Object-oriented interface to parse_url/parse_str
- Host: GitHub
- URL: https://github.com/sanmai/parsed-url
- Owner: sanmai
- License: mit
- Created: 2020-02-03T02:58:24.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-02-17T10:25:22.000Z (10 months ago)
- Last Synced: 2024-11-15T22:27:40.591Z (about 1 month ago)
- Language: PHP
- Homepage:
- Size: 55.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[![Latest Stable Version](https://poser.pugx.org/sanmai/parsed-url/v/stable)](https://packagist.org/packages/sanmai/parsed-url)
[![Coverage Status](https://coveralls.io/repos/github/sanmai/parsed-url/badge.svg?branch=master)](https://coveralls.io/github/sanmai/parsed-url?branch=master)# Install
composer require sanmai/parsed-url
# Use
```php
$url = new \ParsedUrl\ParsedUrl('https://www.example.com/index.html?foo=bar&baz=1');var_dump($url->scheme); // string(5) "https"
var_dump($url->host); // string(15) "www.example.com"
var_dump($url->path); // "/index.html"
var_dump($url->query); // string(13) "foo=bar&baz=1"
var_dump($url->query()->foo); // string(3) "bar"
```