aboutsummaryrefslogtreecommitdiffstats
path: root/doc/phpdoc/packages/inc.html
blob: b1e32db6b1faeb72146923a40b05ee7f6270dee6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
    <meta charset="utf-8"/>
    <title>     &raquo; \inc
</title>
    <meta name="author" content=""/>
    <meta name="description" content=""/>

            <link href="../css/template.css" rel="stylesheet" media="all"/>
    
            <!--[if lt IE 9]>
        <script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
        <![endif]-->
        <script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
        <script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
        <script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script>
        <script src="../js/bootstrap.js" type="text/javascript"></script>
        <script src="../js/template.js" type="text/javascript"></script>
        <script src="../js/prettify/prettify.min.js" type="text/javascript"></script>
    
            <link rel="shortcut icon" href="../img/favicon.ico"/>
        <link rel="apple-touch-icon" href="../img/apple-touch-icon.png"/>
        <link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png"/>
        <link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png"/>
    </head>
<body>

        <div class="navbar navbar-fixed-top">
        <div class="navbar-inner">
            <div class="container">
                <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                    <span class="icon-bar"></span> <span class="icon-bar"></span>
                    <span class="icon-bar"></span> </a>
                <a class="brand" href="../index.html">API Documentation</a>

                <div class="nav-collapse">
                    <ul class="nav">
                        <li class="dropdown">
                            <a href="#api" class="dropdown-toggle" data-toggle="dropdown">
                                API Documentation <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                                                                            </ul>
                        </li>
                        <li class="dropdown" id="charts-menu">
                            <a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
                                Charts <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="../graph_class.html">
                                        <i class="icon-list-alt"></i>&#160;Class hierarchy diagram
                                    </a>
                                </li>
                            </ul>
                        </li>
                        <li class="dropdown" id="reports-menu">
                            <a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
                                Reports <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="../errors.html">
                                        <i class="icon-list-alt"></i>&#160;Errors
                                    </a>
                                </li>
                                <li>
                                    <a href="../markers.html">
                                        <i class="icon-list-alt"></i>&#160;Markers
                                    </a>
                                </li>
                                <li>
                                    <a href="../deprecated.html">
                                        <i class="icon-list-alt"></i>&#160;Deprecated
                                    </a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="go_to_top">
            <a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>
        </div>
    </div>
    
    <div id="___" class="container">
        <noscript>
            <div class="alert alert-warning">
                Javascript is disabled; several features are only available if Javascript is enabled.
            </div>
        </noscript>

        
            
    <div class="row">

        <div class="span4">
            <div class="btn-group view pull-right" data-toggle="buttons-radio">
                <button class="btn details" title="Show descriptions and method names">
                    <i class="icon-list"></i></button><button class="btn simple" title="Show only method names">
                    <i class="icon-align-justify"></i>
                </button>
            </div>
            <ul class="side-nav nav nav-list">
                <li class="nav-header">
                    <i class="icon-map-marker"></i> Packages
                </li>
                <a href="../packages/inc.html" title="inc">
                    <i class="icon-th"></i> inc
                </a>
                <ul class="nav nav-list nav-packages">
                        
        <li>
        <a href="../packages/inc.account.inc.html" title="account.inc">
            <i class="icon-th"></i> account.inc
        </a>
        <ul class="nav nav-list nav-packages">
                
    
        </ul>
    </li>
        <li>
        <a href="../packages/inc.craftmine.inc.html" title="craftmine.inc">
            <i class="icon-th"></i> craftmine.inc
        </a>
        <ul class="nav nav-list nav-packages">
                
    
        </ul>
    </li>
        <li>
        <a href="../packages/inc.dungeon.inc.html" title="dungeon.inc">
            <i class="icon-th"></i> dungeon.inc
        </a>
        <ul class="nav nav-list nav-packages">
                
    
        </ul>
    </li>
        <li>
        <a href="../packages/inc.guild.inc.html" title="guild.inc">
            <i class="icon-th"></i> guild.inc
        </a>
        <ul class="nav nav-list nav-packages">
                
    
        </ul>
    </li>
        <li>
        <a href="../packages/inc.Inventory.inc.html" title="Inventory.inc">
            <i class="icon-th"></i> Inventory.inc
        </a>
        <ul class="nav nav-list nav-packages">
                
    
        </ul>
    </li>
        <li>
        <a href="../packages/inc.Item.inc.html" title="Item.inc">
            <i class="icon-th"></i> Item.inc
        </a>
        <ul class="nav nav-list nav-packages">
                
    
        </ul>
    </li>
        <li>
        <a href="../packages/inc.messages.inc.html" title="messages.inc">
            <i class="icon-th"></i> messages.inc
        </a>
        <ul class="nav nav-list nav-packages">
                
    
        </ul>
    </li>
        <li>
        <a href="../packages/inc.mine.inc.html" title="mine.inc">
            <i class="icon-th"></i> mine.inc
        </a>
        <ul class="nav nav-list nav-packages">
                
    
        </ul>
    </li>
        <li>
        <a href="../packages/inc.Monster.inc.html" title="Monster.inc">
            <i class="icon-th"></i> Monster.inc
        </a>
        <ul class="nav nav-list nav-packages">
                
    
        </ul>
    </li>
        <li>
        <a href="../packages/inc.perso.inc.html" title="perso.inc">
            <i class="icon-th"></i> perso.inc
        </a>
        <ul class="nav nav-list nav-packages">
                
    
        </ul>
    </li>
        <li>
        <a href="../packages/inc.savegame.inc.html" title="savegame.inc">
            <i class="icon-th"></i> savegame.inc
        </a>
        <ul class="nav nav-list nav-packages">
                
    
        </ul>
    </li>
        <li>
        <a href="../packages/inc.shop.inc.html" title="shop.inc">
            <i class="icon-th"></i> shop.inc
        </a>
        <ul class="nav nav-list nav-packages">
                
    
        </ul>
    </li>
    
                </ul>
            </ul>
        </div>

        <div class="span8 package-contents">
                
    <ul class="breadcrumb">
        <li><a href="../index.html"><i class="icon-th"></i></a></li>
            
    
    <li>
        <span class="divider">\</span><a href="../packages/inc.html">inc</a>
    </li>

    </ul>

    
                
    <ul class="breadcrumb">
        <li><a href="../index.html"><i class="icon-th"></i></a></li>
            
                
    
    <li>
        <span class="divider">\</span><a href="../packages/inc.html">inc</a>
    </li>

    
    <li>
        <span class="divider">\</span><a href="../packages/inc.Inventory.inc.html">Inventory.inc</a>
    </li>

    </ul>

    
        
        
                    <div class="package-indent">
                <h3><i class="icon-custom icon-class"></i> Classes, interfaces and traits</h3>
                
                
                                        <div id="Inventory" class="element ajax clickable class">
        <h1>Inventory<a href="../classes/Inventory.html"></a></h1>
        <p class="short_description">Represent the player&#039;s Inventory.</p>
        <div class="details collapse">Implemented as a singleton in the session.</div>
        <a href="../classes/Inventory.html" class="more">« More »</a>
    </div>

                            </div>
            
    
                
    <ul class="breadcrumb">
        <li><a href="../index.html"><i class="icon-th"></i></a></li>
            
                
    
    <li>
        <span class="divider">\</span><a href="../packages/inc.html">inc</a>
    </li>

    
    <li>
        <span class="divider">\</span><a href="../packages/inc.dungeon.inc.html">dungeon.inc</a>
    </li>

    </ul>

    
                    <div class="package-indent">
                <h3><i class="icon-custom icon-function"></i> Functions</h3>
                                        <div id="generateMonster" class="element ajax clickable function">
        <h1>generateMonster<a href="../namespaces/default.html#function_generateMonster"></a></h1>
        <p class="short_description">Loads all the dungeon&#039;s monsters from the XML file data/monsters.xml.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_generateMonster" class="more">« More »</a>
    </div>

                                        <div id="initDungeon" class="element ajax clickable function">
        <h1>initDungeon<a href="../namespaces/default.html#function_initDungeon"></a></h1>
        <p class="short_description">Marks the dungeon as accessible in the session.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_initDungeon" class="more">« More »</a>
    </div>

                                        <div id="sendDungeon" class="element ajax clickable function">
        <h1>sendDungeon<a href="../namespaces/default.html#function_sendDungeon"></a></h1>
        <p class="short_description">Returns the dungeon array if it was created.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_sendDungeon" class="more">« More »</a>
    </div>

                                        <div id="buildDungeon" class="element ajax clickable function">
        <h1>buildDungeon<a href="../namespaces/default.html#function_buildDungeon"></a></h1>
        <p class="short_description">Allows acces to the dungeon in the session and sends it to the client.</p>
        <div class="details collapse">Debits the dungeon&#039;s ticket cost from the player&#039;s gold.</div>
        <a href="../namespaces/default.html#function_buildDungeon" class="more">« More »</a>
    </div>

                                        <div id="launchDungeon" class="element ajax clickable function">
        <h1>launchDungeon<a href="../namespaces/default.html#function_launchDungeon"></a></h1>
        <p class="short_description">Sends monsters for a specific floor as specified by the floor POST parameter to the client.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_launchDungeon" class="more">« More »</a>
    </div>

                                        <div id="sendDungeonProgress" class="element ajax clickable function">
        <h1>sendDungeonProgress<a href="../namespaces/default.html#function_sendDungeonProgress"></a></h1>
        <p class="short_description">Updates floor and monster number from the POST parameters in the session.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_sendDungeonProgress" class="more">« More »</a>
    </div>

                                        <div id="exitDungeon" class="element ajax clickable function">
        <h1>exitDungeon<a href="../namespaces/default.html#function_exitDungeon"></a></h1>
        <p class="short_description">Marks the dungeon as not accessible in the session.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_exitDungeon" class="more">« More »</a>
    </div>

                            </div>
        
        
            
    
                
    <ul class="breadcrumb">
        <li><a href="../index.html"><i class="icon-th"></i></a></li>
            
                
    
    <li>
        <span class="divider">\</span><a href="../packages/inc.html">inc</a>
    </li>

    
    <li>
        <span class="divider">\</span><a href="../packages/inc.messages.inc.html">messages.inc</a>
    </li>

    </ul>

    
                    <div class="package-indent">
                <h3><i class="icon-custom icon-function"></i> Functions</h3>
                                        <div id="sendMessage" class="element ajax clickable function">
        <h1>sendMessage<a href="../namespaces/default.html#function_sendMessage"></a></h1>
        <p class="short_description">Sends a message to the client.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_sendMessage" class="more">« More »</a>
    </div>

                                        <div id="sendError" class="element ajax clickable function">
        <h1>sendError<a href="../namespaces/default.html#function_sendError"></a></h1>
        <p class="short_description">Sends an error message to the client.</p>
        <div class="details collapse">Simple wrapper calling sendMessage with &quot;error&quot; as $type.</div>
        <a href="../namespaces/default.html#function_sendError" class="more">« More »</a>
    </div>

                                        <div id="sendInfo" class="element ajax clickable function">
        <h1>sendInfo<a href="../namespaces/default.html#function_sendInfo"></a></h1>
        <p class="short_description">Sends an info message to the client.</p>
        <div class="details collapse">Simple wrapper calling sendMessage with &quot;info&quot; as $type.</div>
        <a href="../namespaces/default.html#function_sendInfo" class="more">« More »</a>
    </div>

                            </div>
        
        
            
    
                
    <ul class="breadcrumb">
        <li><a href="../index.html"><i class="icon-th"></i></a></li>
            
                
    
    <li>
        <span class="divider">\</span><a href="../packages/inc.html">inc</a>
    </li>

    
    <li>
        <span class="divider">\</span><a href="../packages/inc.guild.inc.html">guild.inc</a>
    </li>

    </ul>

    
                    <div class="package-indent">
                <h3><i class="icon-custom icon-function"></i> Functions</h3>
                                        <div id="createGuild" class="element ajax clickable function">
        <h1>createGuild<a href="../namespaces/default.html#function_createGuild"></a></h1>
        <p class="short_description">Create the miners guild in the session.</p>
        <div class="details collapse">Debits GUILD_COST from the player&#039;s gold.</div>
        <a href="../namespaces/default.html#function_createGuild" class="more">« More »</a>
    </div>

                                        <div id="hireMiner" class="element ajax clickable function">
        <h1>hireMiner<a href="../namespaces/default.html#function_hireMiner"></a></h1>
        <p class="short_description">Hire one miner.</p>
        <div class="details collapse">Debits MINER_COST from the player&#039;s gold.</div>
        <a href="../namespaces/default.html#function_hireMiner" class="more">« More »</a>
    </div>

                                        <div id="sendMiners" class="element ajax clickable function">
        <h1>sendMiners<a href="../namespaces/default.html#function_sendMiners"></a></h1>
        <p class="short_description">Returns the number of miners currently in the guild.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_sendMiners" class="more">« More »</a>
    </div>

                            </div>
        
                    <div class="package-indent">
                <h3><i class="icon-custom icon-constant"></i> Constants</h3>
                                        <div id="GUILD_COST" class="element ajax clickable constant">
        <h1>GUILD_COST<a href="../namespaces/default.html#constant_GUILD_COST"></a></h1>
        <p class="short_description">Amount of gold required to build the miners guild.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#constant_GUILD_COST" class="more">« More »</a>
    </div>

                                        <div id="MINER_COST" class="element ajax clickable constant">
        <h1>MINER_COST<a href="../namespaces/default.html#constant_MINER_COST"></a></h1>
        <p class="short_description">Amount of gold required to hire a miner.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#constant_MINER_COST" class="more">« More »</a>
    </div>

                            </div>
        
            
    
                
    <ul class="breadcrumb">
        <li><a href="../index.html"><i class="icon-th"></i></a></li>
            
                
    
    <li>
        <span class="divider">\</span><a href="../packages/inc.html">inc</a>
    </li>

    
    <li>
        <span class="divider">\</span><a href="../packages/inc.savegame.inc.html">savegame.inc</a>
    </li>

    </ul>

    
                    <div class="package-indent">
                <h3><i class="icon-custom icon-function"></i> Functions</h3>
                                        <div id="genXML" class="element ajax clickable function">
        <h1>genXML<a href="../namespaces/default.html#function_genXML"></a></h1>
        <p class="short_description">Recursively generates an XML tree from an array.</p>
        <div class="details collapse">If objects are found, call addToXML() methods which should serialize the object as a child of the XML tree passed as parameter.</div>
        <a href="../namespaces/default.html#function_genXML" class="more">« More »</a>
    </div>

                                        <div id="genSave" class="element ajax clickable function">
        <h1>genSave<a href="../namespaces/default.html#function_genSave"></a></h1>
        <p class="short_description">Generates the XML save tree from the session.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_genSave" class="more">« More »</a>
    </div>

                                        <div id="genFilename" class="element ajax clickable function">
        <h1>genFilename<a href="../namespaces/default.html#function_genFilename"></a></h1>
        <p class="short_description">Generates the save file name using current date/time.</p>
        <div class="details collapse">The date function will use the server&#039;s timezone which could be inconsistent with the client timezone.</div>
        <a href="../namespaces/default.html#function_genFilename" class="more">« More »</a>
    </div>

                                        <div id="saveGame" class="element ajax clickable function">
        <h1>saveGame<a href="../namespaces/default.html#function_saveGame"></a></h1>
        <p class="short_description">Save the XML save tree as an XML file named after the results of genFilename in SAVEDIR.</p>
        <div class="details collapse">Fails and send an error the the client if permissions are incorrectly set. Watch for errors in PHP log.</div>
        <a href="../namespaces/default.html#function_saveGame" class="more">« More »</a>
    </div>

                                        <div id="downSave" class="element ajax clickable function">
        <h1>downSave<a href="../namespaces/default.html#function_downSave"></a></h1>
        <p class="short_description">Sends the current game or a specific save file given by the filename GET parameter to the client.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_downSave" class="more">« More »</a>
    </div>

                                        <div id="listSaves" class="element ajax clickable function">
        <h1>listSaves<a href="../namespaces/default.html#function_listSaves"></a></h1>
        <p class="short_description">Sends the list of available saves to the client.</p>
        <div class="details collapse">Warning: this function changes directory.</div>
        <a href="../namespaces/default.html#function_listSaves" class="more">« More »</a>
    </div>

                                        <div id="parseSave" class="element ajax clickable function">
        <h1>parseSave<a href="../namespaces/default.html#function_parseSave"></a></h1>
        <p class="short_description">Reads an XML tree and deserializes it to an array.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_parseSave" class="more">« More »</a>
    </div>

                                        <div id="deleteSave" class="element ajax clickable function">
        <h1>deleteSave<a href="../namespaces/default.html#function_deleteSave"></a></h1>
        <p class="short_description">Deletes a save file given as the filename POST parameter.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_deleteSave" class="more">« More »</a>
    </div>

                                        <div id="loadSave" class="element ajax clickable function">
        <h1>loadSave<a href="../namespaces/default.html#function_loadSave"></a></h1>
        <p class="short_description">Loads a save file given as the filename POST parameter to the session.</p>
        <div class="details collapse">Empties the session beforehand.</div>
        <a href="../namespaces/default.html#function_loadSave" class="more">« More »</a>
    </div>

                                        <div id="uploadSave" class="element ajax clickable function">
        <h1>uploadSave<a href="../namespaces/default.html#function_uploadSave"></a></h1>
        <p class="short_description">Reads a save file sent by the client.</p>
        <div class="details collapse">Parse the received file then generate it again to clean it for any unwanted
and make sure that it is a valid XML save file.
XML errors are simply ignored and an error is sent to the client if something wrong happens.</div>
        <a href="../namespaces/default.html#function_uploadSave" class="more">« More »</a>
    </div>

                            </div>
        
                    <div class="package-indent">
                <h3><i class="icon-custom icon-constant"></i> Constants</h3>
                                        <div id="SAVEDIR" class="element ajax clickable constant">
        <h1>SAVEDIR<a href="../namespaces/default.html#constant_SAVEDIR"></a></h1>
        <p class="short_description">Directory to save to and load from.</p>
        <div class="details collapse">The PHP/Apache user must have write permission on this directory.
Use the following commands to give write permissions to the http group:
&lt;samp&gt;
sudo chown :http data/save
sudo chmod g+w data/save
&lt;/samp&gt;</div>
        <a href="../namespaces/default.html#constant_SAVEDIR" class="more">« More »</a>
    </div>

                            </div>
        
            
    
                
    <ul class="breadcrumb">
        <li><a href="../index.html"><i class="icon-th"></i></a></li>
            
                
    
    <li>
        <span class="divider">\</span><a href="../packages/inc.html">inc</a>
    </li>

    
    <li>
        <span class="divider">\</span><a href="../packages/inc.shop.inc.html">shop.inc</a>
    </li>

    </ul>

    
                    <div class="package-indent">
                <h3><i class="icon-custom icon-function"></i> Functions</h3>
                                        <div id="loadShop" class="element ajax clickable function">
        <h1>loadShop<a href="../namespaces/default.html#function_loadShop"></a></h1>
        <p class="short_description">Loads all the shop&#039;s items from the XML file data/items.xml.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_loadShop" class="more">« More »</a>
    </div>

                                        <div id="getItem" class="element ajax clickable function">
        <h1>getItem<a href="../namespaces/default.html#function_getItem"></a></h1>
        <p class="short_description">Gets an Item object from the shop from its name.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_getItem" class="more">« More »</a>
    </div>

                                        <div id="initShop" class="element ajax clickable function">
        <h1>initShop<a href="../namespaces/default.html#function_initShop"></a></h1>
        <p class="short_description">Marks the shop as created in the session.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_initShop" class="more">« More »</a>
    </div>

                                        <div id="sendShop" class="element ajax clickable function">
        <h1>sendShop<a href="../namespaces/default.html#function_sendShop"></a></h1>
        <p class="short_description">Returns the shop array if it was created.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_sendShop" class="more">« More »</a>
    </div>

                                        <div id="buildShop" class="element ajax clickable function">
        <h1>buildShop<a href="../namespaces/default.html#function_buildShop"></a></h1>
        <p class="short_description">Creates the shop in the session and sends it to the client.</p>
        <div class="details collapse">Debits the shop&#039;s cost from the player&#039;s gold.</div>
        <a href="../namespaces/default.html#function_buildShop" class="more">« More »</a>
    </div>

                                        <div id="buyItem" class="element ajax clickable function">
        <h1>buyItem<a href="../namespaces/default.html#function_buyItem"></a></h1>
        <p class="short_description">Debits the item&#039;s cost specified as the item POST parameter, adds it to the Inventory and sends it to the client.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_buyItem" class="more">« More »</a>
    </div>

                                        <div id="useItem" class="element ajax clickable function">
        <h1>useItem<a href="../namespaces/default.html#function_useItem"></a></h1>
        <p class="short_description">Invoke useItem on an item passed as the item POST parameter, sends to the client the updated player stats and the item.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_useItem" class="more">« More »</a>
    </div>

                            </div>
        
        
            
    
                
    <ul class="breadcrumb">
        <li><a href="../index.html"><i class="icon-th"></i></a></li>
            
                
    
    <li>
        <span class="divider">\</span><a href="../packages/inc.html">inc</a>
    </li>

    
    <li>
        <span class="divider">\</span><a href="../packages/inc.mine.inc.html">mine.inc</a>
    </li>

    </ul>

    
                    <div class="package-indent">
                <h3><i class="icon-custom icon-function"></i> Functions</h3>
                                        <div id="initCraftMine" class="element ajax clickable function">
        <h1>initCraftMine<a href="../namespaces/default.html#function_initCraftMine"></a></h1>
        <p class="short_description">Initializes the gold amount and miners count in the session.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_initCraftMine" class="more">« More »</a>
    </div>

                                        <div id="withdrawMine" class="element ajax clickable function">
        <h1>withdrawMine<a href="../namespaces/default.html#function_withdrawMine"></a></h1>
        <p class="short_description">Transfers all gold from the mine to the player&#039;s account.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_withdrawMine" class="more">« More »</a>
    </div>

                                        <div id="sendMine" class="element ajax clickable function">
        <h1>sendMine<a href="../namespaces/default.html#function_sendMine"></a></h1>
        <p class="short_description">Returns the amount of gold currently owned by the player.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_sendMine" class="more">« More »</a>
    </div>

                            </div>
        
        
            
    
                
    <ul class="breadcrumb">
        <li><a href="../index.html"><i class="icon-th"></i></a></li>
            
                
    
    <li>
        <span class="divider">\</span><a href="../packages/inc.html">inc</a>
    </li>

    
    <li>
        <span class="divider">\</span><a href="../packages/inc.craftmine.inc.html">craftmine.inc</a>
    </li>

    </ul>

    
                    <div class="package-indent">
                <h3><i class="icon-custom icon-function"></i> Functions</h3>
                                        <div id="sendCraftMine" class="element ajax clickable function">
        <h1>sendCraftMine<a href="../namespaces/default.html#function_sendCraftMine"></a></h1>
        <p class="short_description">Sends all data from previous session on page load.</p>
        <div class="details collapse">All data from the different modules are packed in an array.</div>
        <a href="../namespaces/default.html#function_sendCraftMine" class="more">« More »</a>
    </div>

                            </div>
        
        
            
    
                
    <ul class="breadcrumb">
        <li><a href="../index.html"><i class="icon-th"></i></a></li>
            
                
    
    <li>
        <span class="divider">\</span><a href="../packages/inc.html">inc</a>
    </li>

    
    <li>
        <span class="divider">\</span><a href="../packages/inc.account.inc.html">account.inc</a>
    </li>

    </ul>

    
                    <div class="package-indent">
                <h3><i class="icon-custom icon-function"></i> Functions</h3>
                                        <div id="debitAccount" class="element ajax clickable function">
        <h1>debitAccount<a href="../namespaces/default.html#function_debitAccount"></a></h1>
        <p class="short_description">Debits the account of a certain amount of gold.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_debitAccount" class="more">« More »</a>
    </div>

                                        <div id="creditAccount" class="element ajax clickable function">
        <h1>creditAccount<a href="../namespaces/default.html#function_creditAccount"></a></h1>
        <p class="short_description">Credits the account of a certain amount of gold.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_creditAccount" class="more">« More »</a>
    </div>

                            </div>
        
        
            
    
                
    <ul class="breadcrumb">
        <li><a href="../index.html"><i class="icon-th"></i></a></li>
            
                
    
    <li>
        <span class="divider">\</span><a href="../packages/inc.html">inc</a>
    </li>

    
    <li>
        <span class="divider">\</span><a href="../packages/inc.perso.inc.html">perso.inc</a>
    </li>

    </ul>

    
                    <div class="package-indent">
                <h3><i class="icon-custom icon-function"></i> Functions</h3>
                                        <div id="sendPerso" class="element ajax clickable function">
        <h1>sendPerso<a href="../namespaces/default.html#function_sendPerso"></a></h1>
        <p class="short_description">Returns all player&#039;s stats after initializing them if needed.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_sendPerso" class="more">« More »</a>
    </div>

                                        <div id="increasePerso" class="element ajax clickable function">
        <h1>increasePerso<a href="../namespaces/default.html#function_increasePerso"></a></h1>
        <p class="short_description">Increases a player&#039;s stat.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_increasePerso" class="more">« More »</a>
    </div>

                                        <div id="updatePerso" class="element ajax clickable function">
        <h1>updatePerso<a href="../namespaces/default.html#function_updatePerso"></a></h1>
        <p class="short_description">Copies stats given in POST request to session.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_updatePerso" class="more">« More »</a>
    </div>

                                        <div id="initPerso" class="element ajax clickable function">
        <h1>initPerso<a href="../namespaces/default.html#function_initPerso"></a></h1>
        <p class="short_description">Initializes the player&#039;s stats.</p>
        <div class="details collapse"></div>
        <a href="../namespaces/default.html#function_initPerso" class="more">« More »</a>
    </div>

                            </div>
        
        
            
    
                
    <ul class="breadcrumb">
        <li><a href="../index.html"><i class="icon-th"></i></a></li>
            
                
    
    <li>
        <span class="divider">\</span><a href="../packages/inc.html">inc</a>
    </li>

    
    <li>
        <span class="divider">\</span><a href="../packages/inc.Item.inc.html">Item.inc</a>
    </li>

    </ul>

    
        
        
                    <div class="package-indent">
                <h3><i class="icon-custom icon-class"></i> Classes, interfaces and traits</h3>
                
                
                                        <div id="Item" class="element ajax clickable class">
        <h1>Item<a href="../classes/Item.html"></a></h1>
        <p class="short_description">Represent an Item in the shop or in the Inventory.</p>
        <div class="details collapse"></div>
        <a href="../classes/Item.html" class="more">« More »</a>
    </div>

                            </div>
            
    
                
    <ul class="breadcrumb">
        <li><a href="../index.html"><i class="icon-th"></i></a></li>
            
                
    
    <li>
        <span class="divider">\</span><a href="../packages/inc.html">inc</a>
    </li>

    
    <li>
        <span class="divider">\</span><a href="../packages/inc.Monster.inc.html">Monster.inc</a>
    </li>

    </ul>

    
        
        
                    <div class="package-indent">
                <h3><i class="icon-custom icon-class"></i> Classes, interfaces and traits</h3>
                
                
                                        <div id="Monster" class="element ajax clickable class">
        <h1>Monster<a href="../classes/Monster.html"></a></h1>
        <p class="short_description">Represent an Item in the shop or in the Inventory.</p>
        <div class="details collapse"></div>
        <a href="../classes/Monster.html" class="more">« More »</a>
    </div>

                            </div>
            
    
    
        </div>
    </div>
    </div>

        <footer class="span12">
            Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by
            <a href="http://glyphicons.com/">Glyphicons</a>.<br/>
            Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and<br/>
            generated on Mon, 09 May 2016 14:01:23 +0200.<br/>
    </footer>
    </body>
</html>