Download the PHP package a2workspace/laravel-automount without Composer

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

Laravel Automount

隨著 PHP 8 的新特性增加,你也許已經不需要此套件了,可參考 Constructor Property Promotion 的作法



Laravel 的依賴注入很棒,但我們讓他更好!

關於

想想看,當你專案越來越大,一定有遇過又臭又長的建構子:

透過 AutoMountDependencies 特性自動掛載依賴,讓我們省略繁雜的綁定過程。

安裝

此套件基於 PHP 7.4 的 Typed Properties 新功能,請確保你的 PHP 更新到最新版本。

如何使用

僅須在目標類別上使用 AutoMountDependencies 特性:

接著,有型別定義的類別屬性就會在建構時自動做依賴注入。

注意: 考慮到繼承,請避免使用 private 私有在要被處理的屬性上。

不會被處理的屬性

以下類型的屬性會被略過處理:

  1. 基本型別 (int, float, bool, array ...)
  2. 未定義型別的屬性
  3. 定義為 Nullable 的屬性
  4. 有初始值的屬性

限制

覆寫建構子

AutoMountDependencies 特性中定義了在建構子中執行依賴掛載的動作。當你需要覆寫 (Override) __construct() 時,記得手動呼叫 mountDependencies() 方法。

避免私有屬性

當型別屬性被定義為私有,會導致繼承後的子類別,在建構時無法寫入屬性而造成錯誤。

請謹慎使用 private ,或將屬性定義為 Nullable


All versions of laravel-automount with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|~8.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 a2workspace/laravel-automount contains the following files

Loading the files please wait ....