18
18
*/
19
19
class Toolkit implements ToolkitInterface
20
20
{
21
- const VERSION = "1.9.6 " ; // version number for front-end PHP toolkit
21
+ public const VERSION = "1.9.6 " ; // version number for front-end PHP toolkit
22
22
23
23
/* @todo use inputXml and outputXml to make this class more flexibly OO-like. Fewer strings copied around.
24
24
* Better would be to use a Request object that has a connection.
@@ -53,8 +53,8 @@ class Toolkit implements ToolkitInterface
53
53
54
54
protected $ _isCw = false ; // whether the CW is used for this instance.
55
55
56
- static protected $ _config ; // config options from INI file. Accessed by static method getConfigValue();
57
- static protected $ _os ; // operating system
56
+ protected static $ _config ; // config options from INI file. Accessed by static method getConfigValue();
57
+ protected static $ _os ; // operating system
58
58
59
59
// brought over from CW
60
60
protected $ joblog = '' ;
@@ -1139,7 +1139,7 @@ public function getDiagnostics($info = 'joblog', $jobName = '', $jobUser = '', $
1139
1139
*
1140
1140
* @return string Version number (e.g. '1.4.0')
1141
1141
*/
1142
- static function getFrontEndVersion ()
1142
+ public static function getFrontEndVersion ()
1143
1143
{
1144
1144
return self ::VERSION ;
1145
1145
}
@@ -1170,7 +1170,7 @@ public function getBackEndVersion()
1170
1170
* @param $library
1171
1171
* @return string Version number (e.g. '1.8.0')
1172
1172
*/
1173
- static function getLocalBackEndVersion ($ library )
1173
+ public static function getLocalBackEndVersion ($ library )
1174
1174
{
1175
1175
$ cmd = "qsh -c /qsys.lib/ $ library.lib/xmlver.pgm " ;
1176
1176
@@ -1395,7 +1395,7 @@ public function ClCommandWithCpf($command)
1395
1395
* @param int $dimension
1396
1396
* @return array
1397
1397
*/
1398
- static function AddParameter ($ type , $ io , $ comment , $ varName = '' , $ value = '' , $ varying = 'off ' , $ dimension = 0 )
1398
+ public static function AddParameter ($ type , $ io , $ comment , $ varName = '' , $ value = '' , $ varying = 'off ' , $ dimension = 0 )
1399
1399
{
1400
1400
return array ('type ' => $ type , // storage
1401
1401
'io ' => $ io , // in/out/both
@@ -1421,7 +1421,7 @@ static function AddParameter($type, $io, $comment, $varName = '', $value = '', $
1421
1421
* @param bool $useHex
1422
1422
* @return CharParam
1423
1423
*/
1424
- static function AddParameterChar ($ io , $ size , $ comment , $ varName = '' , $ value = '' , $ varying = 'off ' ,$ dimension = 0 ,
1424
+ public static function AddParameterChar ($ io , $ size , $ comment , $ varName = '' , $ value = '' , $ varying = 'off ' ,$ dimension = 0 ,
1425
1425
$ by ='' , $ isArray = false , $ ccsidBefore = '' , $ ccsidAfter = '' , $ useHex = false )
1426
1426
{
1427
1427
return new CharParam ($ io , $ size , $ comment , $ varName , $ value , $ varying , $ dimension , $ by ,
@@ -1436,7 +1436,7 @@ static function AddParameterChar($io, $size , $comment, $varName = '', $value= '
1436
1436
* @param int $dimension
1437
1437
* @return Int32Param
1438
1438
*/
1439
- static function AddParameterInt32 ($ io , $ comment , $ varName = '' , $ value = '' , $ dimension = 0 )
1439
+ public static function AddParameterInt32 ($ io , $ comment , $ varName = '' , $ value = '' , $ dimension = 0 )
1440
1440
{
1441
1441
return new Int32Param ($ io , $ comment , $ varName , $ value , $ dimension );
1442
1442
}
@@ -1447,7 +1447,7 @@ static function AddParameterInt32($io, $comment, $varName = '', $value = '', $di
1447
1447
* @param $labelFindLen
1448
1448
* @return SizeParam
1449
1449
*/
1450
- static function AddParameterSize ($ comment , $ varName = '' , $ labelFindLen = 0 )
1450
+ public static function AddParameterSize ($ comment , $ varName = '' , $ labelFindLen = 0 )
1451
1451
{
1452
1452
return new SizeParam ($ comment , $ varName , $ labelFindLen );
1453
1453
}
@@ -1458,7 +1458,7 @@ static function AddParameterSize($comment, $varName = '', $labelFindLen = 0)
1458
1458
* @param $labelFindLen
1459
1459
* @return SizePackParam
1460
1460
*/
1461
- static function AddParameterSizePack ($ comment , $ varName = '' , $ labelFindLen = 0 )
1461
+ public static function AddParameterSizePack ($ comment , $ varName = '' , $ labelFindLen = 0 )
1462
1462
{
1463
1463
return new SizePackParam ($ comment , $ varName , $ labelFindLen );
1464
1464
}
@@ -1497,7 +1497,7 @@ public static function AddParameterInt16($io, $comment, $varName='', $value='',
1497
1497
* @param int $dimension
1498
1498
* @return Int64Param
1499
1499
*/
1500
- static function AddParameterInt64 ($ io , $ comment , $ varName = '' , $ value = '' , $ dimension = 0 )
1500
+ public static function AddParameterInt64 ($ io , $ comment , $ varName = '' , $ value = '' , $ dimension = 0 )
1501
1501
{
1502
1502
return new Int64Param ($ io , $ comment , $ varName , $ value , $ dimension );
1503
1503
}
@@ -1536,7 +1536,7 @@ public static function AddParameterUInt16($io, $comment, $varName='', $value='',
1536
1536
* @param int $dimension
1537
1537
* @return UInt32Param
1538
1538
*/
1539
- static function AddParameterUInt32 ($ io , $ comment , $ varName = '' , $ value = '' , $ dimension =0 )
1539
+ public static function AddParameterUInt32 ($ io , $ comment , $ varName = '' , $ value = '' , $ dimension =0 )
1540
1540
{
1541
1541
return new UInt32Param ($ io , $ comment , $ varName , $ value , $ dimension ) ; // removed erroneous "off"
1542
1542
}
@@ -1549,7 +1549,7 @@ static function AddParameterUInt32($io, $comment, $varName = '', $value = '', $d
1549
1549
* @param int $dimension
1550
1550
* @return UInt64Param
1551
1551
*/
1552
- static function AddParameterUInt64 ($ io , $ comment , $ varName = '' , $ value ='' , $ dimension =0 )
1552
+ public static function AddParameterUInt64 ($ io , $ comment , $ varName = '' , $ value ='' , $ dimension =0 )
1553
1553
{
1554
1554
return new UInt64Param ($ io , $ comment , $ varName , $ value , $ dimension );
1555
1555
}
@@ -1562,7 +1562,7 @@ static function AddParameterUInt64($io, $comment, $varName = '', $value='', $dim
1562
1562
* @param int $dimension
1563
1563
* @return FloatParam
1564
1564
*/
1565
- static function AddParameterFloat ($ io , $ comment , $ varName = '' , $ value ='' , $ dimension =0 )
1565
+ public static function AddParameterFloat ($ io , $ comment , $ varName = '' , $ value ='' , $ dimension =0 )
1566
1566
{
1567
1567
return (new FloatParam ($ io , $ comment , $ varName , $ value , $ dimension ));
1568
1568
}
@@ -1575,7 +1575,7 @@ static function AddParameterFloat($io, $comment, $varName = '', $value='', $dime
1575
1575
* @param int $dimension
1576
1576
* @return RealParam
1577
1577
*/
1578
- static function AddParameterReal ($ io , $ comment , $ varName = '' , $ value ='' , $ dimension =0 )
1578
+ public static function AddParameterReal ($ io , $ comment , $ varName = '' , $ value ='' , $ dimension =0 )
1579
1579
{
1580
1580
return new RealParam ($ io , $ comment , $ varName , $ value , $ dimension );
1581
1581
}
@@ -1590,7 +1590,7 @@ static function AddParameterReal($io, $comment, $varName = '', $value='', $dimen
1590
1590
* @param int $dimension
1591
1591
* @return PackedDecParam
1592
1592
*/
1593
- static function AddParameterPackDec ($ io , $ length ,$ scale , $ comment , $ varName = '' , $ value ='' , $ dimension =0 )
1593
+ public static function AddParameterPackDec ($ io , $ length ,$ scale , $ comment , $ varName = '' , $ value ='' , $ dimension =0 )
1594
1594
{
1595
1595
return new PackedDecParam ($ io , $ length ,$ scale , $ comment , $ varName , $ value , $ dimension );
1596
1596
}
@@ -1605,7 +1605,7 @@ static function AddParameterPackDec($io, $length ,$scale , $comment, $varName =
1605
1605
* @param int $dimension
1606
1606
* @return ZonedParam
1607
1607
*/
1608
- static function AddParameterZoned ($ io , $ length ,$ scale , $ comment , $ varName = '' , $ value ='' , $ dimension =0 )
1608
+ public static function AddParameterZoned ($ io , $ length ,$ scale , $ comment , $ varName = '' , $ value ='' , $ dimension =0 )
1609
1609
{
1610
1610
return new ZonedParam ($ io , $ length ,$ scale , $ comment , $ varName , $ value , $ dimension );
1611
1611
}
@@ -1617,7 +1617,7 @@ static function AddParameterZoned($io, $length ,$scale , $comment, $varName = ''
1617
1617
* @param string $comment
1618
1618
* @return HoleParam
1619
1619
*/
1620
- static function AddParameterHole ($ size , $ comment ='hole ' )
1620
+ public static function AddParameterHole ($ size , $ comment ='hole ' )
1621
1621
{
1622
1622
return new HoleParam ($ size , $ comment );
1623
1623
}
@@ -1631,7 +1631,7 @@ static function AddParameterHole($size , $comment='hole')
1631
1631
* @param int $dimension
1632
1632
* @return BinParam
1633
1633
*/
1634
- static function AddParameterBin ($ io , $ size , $ comment , $ varName = '' , $ value ='' ,$ dimension =0 )
1634
+ public static function AddParameterBin ($ io , $ size , $ comment , $ varName = '' , $ value ='' ,$ dimension =0 )
1635
1635
{
1636
1636
return new BinParam ($ io , $ size , $ comment , $ varName , $ value ,$ dimension );
1637
1637
}
@@ -1640,7 +1640,7 @@ static function AddParameterBin($io, $size , $comment, $varName = '', $value='',
1640
1640
* @param $array
1641
1641
* @return array
1642
1642
*/
1643
- static function AddParameterArray ($ array )
1643
+ public static function AddParameterArray ($ array )
1644
1644
{
1645
1645
$ params = array ();
1646
1646
@@ -1668,15 +1668,15 @@ static function AddParameterArray($array)
1668
1668
* @param string $io
1669
1669
* @return DataStructure
1670
1670
*/
1671
- static function AddDataStruct (array $ parameters , $ name ='struct_name ' , $ dim =0 , $ by ='' , $ isArray =false , $ labelLen = null , $ comment = '' , $ io = 'both ' )
1671
+ public static function AddDataStruct (array $ parameters , $ name ='struct_name ' , $ dim =0 , $ by ='' , $ isArray =false , $ labelLen = null , $ comment = '' , $ io = 'both ' )
1672
1672
{
1673
1673
return new DataStructure ($ parameters , $ name , $ dim , $ comment , $ by , $ isArray , $ labelLen , $ io );
1674
1674
}
1675
1675
1676
1676
/**
1677
1677
* @return DataStructure
1678
1678
*/
1679
- static function AddErrorDataStruct ()
1679
+ public static function AddErrorDataStruct ()
1680
1680
{
1681
1681
return new DataStructure (self ::GenerateErrorParameter (), 'errorDs ' , 0 );
1682
1682
}
@@ -1688,7 +1688,7 @@ static function AddErrorDataStruct()
1688
1688
*
1689
1689
* @return DataStructure
1690
1690
*/
1691
- static function AddErrorDataStructZeroBytes ()
1691
+ public static function AddErrorDataStructZeroBytes ()
1692
1692
{
1693
1693
return new DataStructure (self ::GenerateErrorParameterZeroBytes (), 'errorDs ' , 0 );
1694
1694
}
@@ -1715,7 +1715,7 @@ static function AddErrorDataStructZeroBytes()
1715
1715
* @param int $paramNum
1716
1716
* @return string
1717
1717
*/
1718
- static function getErrorDataStructXml ($ paramNum = 0 )
1718
+ public static function getErrorDataStructXml ($ paramNum = 0 )
1719
1719
{
1720
1720
$ paramNumStr = ($ paramNum ) ? ($ paramNum . '. ' ) : '' ;
1721
1721
@@ -1734,7 +1734,7 @@ static function getErrorDataStructXml($paramNum = 0)
1734
1734
* @param int $paramNum
1735
1735
* @return string
1736
1736
*/
1737
- static function getErrorDataStructXmlWithCode ($ paramNum = 0 )
1737
+ public static function getErrorDataStructXmlWithCode ($ paramNum = 0 )
1738
1738
{
1739
1739
$ paramNumStr = ($ paramNum ) ? ($ paramNum . '. ' ) : '' ;
1740
1740
@@ -1754,7 +1754,7 @@ static function getErrorDataStructXmlWithCode($paramNum = 0)
1754
1754
* @param int $paramNum
1755
1755
* @return string
1756
1756
*/
1757
- static function getListInfoApiXml ($ paramNum = 0 )
1757
+ public static function getListInfoApiXml ($ paramNum = 0 )
1758
1758
{
1759
1759
$ paramNumStr = ($ paramNum ) ? ($ paramNum . '. ' ) : '' ;
1760
1760
@@ -1781,7 +1781,7 @@ static function getListInfoApiXml($paramNum = 0)
1781
1781
* @param int $paramNum
1782
1782
* @return string
1783
1783
*/
1784
- static function getNumberOfRecordsDesiredApiXml ($ paramNum = 0 )
1784
+ public static function getNumberOfRecordsDesiredApiXml ($ paramNum = 0 )
1785
1785
{
1786
1786
$ paramNumStr = ($ paramNum ) ? ($ paramNum . '. ' ) : '' ;
1787
1787
@@ -1796,7 +1796,7 @@ static function getNumberOfRecordsDesiredApiXml($paramNum = 0)
1796
1796
* @param int $paramNum
1797
1797
* @return string
1798
1798
*/
1799
- static function getSortInformationApiXml ($ paramNum = 0 )
1799
+ public static function getSortInformationApiXml ($ paramNum = 0 )
1800
1800
{
1801
1801
$ paramNumStr = ($ paramNum ) ? ($ paramNum . '. ' ) : '' ;
1802
1802
@@ -1815,7 +1815,7 @@ static function getSortInformationApiXml($paramNum = 0)
1815
1815
* @param $lengthOfReceiverVariable
1816
1816
* @return string
1817
1817
*/
1818
- static function getDummyReceiverAndLengthApiXml ($ paramNum , $ lengthOfReceiverVariable )
1818
+ public static function getDummyReceiverAndLengthApiXml ($ paramNum , $ lengthOfReceiverVariable )
1819
1819
{
1820
1820
$ paramNumStr = $ paramNum . '. ' ;
1821
1821
$ paramNumStrNext = ($ paramNum + 1 ) . '. ' ;
@@ -2060,7 +2060,7 @@ public function generate_name()
2060
2060
*
2061
2061
* @return array
2062
2062
*/
2063
- static function GenerateErrorParameter ()
2063
+ public static function GenerateErrorParameter ()
2064
2064
{
2065
2065
$ ErrBytes = 144 ;
2066
2066
$ ErrBytesAv = 144 ;
@@ -2083,7 +2083,7 @@ static function GenerateErrorParameter()
2083
2083
*
2084
2084
* @return array
2085
2085
*/
2086
- static function GenerateErrorParameterZeroBytes ()
2086
+ public static function GenerateErrorParameterZeroBytes ()
2087
2087
{
2088
2088
$ ErrBytes = 0 ;
2089
2089
// changed $this to self so can work in static context
@@ -2244,7 +2244,7 @@ public function getJobAttributes()
2244
2244
*
2245
2245
* @return string
2246
2246
*/
2247
- static function classPath ()
2247
+ public static function classPath ()
2248
2248
{
2249
2249
return __FILE__ ;
2250
2250
}
@@ -2384,7 +2384,7 @@ protected function extractErrorFromJoblog(array $programsToLookFor)
2384
2384
* @param string $password
2385
2385
* @return boolean True on success, False on failure
2386
2386
*/
2387
- function changeCurrentUser ($ user , $ password )
2387
+ public function changeCurrentUser ($ user , $ password )
2388
2388
{
2389
2389
// Force user/pw to uppercase. (should they?)
2390
2390
// Ask Support team for opinion on uppercase or not.
@@ -2487,7 +2487,7 @@ function changeCurrentUser($user, $password)
2487
2487
* @param mixed|null $default
2488
2488
* @return bool|null
2489
2489
*/
2490
- static function getConfigValue ($ heading , $ key , $ default = null )
2490
+ public static function getConfigValue ($ heading , $ key , $ default = null )
2491
2491
{
2492
2492
// if we haven't read config file yet, do so.
2493
2493
if (!isset (self ::$ _config )) {
@@ -2510,7 +2510,7 @@ static function getConfigValue($heading, $key, $default = null)
2510
2510
*
2511
2511
* @return string
2512
2512
*/
2513
- static function getPhpOperatingSystem () {
2513
+ public static function getPhpOperatingSystem () {
2514
2514
2515
2515
if (!isset (self ::$ _os )) {
2516
2516
self ::$ _os = php_uname ('s ' );
@@ -2524,7 +2524,7 @@ static function getPhpOperatingSystem() {
2524
2524
*
2525
2525
* @return bool
2526
2526
*/
2527
- static function isPhpRunningOnIbmI ()
2527
+ public static function isPhpRunningOnIbmI ()
2528
2528
{
2529
2529
return (self ::getPhpOperatingSystem () == 'OS400 ' );
2530
2530
}
@@ -2539,7 +2539,7 @@ static function isPhpRunningOnIbmI()
2539
2539
*
2540
2540
* @return bool
2541
2541
*/
2542
- static function getPhpCcsid ()
2542
+ public static function getPhpCcsid ()
2543
2543
{
2544
2544
if (isset ($ _SERVER ['CCSID ' ])) {
2545
2545
// web/fastcgi
0 commit comments