Initial import

This commit is contained in:
Nextcloud Team 2021-11-30 11:20:42 +01:00 committed by Lukas Reschke
commit 2295a33590
884 changed files with 93939 additions and 0 deletions

View file

@ -0,0 +1,25 @@
<?php
namespace AIO\Twig;
use Slim\Views\TwigExtension;
use Twig\TwigFunction;
class ClassExtension extends TwigExtension
{
public function getFunctions() : array
{
return array(
new TwigFunction('class', array($this, 'getClassName')),
);
}
public function getClassName($object) : ?string
{
if (!is_object($object)) {
return null;
}
return get_class($object);
}
}