Download the PHP package fuko-php/open without Composer

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

Fuko\Open Latest Version GitHub license

Fuko\Open is a small PHP library that helps you to generate links for opening referenced files directly in your IDE or editor, or have it linked to an online repository.

Basic Use

At the heart of it is all is the \Fuko\Open\Link class, which is really simple: it takes a format to use in its constructor, and then using that format it creates a formatted link to a code reference identified by its file and line:

The format is sprintf()-based, with two placeholders: first one is %s for the file, and the second one is %d for the line. That's it, it's pretty simple.

Translating Paths

There are occasions when leading portions of the filenames must be "translated" to something different, like when:

For all of those cases, the \Fuko\Open\Link objects have the ability to replace leading filename prefixes. You can add a new prefix for translating a file path like this:

You can add multiple prefixes, as usually there is more than one symlinked folder in most projects.

Editor Links

There are several IDEs and editors that support special URL format for local files with the purpose to allow them to open them directly. This feature will only work if you are running your code locally, so that your source code files are accessible to the editor.

To generate such URLs you must use the format associated with that editor:

Once you have created the \Fuko\Open\Link object, you call its link() method to get the generated and formatted URL:

The \Fuko\Open\Link::link() method is also called if you do \Fuko\Open\Link::__invoke(), so you can also just do this:

Editor Sniff

You can sniff what editor is installed locally by using \Fuko\Open\Sniff::detect(). It will either return the editor link format found, or if nothing is found it will return NULL.

The sniffing is done using "sniffer" functions/methods. There are some that are built-in, but you can add your own using \Fuko\Open\Sniff::addSniffer(). The sniffers must return either the format to use in the \Fuko\Open\Link constructor, or an empty string if there is no match.

Supported Editors

This is the list of the IDEs and editors supported by Fuko\Open

Editor Format Const
Atom \Fuko\Open\Editor::ATOM
GNU Emacs \Fuko\Open\Editor::EMACS
Espresso \Fuko\Open\Editor::ESPRESSO
IntelliJ IDEA \Fuko\Open\Editor::IDEA
Mac Vim \Fuko\Open\Editor::MACVIM
Apache NetBeans \Fuko\Open\Editor::NETBEANS
Nova \Fuko\Open\Editor::NOVA
PhpStorm \Fuko\Open\Editor::PHPSTORM
Sublime Text \Fuko\Open\Editor::SUBLIME
TextMate \Fuko\Open\Editor::TEXTMATE
Visual Studio Code \Fuko\Open\Editor::VSCODE
VSCodium \Fuko\Open\Editor::VSCODIUM

Repo Links

There are situations in which you do not want to create links to local source code files, but instead link to your code repository. Code repo source links usually contain not just the workspace/account/project and the repo name, but also the branch/tag/commit at which you reviewing the code. To create repo links use the Fuko\Open\Repo class, which will help you to get a new \Fuko\Open\Link object with the repo link format setup inside:

There constants inside the Fuko\Open\Repo class to help you with the formats for the different source-code hosting websites:


All versions of open with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
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 fuko-php/open contains the following files

Loading the files please wait ....