Download the PHP package bradietilley/carbon-zodiac without Composer

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

Carbon Zodiac

A simple package that provides an interface for converting dates to Zodiac signs and elements.

Installation

Limitations

Currently, only dates between 1648 and 2644 are supported. If you'd like to utilise this package for dates beyond that range, please make a pull request which includes your requested updates to the NewYears::THRESHOLDS constant and please cite your source(s).

Usage

You may either use the Carbon macros, use the BradieTilley\Zodiac\Zodiac class, or use each class/enum directly. Here are a few examples:

Using Carbon Macros:

Laravel will auto boot the Carbon macros, but should you need to boot it yourself on non-Laravel projects that use Carbon\Carbon, it's really easy:

Once booted, or in Laravel apps, you can leverage the Carbon macros to fetch the data you need:

Using Zodiac Helper:

Alternatively you may wish to not leverage the Carbon macros at all, which can be achieved via the Zodiac helper:

For now, only Carbon instances are supported. Future releases might scale this back to be any DateTimeInterface.

Using Classes Directly:

Extended Usage

Given a zodiac Sign enum instance, you can then find more details of the sign by leveraging a few helper methods:

The Year class

The Year class is a DTO wrapping the integer year (e.g. 2024) and includes helper methods to traverse through the years, fetch the associated Sign and Element, and determine the start / end date of the year.

Example usage:

The Sign enum

The Sign enum is a PHP Enum object that contains the 12 signs, and can be resolved via the from* methods, amongst other approaches documented elsewhere.

Example usage:

The Element enum

The Element enum is a PHP Enum object that contains the 5 elements, and can be resolved via the from* methods, amongst other approaches documented elsewhere.

Example usage:

Other Usage

There's probably more features or ways to interact with these objects so feel free to have a browse into the code see what's possible.

Issues and Notice:

There's no guarantee anything here is perfect, but it's so far gotten every date correct I have tried. If you spot any issues please open an issue in GitHub.

Author

Source

Lunar New Year thresholds:

In the NewYears class I've noted the source. Huge thanks to them, and their source.

Element and Sign cycles:

Sourced from various online places to ensure the cycling of signs and elements are correct. No source cited for this, currently.

Element extra information

This refers to an Element's season, direction, fixed element, trine, etc. This data was sourced from... Wikipedia. Take it with a grain of salt, but from what I can tell, it's "correct" 🤷

License

MIT... or whatever is the "use it and have fun without needing to worry about anything" license is.

If you use it and are happy to share your project name/URL, feel free to mention it in a PR and add it below or something.

Where it's used;


All versions of carbon-zodiac with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version >=10.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 bradietilley/carbon-zodiac contains the following files

Loading the files please wait ....