Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mets-rebuild.corals.io/wp-content/plugins/favorites/app/Entities/Favorite/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mets-rebuild.corals.io/wp-content/plugins/favorites/app/Entities/Favorite/Favorite.php
<?php 
namespace Favorites\Entities\Favorite;

use Favorites\Config\SettingsRepository;
use Favorites\Entities\Favorite\SyncSingleFavorite;
use Favorites\Entities\Post\SyncFavoriteCount;

class Favorite 
{
	/**
	* Settings Repository
	*/
	private $settings_repo;

	/**
	* Save Type
	*/
	private $save_type;

	public function __construct()
	{
		$this->settings_repo = new SettingsRepository;
	}

	/**
	* Save the Favorite
	*/
	public function update($post_id, $status, $site_id, $group_id = 1)
	{
		$this->save_type = $this->settings_repo->saveType();
		$usersync = new SyncSingleFavorite($post_id, $site_id, $group_id);
		$saveType = $this->save_type;
		$usersync->$saveType();
		
		$postsync = new SyncFavoriteCount($post_id, $status, $site_id);
		$postsync->sync();
	}

	/**
	* Get the Save Type
	*/
	public function saveType()
	{
		return $this->save_type;
	}
}

Spamworldpro Mini