line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Padre::Plugin::PHP; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
25196
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
5
|
1
|
|
|
1
|
|
29
|
use 5.008; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
73
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.05'; |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
6
|
use base 'Padre::Plugin'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
726
|
|
10
|
1
|
|
|
1
|
|
431
|
use Padre::Wx (); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use Padre::Wx::Dialog::Preferences(); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub padre_interfaces { |
14
|
|
|
|
|
|
|
'Padre::Plugin' => 0.50, |
15
|
|
|
|
|
|
|
'Padre::Document' => 0.21; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub registered_documents { |
19
|
|
|
|
|
|
|
'application/x-php' => 'Padre::Document::PHP',; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub plugin_enable { |
23
|
|
|
|
|
|
|
my $self = shift; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
$self->_config_settings; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
$Padre::Wx::Dialog::Preferences::PANELS{'Padre::Wx::Dialog::Preferences::PHP'} = 'PHP'; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub menu_plugins_simple { |
31
|
|
|
|
|
|
|
my $self = shift; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
return ( |
34
|
|
|
|
|
|
|
'PHP' => [ |
35
|
|
|
|
|
|
|
'About', sub { $self->about }, |
36
|
|
|
|
|
|
|
] |
37
|
|
|
|
|
|
|
); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub about { |
41
|
|
|
|
|
|
|
my ($main) = @_; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
my $about = Wx::AboutDialogInfo->new; |
44
|
|
|
|
|
|
|
$about->SetName(__PACKAGE__); |
45
|
|
|
|
|
|
|
$about->SetDescription("This plugin currently provides naive syntax highlighting for PHP files\n"); |
46
|
|
|
|
|
|
|
$about->SetVersion($VERSION); |
47
|
|
|
|
|
|
|
Wx::AboutBox($about); |
48
|
|
|
|
|
|
|
return; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
############################################################################### |
52
|
|
|
|
|
|
|
# Internal functions |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub _config_settings { |
55
|
|
|
|
|
|
|
my $self = shift; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
my $config = Padre->ide->config; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
$config->setting( |
60
|
|
|
|
|
|
|
name => 'php_cmd', |
61
|
|
|
|
|
|
|
type => Padre::Constant::ASCII, |
62
|
|
|
|
|
|
|
store => Padre::Constant::HOST, |
63
|
|
|
|
|
|
|
default => '', |
64
|
|
|
|
|
|
|
); |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
$config->setting( |
67
|
|
|
|
|
|
|
name => 'php_interpreter_args_default', |
68
|
|
|
|
|
|
|
type => Padre::Constant::ASCII, |
69
|
|
|
|
|
|
|
store => Padre::Constant::HOST, |
70
|
|
|
|
|
|
|
default => '', |
71
|
|
|
|
|
|
|
); |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
1; |
77
|
|
|
|
|
|
|
__END__ |