Download the PHP package meklis/switcher-core without Composer

On this page you can find all versions of the php package meklis/switcher-core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package switcher-core

Switcher-Core

PHP library providing a single, vendor-agnostic interface for network equipment: switches, OLTs, and routers.

Русская версия

Overview

Switcher-Core abstracts away vendor-specific protocols and command sets behind one API. Instead of writing a wrapper for every vendor, you call a named module (e.g. system, fdb, vlans) against a Device, and the library:

  1. Detects the device model from SNMP sysDescr / sysObjectID (or an explicit model key).
  2. Loads the matching YAML configuration (OIDs, module bindings) for that model.
  3. Dispatches the call to the vendor-specific module implementation, or a shared/general one when no vendor-specific implementation exists.

The set of modules supported by a given device, and the exact shape of the response, depend on the device's capabilities and vendor. This is a deliberate trade-off: a single strict schema across all vendors is not achievable for heterogeneous network hardware. See the field naming convention below for how the library keeps responses as consistent as practical.

If your equipment is not in the supported list, implement the module classes and configuration described in Module Development and contribute it, or maintain it in a fork.

Supported transports

Supported vendors

Requirements

Installation

Quick start

Example output of the system module (exact fields vary by vendor):

Response field convention

Some modules (e.g. fdb, pon_onts_status) are implemented differently across vendors and platforms, so their output cannot be perfectly uniform. The library follows one rule consistently:

Interface objects (interface / interfaces) follow their own, already-established convention: id, name, type, parent are common; _port, _slot, _onu, _snmp_id, _technology, _type, etc. are platform-specific.

See Module Development for details and examples.

Repository layout

Path Purpose
src/Switcher/ Core, connectors, Device, console wrappers, cache.
src/Config/ YAML readers and collectors for models, OIDs, modules, traps.
src/Modules/ Module implementations, one namespace per vendor/platform.
configs/modules.yml Registry of all modules and their arguments.
configs/models/ Device model definitions: detection rules and module bindings.
configs/oids/ SNMP OID databases, grouped by vendor/platform.
configs/traps/ SNMP trap configuration.
docs/ Generated device/module documentation and examples.
src/Dev/, bin/console Local development console for calling modules and inspecting support.
tests/ Automated tests. Coverage is currently limited to config consistency checks, not real-device behavior.

Developing and extending modules

Adding support for a new device model, or a new module, is a configuration-plus-code task: OID files, a model definition, and (when no existing module fits) a PHP class. This is documented in full in Module Development.

Testing

This runs the PHPUnit suite (tests/), which currently checks configuration consistency (OIDs, models, modules). It does not verify behavior against real hardware — automated tests here are not a substitute for testing against an actual device. See Module Development for how to do that with bin/console.

Used in

wildcore.tools

License

MIT


All versions of switcher-core with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.0
meklis/snmp-wrapper Version dev-master
meklis/routeros-api Version dev-master
meklis/console-client Version dev-master
meklis/ipv4-subnet-calculator Version 3.*
meklis/php-duration Version ^1.2
php-di/php-di Version ^6.1
composer/package-versions-deprecated Version 1.x-dev
ocramius/proxy-manager Version ^2.2
doctrine/annotations Version 1.11.x-dev
ext-yaml Version *
monolog/monolog Version 2.x-dev
ext-json Version *
phpseclib/phpseclib Version ~3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package meklis/switcher-core contains the following files

Loading the files please wait ...