Download the PHP package nervsys/ns without Composer

On this page you can find all versions of the php package nervsys/ns. 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 ns

Nervsys

README: 简体中文

release issues contributors last-commit license

About Nervsys

Installation

  1. Clone or download source code to anywhere on your machine. Only one copy is required on the same machine even multiple projects exist.
  2. Include "NS.php" in the main entry script of the project, and call it with using "NS::new();".
  3. If needed, using "trait System" to register your own modules and functions before calling "NS::new();".
  4. Write your API code classes under "/api", application code classes under "/app", if not changed, and there you go.
  5. In "/Ext", there are common useful extensions for normal project development, so, please do review them when coding. They can be helpful.

Usage

All demo usage is under default system settings.

1. Suggested project structure

Notice: App root path will be set to the parent directory of the entry php script.

2. NS integration

Follow "Installation" steps to integrate NS into your entry script. Demo code is as follows.

3. Request data format

NS can parse data from both FormData and request Payload via GET or POST.
When data is sending as request Payload, both JSON and XML are supported.
Data fetcher and parser library in NS is "/Core/Lib/IOUnit.php".

In HTTP request, NS fetch and parse data in the following steps:

In CLI mode, NS takes "c" from "-c" parameter, or the first argument if not found. String parameter "-d" will be taken to decode to get CGI data source. "-r" forces output returned data format. Other arguments will be considered as CLI argv.

4. About key "c"

"c" in request data will be taken as request command, and will lead system to go continue.
"c" can be passed in any ways, URL, GET, POST, all is OK, no matter FormData or request Payload.

In CGI mode, normally known as HTTP request, "c" is always redirected to api path for some security reasons, but, CLI mode allows calling from root by adding "/" in the beginning of "c" using full class namespace path.

Valid "c" format should be as follows:

5. Data autofill

Once "c" and data source are taken by system, Router library and Execute library will be woken up to run exact method. Key matched parameters will be taken out of data source, and pass in the right order automatically into target method when calling. Watch out of all data passed to NS, keys are case-sensitive, and data values are type-strict. All returned results will be captured and output.

example:

6. Exposed Core libraries

NS leaves some important core libraries exposed to developers since 8.0 and on.
Thanks to douglas99, all changeable core related APIs are merged into " Ext/libCoreApi.php".
With this, developers can register own libraries instead of default ones, such as custom Router, outputHandler, ApiPath, hook related functions, etc...

Todo

Except functions listed above, NS still has a long way to go.
Thanks for issues & pull requests if you found bugs or make it better, or just need help. Contact us.

Supporters

Thanks to JetBrains for supporting the project, within the Open Source Support Program.

License

This software is licensed under the terms of the Apache 2.0 License.
You can find a copy of the license in the LICENSE.md file.


All versions of ns with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-curl Version *
ext-fileinfo Version *
ext-gd Version *
ext-gettext Version *
ext-libxml Version *
ext-json Version *
ext-openssl Version *
ext-pdo Version *
ext-redis Version *
ext-simplexml Version *
ext-mbstring Version *
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 nervsys/ns contains the following files

Loading the files please wait ....