PHPackages                             networq/networq - 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. networq/networq

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

networq/networq
===============

Networq library

v1.8.0(7y ago)454[1 issues](https://github.com/networq/networq-php/issues)MITPHPPHP &gt;=7.1

Since Jun 23Pushed 7y ago1 watchersCompare

[ Source](https://github.com/networq/networq-php)[ Packagist](https://packagist.org/packages/networq/networq)[ Docs](http://www.github.com/networq/networq-php)[ RSS](/packages/networq-networq/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (8)Versions (14)Used By (0)

Networq PHP Library
===================

[](#networq-php-library)

[![CircleCI](https://camo.githubusercontent.com/22c684009b298d9b4085b6102a9d8d57de6be140cee2b39a1a0a97a7f4ad618e/68747470733a2f2f636972636c6563692e636f6d2f67682f6e6574776f72712f6e6574776f72712d7068702e7376673f7374796c653d737667)](https://circleci.com/gh/networq/networq-php)

This is a PHP library for [Networq](https://github.com/networq).

It allows you to load Networq graphs, including it's dependencies, types and nodes.

Once the graph is loaded, you can query it and iterate through it's data.

Terms:
------

[](#terms)

### Node:

[](#node)

All data in Networq is a "Node". A node has a name (i.e. `mario`). Every node is part of a package (i.e. `acme:example`). The node name and the package name combined give a Fully Qualified Node Name (FQNN) (i.e. `acme:example:mario`).

Other than the name/fqnn, a node doesn't have any properties of it's own. A Node can be tagged with one or more Types, which give the node it's available properties. For example, tagging the `acme:example:mario` node with the `acme:example:character` type allows you to specify the `debut` field for Mario, linking it to the game that Mario debuted in.

### Package

[](#package)

A "Package" is a reusable set of Types and Nodes. Packages can be shared and live in their own Git Repository.

A Package defines Types (in the package's `types/` directory) using YAML files.

A Package can optionally define a set of `Nodes`. Nodes in packages are therefor also reusable and lets you share reference data or standardized lists (like countries, operating systems, etc).

A Package can optionally define `Widgets`, which are simple HTML templates (in the `templates/` directory) which get injected into the User Interface when a user is viewing a Node of a given Type.

A Package always has a `package.yaml` file in the root of it's repository. The `package.yaml` file defines the Package's name, description, license etc. And lists an optional set of dependencies: other packages that this package depends on.

### Types

[](#types)

A "Type" defines what properties a Node can have. A type has a name (i.e. `vegetable`) and is part of a package (i.e. `acme:food`). Combining the Type name and Package Name gives you a Fully Qualified Type Name (FQTN) (i.e. `acme:food:vegetable`).

Types are defined by creating `.yaml` files in the `types/` directory of a package. They are automatically loaded when the package is loaded.

Types optionally define a list of Fields for the type. Only nodes tagged with this type will have the listed fields.

A Field can be either a `string` (simple text), or a FQTN. When you specify a FQTN for a Field, you can only assign nodes that are tagged with this type.

A Field can be a single value (default), or a list of values (by appending \[\] to the end of the Field type definition).

### Tags

[](#tags)

A "Tag" is simply the link between a Node and a Type. One Node can contain multiple Tags.

Inspiration / related technology
--------------------------------

[](#inspiration--related-technology)

- [https://en.wikipedia.org/wiki/Multiple\_inheritance](https://en.wikipedia.org/wiki/Multiple_inheritance)
- [https://en.wikipedia.org/wiki/Trait\_(computer\_programming)](https://en.wikipedia.org/wiki/Trait_(computer_programming))
-
- [https://en.wikipedia.org/wiki/Lightweight\_Directory\_Access\_Protocol](https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol)

Getting started
---------------

[](#getting-started)

### Installation

[](#installation)

```
$ git clone https://github.com/networq/networq-php
$ cd networq-php
$ composer install

```

### Examples

[](#examples)

After installation you should be able to run the simple examples in `examples/`

```
$ php example/list-packages.php
Packages: 1
- example:games

$ php example/list-types.php
Types: 5
* example:games:platform
    - manufacturer (string)
* example:games:character
    - debut (example:games:game)
    - games (example:games:game[])
* example:games:game
    - publisher (string)
    - platform (example:games:platform)
    - characters (example:games:character[])
    - urls (example:games:url[])
* example:games:url
    - target (string)
* example:games:base
    - name (string)
    - image (string)
    - description (string)

$ php example/mario.php
example:games:mario
  example:games:base
      name=Mario
      image=https://mario.nintendo.com/assets/img/home/intro/mario-pose2.png
      description=
  example:games:character
      debut=*example:games:smb
      games=[*example:games:smb] [*example:games:dk]
Plays in games: 2
* example:games:smb (Super Mario Bros) Nintendo Entertainment System
* example:games:dk (Donkey Kong) Nintendo Entertainment System

$ php example/nintendo-games.php
Nintendo games: 3
* example:games:smb (Super Mario Bros)
* example:games:dk (Donkey Kong)
* example:games:loz (The Legend of Zelda)

```

Web based viewer
----------------

[](#web-based-viewer)

Please check  for an implementation of a web-based viewer.

Testing
-------

[](#testing)

See `.circleci/config.yml` how to run tests. At the moment: run `./vendor/bin/phpunit --configuration phpunit.xml tests`.

License
-------

[](#license)

MIT. Please refer to the [license file](LICENSE) for details.

Brought to you by the LinkORB Engineering team
----------------------------------------------

[](#brought-to-you-by-the-linkorb-engineering-team)

[![](https://camo.githubusercontent.com/62fb66b034de7ea7fca9fd9776424b5348daa76ef8622caf92c2f7622003e5ef/687474703a2f2f7777772e6c696e6b6f72622e636f6d2f642f6d6574612f74696572312f696d616765732f6c696e6b6f7262656e67696e656572696e672d6c6f676f2e706e67)](https://camo.githubusercontent.com/62fb66b034de7ea7fca9fd9776424b5348daa76ef8622caf92c2f7622003e5ef/687474703a2f2f7777772e6c696e6b6f72622e636f6d2f642f6d6574612f74696572312f696d616765732f6c696e6b6f7262656e67696e656572696e672d6c6f676f2e706e67)
Check out our other projects at [linkorb.com/engineering](http://www.linkorb.com/engineering).

Btw, we're hiring!

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 79.3% 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 ~2 days

Total

12

Last Release

2854d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1db66b320db18b8036ea68211b7d8a39e7c6da97e6fd29f59a50380ebb69d0bb?d=identicon)[joostfaassen](/maintainers/joostfaassen)

---

Top Contributors

[![joostfaassen](https://avatars.githubusercontent.com/u/411113?v=4)](https://github.com/joostfaassen "joostfaassen (46 commits)")[![StephanMeijer](https://avatars.githubusercontent.com/u/3169264?v=4)](https://github.com/StephanMeijer "StephanMeijer (12 commits)")

---

Tags

nodegraphlinkorbnetworq

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/networq-networq/health.svg)

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

###  Alternatives

[novus/nvd3

A reusable charting library written in d3.js

7.2k207.7k2](/packages/novus-nvd3)[graphp/graph

GraPHP is the mathematical graph/network library written in PHP.

711292.6k3](/packages/graphp-graph)[amenadiel/jpgraph

Composer Friendly, full refactor of JpGraph, library to make graphs and charts

1492.2M7](/packages/amenadiel-jpgraph)[fab2s/nodalflow

A PHP Nodal WorkFlow

16362.4k1](/packages/fab2s-nodalflow)[phonetworks/pho-lib-graph

A general purpose graph library in PHP

556.0k1](/packages/phonetworks-pho-lib-graph)[zoon/rialto

Manage Node resources from PHP

12199.4k3](/packages/zoon-rialto)

PHPackages © 2026

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