FOF30\Utils\InstallScript::setDependencies PHP Метод

setDependencies() защищенный Метод

Sets the dependencies for a package into the #__akeeba_common table
protected setDependencies ( string $package, array $dependencies )
$package string The package
$dependencies array The dependencies list
    protected function setDependencies($package, array $dependencies)
    {
        $db = JFactory::getDbo();
        $query = $db->getQuery(true)->delete('#__akeeba_common')->where($db->qn('key') . ' = ' . $db->q($package));
        try {
            $db->setQuery($query)->execute();
        } catch (Exception $e) {
            // Do nothing if the old key wasn't found
        }
        $object = (object) array('key' => $package, 'value' => json_encode($dependencies));
        try {
            $db->insertObject('#__akeeba_common', $object, 'key');
        } catch (Exception $e) {
            // Do nothing if the old key wasn't found
        }
    }