2017 © Pedro Peláez
 

library php-tvheadend

Library for communicating with tvheadend

image

jalle19/php-tvheadend

Library for communicating with tvheadend

  • Friday, October 28, 2016
  • by Jalle19
  • Repository
  • 1 Watchers
  • 1 Stars
  • 271 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 7 Versions
  • 2 % Grown

The README.md

php-tvheadend

This is a PHP library for communicating with and controlling tvheadend instances. So far it is quite limited, it only supports the features I've needed myself so far. It is built on a generic framework where each class represents a model in tvheadend, e.g. a network, a mux, a channel and so on. The library communicates with tvheadend using a HTTP client. The client can be overridden if necessary., (*1)

The library also includes a base class for creating CLI commands that perform specific tasks against tvheadend. To utilize it, simply include this library in your project and extend the Jalle19\tvheadend\cli\TvheadendCommand class. The base command provides a way to request switches and flags from the user, as well as asking for input., (*2)

Installation

composer require jalle19/php-tvheadend

Example usage (library)

require_once('/path/to/vendor/autoload.php');
use Jalle19\tvheadend;

// Create a new instance
$tvheadend = new tvheadend\Tvheadend('localhost', 9981);

// Create an IPTV network
$network = new tvheadend\model\network\IptvNetwork();
$network->networkname = 'Test network';
$network->max_streams = 5;

try {
  $tvheadend->createNetwork($network);
}
catch (tvheadend\exception\RequestFailedException $e) {
  die('Failed to create network');
}

// Loop through all networks and print their respective names
foreach ($tvheadend->getNetworks as $network)
  echo $network->networkname.PHP_EOL;

Example usage (command)

// let's call this file command.php
require_once(__DIR__.'/vendor/autoload.php');
new Jalle19\tvheadend\cli\TvheadendCommand();

Output when run using php command.php:, (*3)

 command.php                                                                                                                 
--help
     Show the help page for this command.

--tvheadend-hostname <argument>
     Required. The hostname where tvheadend is running

--tvheadend-http-port <argument>
     The tvheadend HTTP port

--tvheadend-password <argument>
     The tvheadend password

--tvheadend-username <argument>
     The tvheadend username

License

The library is licensed under the GNU GPL verison 2, (*4)

The Versions

28/10 2016

dev-master

9999999-dev

Library for communicating with tvheadend

  Sources   Download

GNU GPL v2.0

The Requires

 

by Sam Stenvall

28/10 2016

0.1.6

0.1.6.0

Library for communicating with tvheadend

  Sources   Download

GNU GPL v2.0

The Requires

 

by Sam Stenvall

08/05 2016

0.1.5

0.1.5.0

Library for communicating with tvheadend

  Sources   Download

GNU GPL v2.0

The Requires

 

by Sam Stenvall

18/03 2016

0.1.4

0.1.4.0

Library for communicating with tvheadend

  Sources   Download

GNU GPL v2.0

The Requires

 

by Sam Stenvall

17/02 2016

0.1.2

0.1.2.0

Library for communicating with tvheadend

  Sources   Download

GNU GPL v2.0

The Requires

 

by Sam Stenvall

16/02 2016

0.1.1

0.1.1.0

Library for communicating with tvheadend

  Sources   Download

GNU GPL v2.0

The Requires

 

by Sam Stenvall

13/02 2016

0.1.0

0.1.0.0

Library for communicating with tvheadend

  Sources   Download

GNU GPL v2.0

The Requires

 

by Sam Stenvall