Download the PHP package mateusjatenee/php-json-feed without Composer

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

PHP Json Feed

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

bitmoji

This library provides a way to generate JSON feeds, a format recently introduced to the community.

Installation via Composer

Laravel Installation

On your config/app.php file, register the service provider:

And on the aliases array, register the facade:

Usage

The library is really simple to use and actually does not depend on Laravel itself, though it allows you to use a config file (not yet). It automatically filters formats the JSON and removes any unnecessary property.

If you're not using Laravel, jump to this part.

How to use it? Let's take the following JSON as an example:

To do this, first you need to set the config — you can set it at any time during runtime (on a Service Provider, perhaps) using the Facade or instantiating it through the container (i.e app('jsonFeed'))

Then, you need to set the items. The items may be an array of objects or a collection of objects. We're gonna talk about this a bit later.

All at once

Alternatively, you may do all at once, specially if you are not using Laravel.

How to get each item properties

It's really simple. An item only requires an id, the other fields are optional but highly recommended. First of all, your model (or any other object that is gonna be used on the json feed) needs to implement \Mateusjatenee\JsonFeed\Contracts\FeedItemContract and it's only method - getFeedId(). It should return an unique Id relative to that item. Below is a list of each method and what it does.

Method What it does Expects
getFeedId Gets a unique ID string
getFeedUrl Gets the URL of the resource string
getFeedExternalUrl Gets the URL of the page elsewhere string
getFeedTitle Gets the resource title string
getFeedContentHtml Gets the HTML of the content string
getFeedContentText Gets the text of the content string
getFeedSummary Gets the resource summary string
getFeedImage Gets the resource image string
getFeedBannerImage Gets the resource banner image string
getFeedDatePublished Gets the resource published date. The lib automatically converts it to the specific date format. string
getFeedDateModified Gets the resource modified date. The lib automatically converts it to the specific date format. string
getFeedAuthor Gets the resource author. If not specified, the same as the top level one is going to be used. string
getTags Gets the resource tags. array

You may find all accepted methods on the JSON Feed Spec

Running tests

License

This library is licensed under the MIT license. Please see LICENSE for more details.

Changelog

Please see CHANGELOG for more details.

Contributing

Please see CONTRIBUTING for more details.


All versions of php-json-feed with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
nesbot/carbon Version ~1.20
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 mateusjatenee/php-json-feed contains the following files

Loading the files please wait ....