PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 5.7.0
Defender Security – Malware Scanner, Login Security & Firewall v5.7.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 5.7.0, at src/component/known-bots/class-known-bots-factory.php

34 lines 857 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
13 /**
14 * Factory class to create a Known_Bots instance with predefined bot providers.
15 *
16 * This class encapsulates the creation logic for Known_Bots, allowing for easy instantiation
17 * with a set of known bot providers.
18 */
19 class Known_Bots_Factory {
20 /**
21 * Creates an instance of Known_Bots with predefined bot providers.
22 *
23 * @return Known_Bots An instance of Known_Bots containing Google_Bot and Bing_Bot.
24 */
25 public static function create(): Known_Bots {
26 return new Known_Bots(
27 array(
28 new Google_Bot(),
29 new Bing_Bot(),
30 )
31 );
32 }
33 }
34