quorum/dot-notation

Simple PHP Dot Notation Parser

v1.0.0 2020-12-22 00:16 UTC

This package is auto-updated.

Last update: 2024-04-27 18:14:54 UTC


README

Latest Stable Version Total Downloads License Build Status

DotNotationParser is a simple parser that will parse foo.bar.baz into [ 'foo', 'bar', 'baz' ] and foo."bar.baz" into [ 'foo', 'bar.baz' ].

Requirements

  • php: >=7.1

Installing

Install the latest version with:

composer require 'quorum/dot-notation'

Documentation

Class: \Quorum\DotNotation\DotNotationParser

Class DotPathParser

Parse strings like foo."bar.baz".quux into [ 'foo', 'bar.baz', 'quux' ]

Method: DotNotationParser->parse

function parse(string $path) : array

Parse a given dot notation path into it's parts

Returns:
  • string[]