PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / trunk
Defender Security – Malware Scanner, Login Security & Firewall vtrunk
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 3.1.1 All 140 releases
defender-security / framework / component / class-behavior.php

class-behavior.php in Defender Security – Malware Scanner, Login Security & Firewall trunk, at framework/component/class-behavior.php

65 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Base behavior class.
4 *
5 * @package Calotes\Component
6 */
7
8 namespace Calotes\Component;
9
10 use Calotes\Base\Component;
11
12 /**
13 * Base behavior class for all behaviors.
14 */
15 class Behavior extends Component {
16
17 /**
18 * The component this behavior tied to.
19 *
20 * @var object
21 */
22 public $owner;
23
24 /**
25 * Get a failed ignore result.
26 *
27 * @param string $issue_name Name of scan issue.
28 *
29 * @return string
30 */
31 public function get_failed_ignore_result( string $issue_name ): string {
32 return sprintf(
33 /* translators: %s: Scan issue name. */
34 esc_html__( '%s is already marked as Ignored. It can’t be added to the Ignored list again.', 'defender-security' ),
35 $issue_name
36 );
37 }
38
39 /**
40 * Get a failed restore result.
41 *
42 * @param string $issue_name Name of scan issue.
43 *
44 * @return string
45 */
46 public function get_failed_restore_result( string $issue_name ): string {
47 return sprintf(
48 /* translators: %s: Scan issue name. */
49 esc_html__( '%s is already marked as Issue. It can’t be added to the Issue list again.', 'defender-security' ),
50 $issue_name
51 );
52 }
53
54 /**
55 * Get issue name.
56 *
57 * @param array $raw_data Array of raw data.
58 *
59 * @return string
60 */
61 public function get_issue_name( $raw_data ): string {
62 return $raw_data['name'];
63 }
64 }
65