1212 * Class PAFPlayerManager This class is to get 
1313 * @package PartyAndFriends\Lib\PAFPlayer 
1414 */ 
15- class  PAFPlayerManager
16- {
15+ class  PAFPlayerManager {
1716	private  static  $ instance
1817	private  $ connection
1918	private  $ tablePrefix
2019
21- 	function  __construct ($ pPod$ tablePrefix
22- 	{
20+ 	function  __construct ($ pPod$ tablePrefix
2321		self ::$ instance$ this 
2422		$ this connection  = $ pPod
2523		$ this tablePrefix  = $ tablePrefix
2624	}
2725
28- 	public  function  getPlayerByUUID ($ pUUID
29- 	{
26+ 	public  function  getPlayerByUUID ($ pUUID
3027		$ stmt$ this connection ->prepare ("SELECT player_id, player_uuid, player_name FROM fr_players WHERE player_uuid=:uuid LIMIT 1 " );
3128		$ stmtbindParam (':uuid ' , $ pUUID
3229		$ stmtexecute ();
@@ -37,8 +34,7 @@ public function getPlayerByUUID($pUUID)
3734		return  new  PAFPlayer ($ row'player_uuid ' ], $ row'player_name ' ], $ row'player_id ' ]);
3835	}
3936
40- 	public  function  getPlayerByID ($ pID
41- 	{
37+ 	public  function  getPlayerByID ($ pID
4238		$ stmt$ this connection ->prepare ("SELECT player_id, player_uuid, player_name FROM fr_players WHERE player_id=:id LIMIT 1 " );
4339		$ stmtbindParam (':id ' , $ pID
4440		$ stmtexecute ();
@@ -49,13 +45,11 @@ public function getPlayerByID($pID)
4945		return  new  PAFPlayer ($ row'player_uuid ' ], $ row'player_name ' ], $ row'player_id ' ]);
5046	}
5147
52- 	public  function  getConnection ()
53- 	{
48+ 	public  function  getConnection () {
5449		return  $ this connection ;
5550	}
5651
57- 	public  function  getPlayerByName ($ pPlayerName
58- 	{
52+ 	public  function  getPlayerByName ($ pPlayerName
5953		$ stmt$ this connection ->prepare ("SELECT player_id, player_uuid, player_name FROM  "  . PAFPlayerManager::getInstance ()->getTablePrefix () . "players WHERE player_name=:name LIMIT 1 " );
6054		$ stmtbindParam (':name ' , $ pPlayerName
6155		$ stmtexecute ();
@@ -69,14 +63,16 @@ public function getPlayerByName($pPlayerName)
6963	/** 
7064	 * @return String 
7165	 */ 
72- 	public  function  getTablePrefix ()
73- 	{
66+ 	public  function  getTablePrefix () {
7467		return  $ this tablePrefix ;
7568	}
7669
77- 	public  static  function  getInstance ()
78- 	{
70+ 	public  static  function  getInstance () {
7971		return  self ::$ instance
8072	}
8173
74+ 	public  function  getSetting () {
75+ 
76+ 	}
77+ 
8278}
0 commit comments