Skip to content

Commit ef25d68

Browse files
author
Clément Blanco
committed
Config --> PDFNetConfig to avoid clash with Laravel Config class.
1 parent f0e8e0e commit ef25d68

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

src/PDFNetPHP.php

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9625,44 +9625,44 @@ function __construct($d_or_ann_or_widget=null) {
96259625
}
96269626
}
96279627

9628-
class Config {
9628+
class PDFNetConfig {
96299629
public $_cPtr=null;
96309630
protected $_pData=array();
96319631

96329632
function __set($var,$value) {
9633-
if ($var === 'mp_obj') return Config_mp_obj_set($this->_cPtr,$value);
9633+
if ($var === 'mp_obj') return PDFNetConfig_mp_obj_set($this->_cPtr,$value);
96349634
if ($var === 'thisown') return swig_PDFNetPHP_alter_newobject($this->_cPtr,$value);
96359635
$this->_pData[$var] = $value;
96369636
}
96379637

96389638
function __isset($var) {
9639-
if (function_exists('Config_'.$var.'_set')) return true;
9639+
if (function_exists('PDFNetConfig_'.$var.'_set')) return true;
96409640
if ($var === 'thisown') return true;
96419641
return array_key_exists($var, $this->_pData);
96429642
}
96439643

96449644
function __get($var) {
9645-
if ($var === 'mp_obj') return Config_mp_obj_get($this->_cPtr);
9645+
if ($var === 'mp_obj') return PDFNetConfig_mp_obj_get($this->_cPtr);
96469646
if ($var === 'thisown') return swig_PDFNetPHP_get_newobject($this->_cPtr);
96479647
return $this->_pData[$var];
96489648
}
96499649

96509650
static function Create($doc,$default_config) {
9651-
$r=Config_Create($doc,$default_config);
9651+
$r=PDFNetConfig_Create($doc,$default_config);
96529652
if (is_resource($r)) {
96539653
$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
96549654
if (class_exists($c)) return new $c($r);
9655-
return new Config($r);
9655+
return new PDFNetConfig($r);
96569656
}
96579657
return $r;
96589658
}
96599659

96609660
function IsValid() {
9661-
return Config_IsValid($this->_cPtr);
9661+
return PDFNetConfig_IsValid($this->_cPtr);
96629662
}
96639663

96649664
function GetOrder() {
9665-
$r=Config_GetOrder($this->_cPtr);
9665+
$r=PDFNetConfig_GetOrder($this->_cPtr);
96669666
if (is_resource($r)) {
96679667
$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
96689668
if (class_exists($c)) return new $c($r);
@@ -9672,31 +9672,31 @@ function GetOrder() {
96729672
}
96739673

96749674
function SetOrder($ocgs_array) {
9675-
Config_SetOrder($this->_cPtr,$ocgs_array);
9675+
PDFNetConfig_SetOrder($this->_cPtr,$ocgs_array);
96769676
}
96779677

96789678
function GetName() {
9679-
return Config_GetName($this->_cPtr);
9679+
return PDFNetConfig_GetName($this->_cPtr);
96809680
}
96819681

96829682
function SetName($name) {
9683-
Config_SetName($this->_cPtr,$name);
9683+
PDFNetConfig_SetName($this->_cPtr,$name);
96849684
}
96859685

96869686
function GetCreator() {
9687-
return Config_GetCreator($this->_cPtr);
9687+
return PDFNetConfig_GetCreator($this->_cPtr);
96889688
}
96899689

96909690
function SetCreator($name) {
9691-
Config_SetCreator($this->_cPtr,$name);
9691+
PDFNetConfig_SetCreator($this->_cPtr,$name);
96929692
}
96939693

96949694
function GetInitBaseState() {
9695-
return Config_GetInitBaseState($this->_cPtr);
9695+
return PDFNetConfig_GetInitBaseState($this->_cPtr);
96969696
}
96979697

96989698
function GetInitOnStates() {
9699-
$r=Config_GetInitOnStates($this->_cPtr);
9699+
$r=PDFNetConfig_GetInitOnStates($this->_cPtr);
97009700
if (is_resource($r)) {
97019701
$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
97029702
if (class_exists($c)) return new $c($r);
@@ -9706,7 +9706,7 @@ function GetInitOnStates() {
97069706
}
97079707

97089708
function GetInitOffStates() {
9709-
$r=Config_GetInitOffStates($this->_cPtr);
9709+
$r=PDFNetConfig_GetInitOffStates($this->_cPtr);
97109710
if (is_resource($r)) {
97119711
$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
97129712
if (class_exists($c)) return new $c($r);
@@ -9716,19 +9716,19 @@ function GetInitOffStates() {
97169716
}
97179717

97189718
function SetInitBaseState($state="ON") {
9719-
Config_SetInitBaseState($this->_cPtr,$state);
9719+
PDFNetConfig_SetInitBaseState($this->_cPtr,$state);
97209720
}
97219721

97229722
function SetInitOnStates($on_array) {
9723-
Config_SetInitOnStates($this->_cPtr,$on_array);
9723+
PDFNetConfig_SetInitOnStates($this->_cPtr,$on_array);
97249724
}
97259725

97269726
function SetInitOffStates($off_array) {
9727-
Config_SetInitOffStates($this->_cPtr,$off_array);
9727+
PDFNetConfig_SetInitOffStates($this->_cPtr,$off_array);
97289728
}
97299729

97309730
function GetIntent() {
9731-
$r=Config_GetIntent($this->_cPtr);
9731+
$r=PDFNetConfig_GetIntent($this->_cPtr);
97329732
if (is_resource($r)) {
97339733
$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
97349734
if (class_exists($c)) return new $c($r);
@@ -9738,11 +9738,11 @@ function GetIntent() {
97389738
}
97399739

97409740
function SetIntent($intent) {
9741-
Config_SetIntent($this->_cPtr,$intent);
9741+
PDFNetConfig_SetIntent($this->_cPtr,$intent);
97429742
}
97439743

97449744
function GetLockedOCGs() {
9745-
$r=Config_GetLockedOCGs($this->_cPtr);
9745+
$r=PDFNetConfig_GetLockedOCGs($this->_cPtr);
97469746
if (is_resource($r)) {
97479747
$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
97489748
if (class_exists($c)) return new $c($r);
@@ -9752,11 +9752,11 @@ function GetLockedOCGs() {
97529752
}
97539753

97549754
function SetLockedOCGs($locked_ocg_array) {
9755-
Config_SetLockedOCGs($this->_cPtr,$locked_ocg_array);
9755+
PDFNetConfig_SetLockedOCGs($this->_cPtr,$locked_ocg_array);
97569756
}
97579757

97589758
function GetSDFObj() {
9759-
$r=Config_GetSDFObj($this->_cPtr);
9759+
$r=PDFNetConfig_GetSDFObj($this->_cPtr);
97609760
if (is_resource($r)) {
97619761
$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
97629762
if (class_exists($c)) return new $c($r);
@@ -9766,11 +9766,11 @@ function GetSDFObj() {
97669766
}
97679767

97689768
function __construct($ocg_config_or_g_or_c) {
9769-
if (is_resource($ocg_config_or_g_or_c) && get_resource_type($ocg_config_or_g_or_c) === '_p_pdftron__PDF__OCG__Config') {
9769+
if (is_resource($ocg_config_or_g_or_c) && get_resource_type($ocg_config_or_g_or_c) === '_p_pdftron__PDF__OCG__PDFNetConfig') {
97709770
$this->_cPtr=$ocg_config_or_g_or_c;
97719771
return;
97729772
}
9773-
$this->_cPtr=new_Config($ocg_config_or_g_or_c);
9773+
$this->_cPtr=new_PDFNetConfig($ocg_config_or_g_or_c);
97749774
}
97759775
}
97769776

@@ -14996,12 +14996,12 @@ function GetOCGs() {
1499614996
return $r;
1499714997
}
1499814998

14999-
function GetOCGConfig() {
15000-
$r=PDFDoc_GetOCGConfig($this->_cPtr);
14999+
function GetOCGPDFNetConfig() {
15000+
$r=PDFDoc_GetOCGPDFNetConfig($this->_cPtr);
1500115001
if (is_resource($r)) {
1500215002
$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
1500315003
if (class_exists($c)) return new $c($r);
15004-
return new Config($r);
15004+
return new PDFNetConfig($r);
1500515005
}
1500615006
return $r;
1500715007
}

0 commit comments

Comments
 (0)