Complex classes like System often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use System, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
26 | class System |
||
|
|||
27 | { |
||
28 | /** |
||
29 | * name of the host where phpSysInfo runs |
||
30 | * |
||
31 | * @var String |
||
32 | */ |
||
33 | private $_hostname = "localhost"; |
||
34 | |||
35 | /** |
||
36 | * ip of the host where phpSysInfo runs |
||
37 | * |
||
38 | * @var String |
||
39 | */ |
||
40 | private $_ip = "127.0.0.1"; |
||
41 | |||
42 | /** |
||
43 | * detailed Information about the kernel |
||
44 | * |
||
45 | * @var String |
||
46 | */ |
||
47 | private $_kernel = "Unknown"; |
||
48 | |||
49 | /** |
||
50 | * name of the distribution |
||
51 | * |
||
52 | * @var String |
||
53 | */ |
||
54 | private $_distribution = "Unknown"; |
||
55 | |||
56 | /** |
||
57 | * icon of the distribution (must be available in phpSysInfo) |
||
58 | * |
||
59 | * @var String |
||
60 | */ |
||
61 | private $_distributionIcon = "unknown.png"; |
||
62 | |||
63 | /** |
||
64 | * detailed Information about the machine name |
||
65 | * |
||
66 | * @var String |
||
67 | */ |
||
68 | private $_machine = ""; |
||
69 | |||
70 | /** |
||
71 | * time in sec how long the system is running |
||
72 | * |
||
73 | * @var Integer |
||
74 | */ |
||
75 | private $_uptime = 0; |
||
76 | |||
77 | /** |
||
78 | * count of users that are currently logged in |
||
79 | * |
||
80 | * @var Integer |
||
81 | */ |
||
82 | private $_users = 0; |
||
83 | |||
84 | /** |
||
85 | * load of the system |
||
86 | * |
||
87 | * @var String |
||
88 | */ |
||
89 | private $_load = ""; |
||
90 | |||
91 | /** |
||
92 | * load of the system in percent (all cpus, if more than one) |
||
93 | * |
||
94 | * @var Integer |
||
95 | */ |
||
96 | private $_loadPercent = null; |
||
97 | |||
98 | /** |
||
99 | * array with cpu devices |
||
100 | * |
||
101 | * @see CpuDevice |
||
102 | * |
||
103 | * @var Array |
||
104 | */ |
||
105 | private $_cpus = array(); |
||
106 | |||
107 | /** |
||
108 | * array with network devices |
||
109 | * |
||
110 | * @see NetDevice |
||
111 | * |
||
112 | * @var Array |
||
113 | */ |
||
114 | private $_netDevices = array(); |
||
115 | |||
116 | /** |
||
117 | * array with pci devices |
||
118 | * |
||
119 | * @see HWDevice |
||
120 | * |
||
121 | * @var Array |
||
122 | */ |
||
123 | private $_pciDevices = array(); |
||
124 | |||
125 | /** |
||
126 | * array with ide devices |
||
127 | * |
||
128 | * @see HWDevice |
||
129 | * |
||
130 | * @var Array |
||
131 | */ |
||
132 | private $_ideDevices = array(); |
||
133 | |||
134 | /** |
||
135 | * array with scsi devices |
||
136 | * |
||
137 | * @see HWDevice |
||
138 | * |
||
139 | * @var Array |
||
140 | */ |
||
141 | private $_scsiDevices = array(); |
||
142 | |||
143 | /** |
||
144 | * array with usb devices |
||
145 | * |
||
146 | * @see HWDevice |
||
147 | * |
||
148 | * @var Array |
||
149 | */ |
||
150 | private $_usbDevices = array(); |
||
151 | |||
152 | /** |
||
153 | * array with thunderbolt devices |
||
154 | * |
||
155 | * @see HWDevice |
||
156 | * |
||
157 | * @var Array |
||
158 | */ |
||
159 | private $_tbDevices = array(); |
||
160 | |||
161 | /** |
||
162 | * array with I2C devices |
||
163 | * |
||
164 | * @see HWDevice |
||
165 | * |
||
166 | * @var Array |
||
167 | */ |
||
168 | private $_i2cDevices = array(); |
||
169 | |||
170 | /** |
||
171 | * array with disk devices |
||
172 | * |
||
173 | * @see DiskDevice |
||
174 | * |
||
175 | * @var Array |
||
176 | */ |
||
177 | private $_diskDevices = array(); |
||
178 | |||
179 | /** |
||
180 | * free memory in bytes |
||
181 | * |
||
182 | * @var Integer |
||
183 | */ |
||
184 | private $_memFree = 0; |
||
185 | |||
186 | /** |
||
187 | * total memory in bytes |
||
188 | * |
||
189 | * @var Integer |
||
190 | */ |
||
191 | private $_memTotal = 0; |
||
192 | |||
193 | /** |
||
194 | * used memory in bytes |
||
195 | * |
||
196 | * @var Integer |
||
197 | */ |
||
198 | private $_memUsed = 0; |
||
199 | |||
200 | /** |
||
201 | * used memory by applications in bytes |
||
202 | * |
||
203 | * @var Integer |
||
204 | */ |
||
205 | private $_memApplication = null; |
||
206 | |||
207 | /** |
||
208 | * used memory for buffers in bytes |
||
209 | * |
||
210 | * @var Integer |
||
211 | */ |
||
212 | private $_memBuffer = null; |
||
213 | |||
214 | /** |
||
215 | * used memory for cache in bytes |
||
216 | * |
||
217 | * @var Integer |
||
218 | */ |
||
219 | private $_memCache = null; |
||
220 | |||
221 | /** |
||
222 | * array with swap devices |
||
223 | * |
||
224 | * @see DiskDevice |
||
225 | * |
||
226 | * @var Array |
||
227 | */ |
||
228 | private $_swapDevices = array(); |
||
229 | |||
230 | /** |
||
231 | * array of types of processes |
||
232 | * |
||
233 | * @var Array |
||
234 | */ |
||
235 | private $_processes = array(); |
||
236 | |||
237 | /** |
||
238 | * remove duplicate Entries and Count |
||
239 | * |
||
240 | * @param Array $arrDev list of HWDevices |
||
241 | * |
||
242 | * @see HWDevice |
||
243 | * |
||
244 | * @return Array |
||
245 | */ |
||
246 | public static function removeDupsAndCount($arrDev) |
||
269 | |||
270 | /** |
||
271 | * return percent of used memory |
||
272 | * |
||
273 | * @see System::_memUsed |
||
274 | * @see System::_memTotal |
||
275 | * |
||
276 | * @return Integer |
||
277 | */ |
||
278 | public function getMemPercentUsed() |
||
286 | |||
287 | /** |
||
288 | * return percent of used memory for applications |
||
289 | * |
||
290 | * @see System::_memApplication |
||
291 | * @see System::_memTotal |
||
292 | * |
||
293 | * @return Integer |
||
294 | */ |
||
295 | public function getMemPercentApplication() |
||
307 | |||
308 | /** |
||
309 | * return percent of used memory for cache |
||
310 | * |
||
311 | * @see System::_memCache |
||
312 | * @see System::_memTotal |
||
313 | * |
||
314 | * @return Integer |
||
315 | */ |
||
316 | public function getMemPercentCache() |
||
332 | |||
333 | /** |
||
334 | * return percent of used memory for buffer |
||
335 | * |
||
336 | * @see System::_memBuffer |
||
337 | * @see System::_memTotal |
||
338 | * |
||
339 | * @return Integer |
||
340 | */ |
||
341 | public function getMemPercentBuffer() |
||
363 | |||
364 | /** |
||
365 | * Returns total free swap space |
||
366 | * |
||
367 | * @see System::_swapDevices |
||
368 | * @see DiskDevice::getFree() |
||
369 | * |
||
370 | * @return Integer |
||
371 | */ |
||
372 | public function getSwapFree() |
||
385 | |||
386 | /** |
||
387 | * Returns total swap space |
||
388 | * |
||
389 | * @see System::_swapDevices |
||
390 | * @see DiskDevice::getTotal() |
||
391 | * |
||
392 | * @return Integer |
||
393 | */ |
||
394 | public function getSwapTotal() |
||
407 | |||
408 | /** |
||
409 | * Returns total used swap space |
||
410 | * |
||
411 | * @see System::_swapDevices |
||
412 | * @see DiskDevice::getUsed() |
||
413 | * |
||
414 | * @return Integer |
||
415 | */ |
||
416 | public function getSwapUsed() |
||
429 | |||
430 | /** |
||
431 | * return percent of total swap space used |
||
432 | * |
||
433 | * @see System::getSwapUsed() |
||
434 | * @see System::getSwapTotal() |
||
435 | * |
||
436 | * @return Integer |
||
437 | */ |
||
438 | public function getSwapPercentUsed() |
||
450 | |||
451 | /** |
||
452 | * Returns $_distribution. |
||
453 | * |
||
454 | * @see System::$_distribution |
||
455 | * |
||
456 | * @return String |
||
457 | */ |
||
458 | public function getDistribution() |
||
462 | |||
463 | /** |
||
464 | * Sets $_distribution. |
||
465 | * |
||
466 | * @param String $distribution distributionname |
||
467 | * |
||
468 | * @see System::$_distribution |
||
469 | * |
||
470 | * @return Void |
||
471 | */ |
||
472 | public function setDistribution($distribution) |
||
476 | |||
477 | /** |
||
478 | * Returns $_distributionIcon. |
||
479 | * |
||
480 | * @see System::$_distributionIcon |
||
481 | * |
||
482 | * @return String |
||
483 | */ |
||
484 | public function getDistributionIcon() |
||
488 | |||
489 | /** |
||
490 | * Sets $_distributionIcon. |
||
491 | * |
||
492 | * @param String $distributionIcon distribution icon |
||
493 | * |
||
494 | * @see System::$_distributionIcon |
||
495 | * |
||
496 | * @return Void |
||
497 | */ |
||
498 | public function setDistributionIcon($distributionIcon) |
||
502 | |||
503 | /** |
||
504 | * Returns $_hostname. |
||
505 | * |
||
506 | * @see System::$_hostname |
||
507 | * |
||
508 | * @return String |
||
509 | */ |
||
510 | public function getHostname() |
||
514 | |||
515 | /** |
||
516 | * Sets $_hostname. |
||
517 | * |
||
518 | * @param String $hostname hostname |
||
519 | * |
||
520 | * @see System::$_hostname |
||
521 | * |
||
522 | * @return Void |
||
523 | */ |
||
524 | public function setHostname($hostname) |
||
528 | |||
529 | /** |
||
530 | * Returns $_ip. |
||
531 | * |
||
532 | * @see System::$_ip |
||
533 | * |
||
534 | * @return String |
||
535 | */ |
||
536 | public function getIp() |
||
540 | |||
541 | /** |
||
542 | * Sets $_ip. |
||
543 | * |
||
544 | * @param String $ip IP |
||
545 | * |
||
546 | * @see System::$_ip |
||
547 | * |
||
548 | * @return Void |
||
549 | */ |
||
550 | public function setIp($ip) |
||
554 | |||
555 | /** |
||
556 | * Returns $_kernel. |
||
557 | * |
||
558 | * @see System::$_kernel |
||
559 | * |
||
560 | * @return String |
||
561 | */ |
||
562 | public function getKernel() |
||
566 | |||
567 | /** |
||
568 | * Sets $_kernel. |
||
569 | * |
||
570 | * @param String $kernel kernelname |
||
571 | * |
||
572 | * @see System::$_kernel |
||
573 | * |
||
574 | * @return Void |
||
575 | */ |
||
576 | public function setKernel($kernel) |
||
580 | |||
581 | /** |
||
582 | * Returns $_load. |
||
583 | * |
||
584 | * @see System::$_load |
||
585 | * |
||
586 | * @return String |
||
587 | */ |
||
588 | public function getLoad() |
||
592 | |||
593 | /** |
||
594 | * Sets $_load. |
||
595 | * |
||
596 | * @param String $load current system load |
||
597 | * |
||
598 | * @see System::$_load |
||
599 | * |
||
600 | * @return Void |
||
601 | */ |
||
602 | public function setLoad($load) |
||
606 | |||
607 | /** |
||
608 | * Returns $_loadPercent. |
||
609 | * |
||
610 | * @see System::$_loadPercent |
||
611 | * |
||
612 | * @return Integer |
||
613 | */ |
||
614 | public function getLoadPercent() |
||
618 | |||
619 | /** |
||
620 | * Sets $_loadPercent. |
||
621 | * |
||
622 | * @param Integer $loadPercent load percent |
||
623 | * |
||
624 | * @see System::$_loadPercent |
||
625 | * |
||
626 | * @return Void |
||
627 | */ |
||
628 | public function setLoadPercent($loadPercent) |
||
632 | |||
633 | /** |
||
634 | * Returns $_machine. |
||
635 | * |
||
636 | * @see System::$_machine |
||
637 | * |
||
638 | * @return String |
||
639 | */ |
||
640 | public function getMachine() |
||
644 | |||
645 | /** |
||
646 | * Sets $_machine. |
||
647 | * |
||
648 | * @param Interger $machine machine |
||
649 | * |
||
650 | * @see System::$_machine |
||
651 | * |
||
652 | * @return Void |
||
653 | */ |
||
654 | public function setMachine($machine) |
||
658 | |||
659 | /** |
||
660 | * Returns $_uptime. |
||
661 | * |
||
662 | * @see System::$_uptime |
||
663 | * |
||
664 | * @return Integer |
||
665 | */ |
||
666 | public function getUptime() |
||
670 | |||
671 | /** |
||
672 | * Sets $_uptime. |
||
673 | * |
||
674 | * @param Interger $uptime uptime |
||
675 | * |
||
676 | * @see System::$_uptime |
||
677 | * |
||
678 | * @return Void |
||
679 | */ |
||
680 | public function setUptime($uptime) |
||
684 | |||
685 | /** |
||
686 | * Returns $_users. |
||
687 | * |
||
688 | * @see System::$_users |
||
689 | * |
||
690 | * @return Integer |
||
691 | */ |
||
692 | public function getUsers() |
||
696 | |||
697 | /** |
||
698 | * Sets $_users. |
||
699 | * |
||
700 | * @param Integer $users user count |
||
701 | * |
||
702 | * @see System::$_users |
||
703 | * |
||
704 | * @return Void |
||
705 | */ |
||
706 | public function setUsers($users) |
||
710 | |||
711 | /** |
||
712 | * Returns $_cpus. |
||
713 | * |
||
714 | * @see System::$_cpus |
||
715 | * |
||
716 | * @return Array |
||
717 | */ |
||
718 | public function getCpus() |
||
722 | |||
723 | /** |
||
724 | * Sets $_cpus. |
||
725 | * |
||
726 | * @param Cpu $cpus cpu device |
||
727 | * |
||
728 | * @see System::$_cpus |
||
729 | * @see CpuDevice |
||
730 | * |
||
731 | * @return Void |
||
732 | */ |
||
733 | public function setCpus($cpus) |
||
737 | |||
738 | /** |
||
739 | * Returns $_netDevices. |
||
740 | * |
||
741 | * @see System::$_netDevices |
||
742 | * |
||
743 | * @return Array |
||
744 | */ |
||
745 | public function getNetDevices() |
||
749 | |||
750 | /** |
||
751 | * Sets $_netDevices. |
||
752 | * |
||
753 | * @param NetDevice $netDevices network device |
||
754 | * |
||
755 | * @see System::$_netDevices |
||
756 | * @see NetDevice |
||
757 | * |
||
758 | * @return Void |
||
759 | */ |
||
760 | public function setNetDevices($netDevices) |
||
764 | |||
765 | /** |
||
766 | * Returns $_pciDevices. |
||
767 | * |
||
768 | * @see System::$_pciDevices |
||
769 | * |
||
770 | * @return Array |
||
771 | */ |
||
772 | public function getPciDevices() |
||
776 | |||
777 | /** |
||
778 | * Sets $_pciDevices. |
||
779 | * |
||
780 | * @param HWDevice $pciDevices pci device |
||
781 | * |
||
782 | * @see System::$_pciDevices |
||
783 | * @see HWDevice |
||
784 | * |
||
785 | * @return Void |
||
786 | */ |
||
787 | public function setPciDevices($pciDevices) |
||
791 | |||
792 | /** |
||
793 | * Returns $_ideDevices. |
||
794 | * |
||
795 | * @see System::$_ideDevices |
||
796 | * |
||
797 | * @return Array |
||
798 | */ |
||
799 | public function getIdeDevices() |
||
803 | |||
804 | /** |
||
805 | * Sets $_ideDevices. |
||
806 | * |
||
807 | * @param HWDevice $ideDevices ide device |
||
808 | * |
||
809 | * @see System::$_ideDevices |
||
810 | * @see HWDevice |
||
811 | * |
||
812 | * @return Void |
||
813 | */ |
||
814 | public function setIdeDevices($ideDevices) |
||
818 | |||
819 | /** |
||
820 | * Returns $_scsiDevices. |
||
821 | * |
||
822 | * @see System::$_scsiDevices |
||
823 | * |
||
824 | * @return Array |
||
825 | */ |
||
826 | public function getScsiDevices() |
||
830 | |||
831 | /** |
||
832 | * Sets $_scsiDevices. |
||
833 | * |
||
834 | * @param HWDevice $scsiDevices scsi devices |
||
835 | * |
||
836 | * @see System::$_scsiDevices |
||
837 | * @see HWDevice |
||
838 | * |
||
839 | * @return Void |
||
840 | */ |
||
841 | public function setScsiDevices($scsiDevices) |
||
845 | |||
846 | /** |
||
847 | * Returns $_usbDevices. |
||
848 | * |
||
849 | * @see System::$_usbDevices |
||
850 | * |
||
851 | * @return Array |
||
852 | */ |
||
853 | public function getUsbDevices() |
||
857 | |||
858 | /** |
||
859 | * Sets $_usbDevices. |
||
860 | * |
||
861 | * @param HWDevice $usbDevices usb device |
||
862 | * |
||
863 | * @see System::$_usbDevices |
||
864 | * @see HWDevice |
||
865 | * |
||
866 | * @return Void |
||
867 | */ |
||
868 | public function setUsbDevices($usbDevices) |
||
872 | |||
873 | /** |
||
874 | * Returns $_tbDevices. |
||
875 | * |
||
876 | * @see System::$_tbDevices |
||
877 | * |
||
878 | * @return Array |
||
879 | */ |
||
880 | public function getTbDevices() |
||
884 | |||
885 | /** |
||
886 | * Sets $_tbDevices. |
||
887 | * |
||
888 | * @param HWDevice $tbDevices thunderbolt device |
||
889 | * |
||
890 | * @see System::$_tbDevices |
||
891 | * @see HWDevice |
||
892 | * |
||
893 | * @return Void |
||
894 | */ |
||
895 | public function setTbDevices($tbDevices) |
||
899 | |||
900 | /** |
||
901 | * Returns $_i2cDevices. |
||
902 | * |
||
903 | * @see System::$_i2cDevices |
||
904 | * |
||
905 | * @return Array |
||
906 | */ |
||
907 | public function getI2cDevices() |
||
911 | |||
912 | /** |
||
913 | * Sets $_i2cDevices. |
||
914 | * |
||
915 | * @param HWDevice $i2cDevices I2C device |
||
916 | * |
||
917 | * @see System::$_i2cDevices |
||
918 | * @see HWDevice |
||
919 | * |
||
920 | * @return Void |
||
921 | */ |
||
922 | public function setI2cDevices($i2cDevices) |
||
926 | |||
927 | /** |
||
928 | * Returns $_diskDevices. |
||
929 | * |
||
930 | * @see System::$_diskDevices |
||
931 | * |
||
932 | * @return Array |
||
933 | */ |
||
934 | public function getDiskDevices() |
||
938 | |||
939 | /** |
||
940 | * Sets $_diskDevices. |
||
941 | * |
||
942 | * @param DiskDevice $diskDevices disk device |
||
943 | * |
||
944 | * @see System::$_diskDevices |
||
945 | * @see DiskDevice |
||
946 | * |
||
947 | * @return void |
||
948 | */ |
||
949 | public function setDiskDevices($diskDevices) |
||
953 | |||
954 | /** |
||
955 | * Returns $_memApplication. |
||
956 | * |
||
957 | * @see System::$_memApplication |
||
958 | * |
||
959 | * @return Integer |
||
960 | */ |
||
961 | public function getMemApplication() |
||
965 | |||
966 | /** |
||
967 | * Sets $_memApplication. |
||
968 | * |
||
969 | * @param Integer $memApplication application memory |
||
970 | * |
||
971 | * @see System::$_memApplication |
||
972 | * |
||
973 | * @return Void |
||
974 | */ |
||
975 | public function setMemApplication($memApplication) |
||
979 | |||
980 | /** |
||
981 | * Returns $_memBuffer. |
||
982 | * |
||
983 | * @see System::$_memBuffer |
||
984 | * |
||
985 | * @return Integer |
||
986 | */ |
||
987 | public function getMemBuffer() |
||
991 | |||
992 | /** |
||
993 | * Sets $_memBuffer. |
||
994 | * |
||
995 | * @param Integer $memBuffer buffer memory |
||
996 | * |
||
997 | * @see System::$_memBuffer |
||
998 | * |
||
999 | * @return Void |
||
1000 | */ |
||
1001 | public function setMemBuffer($memBuffer) |
||
1005 | |||
1006 | /** |
||
1007 | * Returns $_memCache. |
||
1008 | * |
||
1009 | * @see System::$_memCache |
||
1010 | * |
||
1011 | * @return Integer |
||
1012 | */ |
||
1013 | public function getMemCache() |
||
1017 | |||
1018 | /** |
||
1019 | * Sets $_memCache. |
||
1020 | * |
||
1021 | * @param Integer $memCache cache memory |
||
1022 | * |
||
1023 | * @see System::$_memCache |
||
1024 | * |
||
1025 | * @return Void |
||
1026 | */ |
||
1027 | public function setMemCache($memCache) |
||
1031 | |||
1032 | /** |
||
1033 | * Returns $_memFree. |
||
1034 | * |
||
1035 | * @see System::$_memFree |
||
1036 | * |
||
1037 | * @return Integer |
||
1038 | */ |
||
1039 | public function getMemFree() |
||
1043 | |||
1044 | /** |
||
1045 | * Sets $_memFree. |
||
1046 | * |
||
1047 | * @param Integer $memFree free memory |
||
1048 | * |
||
1049 | * @see System::$_memFree |
||
1050 | * |
||
1051 | * @return Void |
||
1052 | */ |
||
1053 | public function setMemFree($memFree) |
||
1057 | |||
1058 | /** |
||
1059 | * Returns $_memTotal. |
||
1060 | * |
||
1061 | * @see System::$_memTotal |
||
1062 | * |
||
1063 | * @return Integer |
||
1064 | */ |
||
1065 | public function getMemTotal() |
||
1069 | |||
1070 | /** |
||
1071 | * Sets $_memTotal. |
||
1072 | * |
||
1073 | * @param Integer $memTotal total memory |
||
1074 | * |
||
1075 | * @see System::$_memTotal |
||
1076 | * |
||
1077 | * @return Void |
||
1078 | */ |
||
1079 | public function setMemTotal($memTotal) |
||
1083 | |||
1084 | /** |
||
1085 | * Returns $_memUsed. |
||
1086 | * |
||
1087 | * @see System::$_memUsed |
||
1088 | * |
||
1089 | * @return Integer |
||
1090 | */ |
||
1091 | public function getMemUsed() |
||
1095 | |||
1096 | /** |
||
1097 | * Sets $_memUsed. |
||
1098 | * |
||
1099 | * @param Integer $memUsed used memory |
||
1100 | * |
||
1101 | * @see System::$_memUsed |
||
1102 | * |
||
1103 | * @return Void |
||
1104 | */ |
||
1105 | public function setMemUsed($memUsed) |
||
1109 | |||
1110 | /** |
||
1111 | * Returns $_swapDevices. |
||
1112 | * |
||
1113 | * @see System::$_swapDevices |
||
1114 | * |
||
1115 | * @return Array |
||
1116 | */ |
||
1117 | public function getSwapDevices() |
||
1121 | |||
1122 | /** |
||
1123 | * Sets $_swapDevices. |
||
1124 | * |
||
1125 | * @param DiskDevice $swapDevices swap devices |
||
1126 | * |
||
1127 | * @see System::$_swapDevices |
||
1128 | * @see DiskDevice |
||
1129 | * |
||
1130 | * @return Void |
||
1131 | */ |
||
1132 | public function setSwapDevices($swapDevices) |
||
1136 | |||
1137 | /** |
||
1138 | * Returns $_processes. |
||
1139 | * |
||
1140 | * @see System::$_processes |
||
1141 | * |
||
1142 | * @return Array |
||
1143 | */ |
||
1144 | public function getProcesses() |
||
1148 | |||
1149 | /** |
||
1150 | * Sets $_proceses. |
||
1151 | * |
||
1152 | * @param $processes array of types of processes |
||
1153 | * |
||
1154 | * @see System::$_processes |
||
1155 | * |
||
1156 | * @return Void |
||
1157 | */ |
||
1158 | public function setProcesses($processes) |
||
1167 | } |
||
1168 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.