PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.3.0
Defender Security – Malware Scanner, Login Security & Firewall v6.3.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
defender-security / src / component / known-bots / class-known-bots-factory.php

class-known-bots-factory.php in Defender Security – Malware Scanner, Login Security & Firewall 6.3.0, at src/component/known-bots/class-known-bots-factory.php

36 lines 952 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Factory class for creating instances of Known_Bots with predefined bot providers.
4 *
5 * @package WP_Defender\Component\Known_Bots
6 */
7
8 namespace WP_Defender\Component\Known_Bots;
9
10 use WP_Defender\Component\Known_Bots\Bots\Google_Bot;
11 use WP_Defender\Component\Known_Bots\Bots\Bing_Bot;
12 use WP_Defender\Component\Known_Bots\Bots\Facebook_Bot;
13
14 /**
15 * Factory class to create a Known_Bots instance with predefined bot providers.
16 *
17 * This class encapsulates the creation logic for Known_Bots, allowing for easy instantiation
18 * with a set of known bot providers.
19 */
20 class Known_Bots_Factory {
21 /**
22 * Creates an instance of Known_Bots with predefined bot providers.
23 *
24 * @return Known_Bots An instance of Known_Bots containing Google_Bot, Bing_Bot, and Facebook_Bot.
25 */
26 public static function create(): Known_Bots {
27 return new Known_Bots(
28 array(
29 new Google_Bot(),
30 new Bing_Bot(),
31 new Facebook_Bot(),
32 )
33 );
34 }
35 }
36