streams/Zotlabs/Module/Permcat.php

28 lines
459 B
PHP
Raw Normal View History

<?php
namespace Zotlabs\Module;
2021-12-02 22:33:36 +00:00
use Zotlabs\Lib as Zlib;
use Zotlabs\Web\Controller;
2021-12-03 03:01:39 +00:00
class Permcat extends Controller
{
2021-12-03 03:01:39 +00:00
private $permcats = [];
2021-12-03 03:01:39 +00:00
public function init()
{
if (! local_channel()) {
return;
}
2021-12-03 03:01:39 +00:00
$permcat = new Zlib\Permcat(local_channel());
2017-02-08 00:43:00 +00:00
2021-12-03 03:01:39 +00:00
if (argc() > 1) {
json_return_and_die($permcat->fetch(argv(1)));
}
2017-02-08 00:43:00 +00:00
2021-12-03 03:01:39 +00:00
json_return_and_die($permcat->listing());
}
}