PHP 8.2.30
Preview: AuditLogger.php Size: 1.34 KB
/proc/self/root/opt/cloudlinux/alt-php55/root/usr/share/pear/Symfony/Component/Security/Acl/Domain/AuditLogger.php

<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Security\Acl\Domain;

use Symfony\Component\Security\Acl\Model\AuditableEntryInterface;
use Symfony\Component\Security\Acl\Model\EntryInterface;
use Symfony\Component\Security\Acl\Model\AuditLoggerInterface;

/**
 * Base audit logger implementation
 *
 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
 */
abstract class AuditLogger implements AuditLoggerInterface
{
    /**
     * Performs some checks if logging was requested
     *
     * @param Boolean        $granted
     * @param EntryInterface $ace
     */
    public function logIfNeeded($granted, EntryInterface $ace)
    {
        if (!$ace instanceof AuditableEntryInterface) {
            return;
        }

        if ($granted && $ace->isAuditSuccess()) {
            $this->doLog($granted, $ace);
        } elseif (!$granted && $ace->isAuditFailure()) {
            $this->doLog($granted, $ace);
        }
    }

    /**
     * This method is only called when logging is needed
     *
     * @param Boolean        $granted
     * @param EntryInterface $ace
     */
    abstract protected function doLog($granted, EntryInterface $ace);
}

Directory Contents

Dirs: 0 × Files: 12

Name Size Perms Modified Actions
19.34 KB lrw-r--r-- 2019-12-18 11:24:07
Edit Download
2.30 KB lrw-r--r-- 2019-12-18 11:24:07
Edit Download
1.34 KB lrw-r--r-- 2019-12-18 11:24:07
Edit Download
6.17 KB lrw-r--r-- 2019-12-18 11:24:07
Edit Download
4.50 KB lrw-r--r-- 2019-12-18 11:24:07
Edit Download
1.91 KB lrw-r--r-- 2019-12-18 11:24:07
Edit Download
3.09 KB lrw-r--r-- 2019-12-18 11:24:07
Edit Download
958 B lrw-r--r-- 2019-12-18 11:24:07
Edit Download
7.46 KB lrw-r--r-- 2019-12-18 11:24:07
Edit Download
1.56 KB lrw-r--r-- 2019-12-18 11:24:07
Edit Download
2.91 KB lrw-r--r-- 2019-12-18 11:24:07
Edit Download
3.04 KB lrw-r--r-- 2019-12-18 11:24:07
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).