Download the PHP package spoova/enlist without Composer

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

Enlist Package

This is a spoova framework package for listing or renaming files in a directory. It can be used to rename file names and file extensions. While renaming file extensions can break the functionality of a file, some specific files extensions can be easily modified. Renaming files extensions that can be easily broken should be avoided. At most times, this class may be used to change extension of image files or text-related file. Although, some file extensions can be easily modified, yet it does not serve as converter for such files. In the case where a converter is needed, a converter tool should be employed.

Including the Enlist class

Run the command below in the terminal to require the package

Initializing the Enlist class

In your sample php file include the vendor/autoload.php file and import the Enlist class

Set a file directory

In order to use the Enlist package, the source directory must first be be specified

Check if file directory is valid

We can check if the source directory supplied is valid through the method

List files in directory

The code below will list all files in a directory except hidden files

List files in directory having jpg extension

The code below will list all files with .jpg files in a directory

List hidden files in directory

The code below will list all files in specified directory having only extension name without any file name

List hidden files in directory and files having png extension only

The code below will list all .png files in the source directory along with hidden files

List all files in directory including hidden

The code below will list all files including hidden files in a directory

Renaming Files in directory

Rename all file extensions in a directory to png except hidden files

The result of a renaming can also be obtained by suppling a second argument to function

Rename only .jpg file extensions in a directory to png extension

Rename only .jpg file names in a directory with serial numbering

Files can be renamed with serial numbers starting from a specific number using the method

Renaming all file names in a directory with serial numbering with a named prefix can be done using both the and methods

Spaces in file names can be replaced with another character through the method.

Smart url format can be applied to file name. This will remove special characters from file names

The method can be used to prevent from actively renaming files. Only the expected output result will be seen as array list if no error occurs

Getting Data

The method can be used to fetch the resulting data when any of the , or method is used.

Handling Errors

Errors can be returned as text if debug mode is not turned on

Errors can also be fetched by turning debug mode on without throwing errors. In order to do this the method must be turned on before is called. Finally the method will return all backtraces where error occured. Note that the or method are only executed if the specified source url is valid.

Debugs can also be fetched by supplying a referenced variable into the method.

Throwing errors can be enabled when the debug mode is enabled. This can be done by supplying an argument of on the method.

The debug method can also help to keep track of errors when turned off

Working with session

In certain situations where files are renamed in a way that is not desired or one desires to reverse back to the previous file names, enlist supports the reversal of changes made to files only if there is no overiding of files. To reverse back to previous names, a session must be actively defined with the method and a unique key where the most recent changes are stored. If no session was started earlier the method will start a new session of its own. Once the enlist session name is defined, the method can be applied to revert changes.

Allow Enlist to revert recent changes from session storage

Session names can also be specified from the session storage. Reversals will be made only if the old filename still exists in the specified directory. Also, when a reversal has been made, the stored session urls will be cleared out.

Characters and their functions

The list below describes arguments and their functions

Good Practices

It is always good to set the renaming to view mode first to check how the final result of a list of renamed files will be before proceeding to rename the item to avoid issues like merging of conflicts which can lead to loss of file.


All versions of enlist with dependencies

PHP Build Version
Package Version
No informations.
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 spoova/enlist contains the following files

Loading the files please wait ....