Download the PHP package rtio/activitypub-core without Composer

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

ActivityPhp

Build Status Maintainability Test Coverage

This repository is a fork from https://github.com/landrok/activitypub.

ActivityPhp core is an implementation of the ActivityPub data layers in PHP.

It provides two layers:

As the two layers are implemented, it aims to be an ActivityPub conformant Federated Server

All normalized types are implemented too. If you need to create a new one, just extend existing types.

See the full documentation or an overview below.

Table of contents


Requirements


Install


ActivityStreams Core Types

All core types are provided:


ActivityStreams Extended Types

All extended types are provided:

Actor types

Activity types

Object types


Types

Type factory

You can instanciate ActivityStreams types using their short name.

Instanciating a type and setting properties is possible with the second parameter.

Starting from an array with a 'type' key, it's even possible to directly instanciate your type.


Properties names

Whatever be your object or link, you can get all properties names with getProperties() method.

Would output something like:


All properties and their values

In order to dump all properties and associated values, use toArray() method.

Would output something like:


Get a property

There are 3 equivalent ways to get a value.


Set a property

There are 3 equivalent ways to set a value.

Whenever you assign a value, the format of this value is checked.

This action is made by a validator. If rules are not respected an Exception is thrown.

When a property does not exist, an Exception is thrown in strict mode. You can define 3 different behaviours:


Set several properties

With Type factory, you can instanciate a type and set several properties.


Create a copy

Sometimes you may use a copy in order not to affect values of the original type.

You can copy and chain methods to affect only values of the copied type.


Check if a property exists


Use native types

All core and extended types are used with a classic instanciation.

Same way with Type factory:


Use your own extended types

If you need some custom attributes, you can extend predefined types.

There are 2 ways to instanciate a type:

Extending types preserves benefits of getters, setters and their validators.


Create your own property validator

Use a custom property validator when you define custom attributes or when you want to override ActivityPub attribute default validation.

Regarding to previous example with a custom attribute $myProperty, if you try to set this property, it would be done without any check on values you're providing.

You can easily cope with that implementing a custom validator using Validator.

An equivalent way is to use Type factory and addValidator() method:


More


All versions of activitypub-core with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2|^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 rtio/activitypub-core contains the following files

Loading the files please wait ....