<?php

namespace ThurData\Servers\KerioEmail\Core\Traits;

trait IsAdmin
{
    /**
     * @var null|bool
     * determines if run in Admin or Client context
     */
    protected $isAdminStatus = null;

    /**
     * return bool
     */
    public function isAdmin()
    {
        if ($this->isAdminStatus === null)
        {
            $this->isAdminStatus = \ThurData\Servers\KerioEmail\Core\Helper\isAdmin();
        }

        return $this->isAdminStatus;
    }
}
