Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Normand Erwan
VVVVVV_level_merger
Commits
8eb2d849
Commit
8eb2d849
authored
Jun 01, 2015
by
Erwan Normand
Browse files
Contents contents arrays
parent
68561fb5
Changes
2
Hide whitespace changes
Inline
Side-by-side
model/Contents.class.php
View file @
8eb2d849
...
...
@@ -2,19 +2,31 @@
class
Contents
{
private
static
$tabwidth
=
40
;
private
static
$tabheight
=
31
;
private
$mapwidth
;
private
$mapheight
;
private
$contentsRaw
;
private
$contents
;
public
function
__construct
()
{
$this
->
contents
=
null
;
$this
->
contents
Raw
=
null
;
$this
->
mapwidth
=
5
;
$this
->
mapheight
=
5
;
$this
->
contents
=
array
(
array
(
array
(),
array
(),
array
(),
array
(),
array
()),
array
(
array
(),
array
(),
array
(),
array
(),
array
()),
array
(
array
(),
array
(),
array
(),
array
(),
array
()),
array
(
array
(),
array
(),
array
(),
array
(),
array
()),
array
(
array
(),
array
(),
array
(),
array
(),
array
()));
// coucou :)
}
public
function
importXML
(
$string
)
{
$xml
=
simplexml_load_string
(
$string
);
$this
->
content
=
$xml
->
Data
->
contents
->
__toString
();
$this
->
contentsRaw
=
$xml
->
Data
->
contents
->
__toString
();
$contents
=
explode
(
','
,
$this
->
contentsRaw
);
}
public
function
setContents
(
$contents
)
{
...
...
test.php
View file @
8eb2d849
...
...
@@ -431,4 +431,4 @@
echo
'coucou'
;
$contents
=
new
Contents
();
$contents
->
importXML
(
$xml
);
echo
'coucou'
;
\ No newline at end of file
//echo 'coucou';
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment