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
Mathieu Loiseau
MagicWord
Commits
93bd1cc9
Commit
93bd1cc9
authored
May 16, 2019
by
Sylvain Hatier
Committed by
Arnaud Bey
Jul 19, 2019
Browse files
Fix Combo, interface Admin
parent
5428857a
Changes
21
Hide whitespace changes
Inline
Side-by-side
application/src/LexiconBundle/Command/DeleteLexiconCommand.php
View file @
93bd1cc9
...
...
@@ -106,6 +106,8 @@ class DeleteLexiconCommand extends ContainerAwareCommand
$fileSystem
->
remove
(
$bigramPath
);
$output
->
writeln
(
'<comment>Suppression fichier bigrammes</comment>'
);
//TODO supp acquisition, et rules (ComboPoints et WordLength)
$output
->
writeln
(
'<info>########### SUPPRESSION LANGUE OK ############</info>'
);
}
else
{
echo
'Argument missing'
;
...
...
application/src/LexiconBundle/Entity/Language.php
View file @
93bd1cc9
...
...
@@ -2,6 +2,7 @@
namespace
LexiconBundle\Entity
;
use
MagicWordBundle\Entity\Rules\ComboPoints
;
use
MagicWordBundle\Entity\Rules\WordLength
;
use
Doctrine\Common\Collections\ArrayCollection
;
use
Doctrine\Common\Collections\Collection
;
...
...
@@ -25,6 +26,8 @@ class Language
*/
private
$value
;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
...
...
@@ -55,6 +58,11 @@ class Language
*/
private
$wordLengths
;
/**
* @ORM\OneToMany(targetEntity="MagicWordBundle\Entity\Rules\ComboPoints", mappedBy="language", cascade={"remove"})
*/
private
$comboPoints
;
/**
* @ORM\Column(type="string", length=255)
*/
...
...
@@ -66,6 +74,7 @@ class Language
$this
->
features
=
new
ArrayCollection
();
$this
->
letters
=
new
ArrayCollection
();
$this
->
wordLengths
=
new
ArrayCollection
();
$this
->
comboPoints
=
new
ArrayCollection
();
}
public
function
getId
():
?int
...
...
@@ -214,6 +223,38 @@ class Language
return
$this
;
}
/**
* @return Collection|ComboPoints[]
*/
public
function
getComboPoints
():
Collection
{
return
$this
->
comboPoints
;
}
public
function
addComboPoints
(
ComboPoints
$comboPoints
):
self
{
if
(
!
$this
->
comboPoints
->
contains
(
$comboPoints
))
{
$this
->
comboPoints
[]
=
$comboPoints
;
$comboPoints
->
setLanguage
(
$this
);
}
return
$this
;
}
public
function
removeComboPoints
(
ComboPoints
$comboPoints
):
self
{
if
(
$this
->
comboPoints
->
contains
(
$comboPoints
))
{
$this
->
comboPoints
->
removeElement
(
$comboPoints
);
// set the owning side to null (unless already changed)
if
(
$comboPoints
->
getLanguage
()
===
$this
)
{
$comboPoints
->
setLanguage
(
null
);
}
}
return
$this
;
}
public
function
getDirectory
():
?string
{
return
$this
->
directory
;
...
...
@@ -225,4 +266,31 @@ class Language
return
$this
;
}
/**
* Add comboPoint.
*
* @param \MagicWordBundle\Entity\Rules\ComboPoints $comboPoint
*
* @return Language
*/
public
function
addComboPoint
(
\
MagicWordBundle\Entity\Rules\ComboPoints
$comboPoint
)
{
$this
->
comboPoints
[]
=
$comboPoint
;
return
$this
;
}
/**
* Remove comboPoint.
*
* @param \MagicWordBundle\Entity\Rules\ComboPoints $comboPoint
*
* @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
*/
public
function
removeComboPoint
(
\
MagicWordBundle\Entity\Rules\ComboPoints
$comboPoint
)
{
return
$this
->
comboPoints
->
removeElement
(
$comboPoint
);
}
}
application/src/LexiconBundle/Entity/Word.php
View file @
93bd1cc9
...
...
@@ -46,10 +46,7 @@ class Word implements JsonSerializable
*/
private
$root
;
/**
* @ORM\Column(type="integer")
*/
private
$points
;
public
function
__construct
()
{
...
...
@@ -135,17 +132,6 @@ class Word implements JsonSerializable
return
$this
;
}
public
function
getPoints
():
?int
{
return
$this
->
points
;
}
public
function
setPoints
(
int
$points
):
self
{
$this
->
points
=
$points
;
return
$this
;
}
public
function
jsonSerialize
()
{
...
...
application/src/LexiconBundle/Manager/ImportManager.php
View file @
93bd1cc9
...
...
@@ -16,7 +16,7 @@ class ImportManager
private
$fm
;
private
$lm
;
private
$rm
;
private
$
wlm
;
private
$
rulesManager
;
private
$em
;
private
$letterm
;
private
$bgm
;
...
...
@@ -31,10 +31,10 @@ class ImportManager
* "rm" = @DI\Inject("lexicon_manager.root"),
* "bgm" = @DI\Inject("lexicon_manager.bigram"),
* "letterm" = @DI\Inject("lexicon_manager.letter"),
* "
wlm
" = @DI\Inject("mw_manager.
wordLength
"),
* "
rulesManager
" = @DI\Inject("mw_manager.
rules
"),
* })
*/
public
function
__construct
(
$dir
,
$em
,
$wm
,
$fm
,
$lm
,
$rm
,
$
wlm
,
$bgm
,
$letterm
)
public
function
__construct
(
$dir
,
$em
,
$wm
,
$fm
,
$lm
,
$rm
,
$
rulesManager
,
$bgm
,
$letterm
)
{
$this
->
dir
=
$dir
;
$this
->
em
=
$em
;
...
...
@@ -44,7 +44,7 @@ class ImportManager
$this
->
rm
=
$rm
;
$this
->
bgm
=
$bgm
;
$this
->
letterm
=
$letterm
;
$this
->
wlm
=
$wlm
;
$this
->
rulesManager
=
$rulesManager
;
}
public
function
importLexicon
(
$pathLexiconDir
)
...
...
@@ -71,6 +71,7 @@ class ImportManager
$rewriteTo
=
[];
$weights
=
[];
$lengths
=
[];
$combos
=
[];
$languageProperty
=
[];
$languageProperty
[
"directory"
]
=
$pathLexiconDir
;
$specs
[
"directory"
]
=
$pathLexiconDir
;
...
...
@@ -106,7 +107,14 @@ class ImportManager
foreach
(
$weightsNLengths
as
$weightsNLength
)
{
$tab
=
explode
(
"="
,
$weightsNLength
);
$lengths
[
$tab
[
0
]]
=
$tab
[
1
];
$this
->
wlm
->
findOrCreate
(
$language
,
$tab
[
0
],
$tab
[
1
]);
$this
->
rulesManager
->
findOrCreateWordLength
(
$language
,
$tab
[
0
],
$tab
[
1
]);
}
}
elseif
(
preg_match_all
(
"/^COMBOPOINTS:(.+)\s*$/"
,
$line
,
$matches
))
{
$comboNpoints
=
explode
(
","
,
$matches
[
1
][
0
]);
foreach
(
$comboNpoints
as
$comboNpoint
)
{
$tab
=
explode
(
"="
,
$comboNpoint
);
$combos
[
$tab
[
0
]]
=
$tab
[
1
];
$this
->
rulesManager
->
findOrCreateCombo
(
$language
,
$tab
[
0
],
$tab
[
1
]);
}
}
}
...
...
@@ -114,6 +122,7 @@ class ImportManager
$specs
[
"rewriteTo"
]
=
$rewriteTo
;
$specs
[
"weights"
]
=
$weights
;
$specs
[
"lengths"
]
=
$lengths
;
$specs
[
"combos"
]
=
$combos
;
return
$specs
;
}
...
...
@@ -154,8 +163,6 @@ class ImportManager
$string2print
.
=
" / EREGI = "
.
$cleanWordValue
.
"
\n
"
;
// Gestion de la root
$root
=
$this
->
rm
->
findOrCreate
(
$language
,
$rootValue
,
$roots
);
// Gestion des points
$points
=
$this
->
wm
->
calculatePoints
(
$cleanWordValue
,
$weights
,
$lengths
);
// Gestion des features
$labelsNValues
=
explode
(
","
,
$matches
[
3
][
0
]);
...
...
@@ -164,7 +171,7 @@ class ImportManager
$featureStringTab
=
explode
(
"="
,
$labelNValue
);
$features
[]
=
$this
->
fm
->
findOrCreate
(
$language
,
$featureStringTab
[
0
],
$featureStringTab
[
1
]);
}
$this
->
wm
->
create
(
$language
,
$root
,
$features
,
$wordValue
,
$cleanWordValue
,
$points
);
$this
->
wm
->
create
(
$language
,
$root
,
$features
,
$wordValue
,
$cleanWordValue
);
// Gestion des lettres et débuts de mots
$wordsLetters
=
preg_split
(
'//u'
,
$cleanWordValue
,
null
,
PREG_SPLIT_NO_EMPTY
);
...
...
application/src/LexiconBundle/Manager/WordManager.php
View file @
93bd1cc9
...
...
@@ -3,8 +3,10 @@
namespace
LexiconBundle\Manager
;
use
LexiconBundle\Entity\Language
;
use
LexiconBundle\Entity\Letter
;
use
LexiconBundle\Entity\Word
;
use
LexiconBundle\Entity\WordStart
;
use
MagicWordBundle\Entity\Rules\WordLength
;
use
JMS\DiExtraBundle\Annotation
as
DI
;
/**
...
...
@@ -24,7 +26,7 @@ class WordManager
$this
->
em
=
$em
;
}
public
function
create
(
Language
$language
,
$root
,
$features
,
$value
,
$cleanValue
,
$points
)
public
function
create
(
Language
$language
,
$root
,
$features
,
$value
,
$cleanValue
)
{
$word
=
new
Word
;
$word
->
setLanguage
(
$language
);
...
...
@@ -34,7 +36,6 @@ class WordManager
}
$word
->
setValue
(
$value
);
$word
->
setCleanValue
(
$cleanValue
);
$word
->
setPoints
(
$points
);
$this
->
em
->
persist
(
$word
);
...
...
@@ -65,21 +66,25 @@ class WordManager
return
;
}
public
function
calculatePoints
(
$str
,
$weights
,
$lengths
)
public
function
recalculate
(
Word
$word
)
{
$points
=
0
;
$language
=
$word
->
getLanguage
();
$wordPoints
=
0
;
$str
=
$word
->
getCleanValue
();
$chars
=
preg_split
(
'//u'
,
$str
,
null
,
PREG_SPLIT_NO_EMPTY
);
foreach
(
$chars
as
$char
)
{
$points
+=
(
isset
(
$weights
[
$char
]))
?
$weights
[
$char
]
:
1
;
if
(
$pointChar
=
$this
->
em
->
getRepository
(
Letter
::
class
)
->
findOneBy
([
"language"
=>
$language
,
"value"
=>
$char
]))
{
$wordPoints
+=
$pointChar
->
getPoints
();
}
else
{
$wordPoints
+=
1
;
}
}
$length
=
mb_strlen
(
$str
);
$point
s
+=
(
isset
(
$lengths
[
$length
]))
?
$
lengths
[
$length
]
:
$length
;
if
(
$point
Length
=
$this
->
em
->
getRepository
(
WordLength
::
class
)
->
findOneBy
([
"language"
=>
$language
,
"length"
=>
$length
]))
{
$
wordPoints
+=
$pointLength
->
getPoints
();
}
return
$
p
oints
;
return
$
wordP
oints
;
}
}
application/src/MagicWordBundle/Controller/ActivityController.php
View file @
93bd1cc9
...
...
@@ -69,11 +69,12 @@ class ActivityController extends Controller
/**
* @Route("/add-combo-points/round/{roundId}/length/{length}", name="add_combopoints", options={"expose"=true})
* @ParamConverter("round", class="MagicWordBundle:Round", options={"id" = "roundId"})
* @ParamConverter("comboPoints", class="MagicWordBundle:Rules\ComboPoints", options={"length" = "length"})
* @Method("POST")
*/
public
function
addComboPointsAction
(
Round
$round
,
ComboPoints
$comboPoints
)
public
function
addComboPointsAction
(
Round
$round
,
$length
)
{
$language
=
$round
->
getLanguage
();
$comboPoints
=
$this
->
getDoctrine
()
->
getRepository
(
'MagicWordBundle:Rules\ComboPoints'
)
->
findOneBy
([
"length"
=>
$length
,
"language"
=>
$language
]);
$this
->
get
(
'mw_manager.activity'
)
->
addComboPoints
(
$round
,
$comboPoints
);
return
new
JsonResponse
([
'points'
=>
$comboPoints
->
getPoints
()]);
...
...
@@ -82,11 +83,12 @@ class ActivityController extends Controller
/**
* @Route("/save-combo-finished/round/{roundId}/length/{length}", name="save_combo_finished", options={"expose"=true})
* @ParamConverter("round", class="MagicWordBundle:Round", options={"id" = "roundId"})
* @ParamConverter("comboPoints", class="MagicWordBundle:Rules\ComboPoints", options={"length" = "length"})
* @Method("POST")
*/
public
function
saveComboFinishedAction
(
Round
$round
,
ComboPoints
$comboPoints
)
public
function
saveComboFinishedAction
(
Round
$round
,
$length
)
{
$language
=
$round
->
getLanguage
();
$comboPoints
=
$this
->
getDoctrine
()
->
getRepository
(
'MagicWordBundle:Rules\ComboPoints'
)
->
findOneBy
([
"length"
=>
$length
,
"language"
=>
$language
]);
$this
->
get
(
'mw_manager.activity'
)
->
saveComboFinished
(
$round
,
$comboPoints
);
return
new
JsonResponse
([
'points'
=>
$comboPoints
->
getPoints
()]);
...
...
application/src/MagicWordBundle/Controller/AdministrationController.php
View file @
93bd1cc9
...
...
@@ -2,9 +2,10 @@
namespace
MagicWordBundle\Controller
;
use
MagicWordBundle\Entity\Letter\LetterLanguage
;
use
LexiconBundle\Entity\Language
;
use
LexiconBundle\Entity\Letter
;
use
MagicWordBundle\Entity\Rules\ComboPoints
;
use
MagicWordBundle\Entity\Rules\WordLength
Points
;
use
MagicWordBundle\Entity\Rules\WordLength
;
use
Sensio\Bundle\FrameworkExtraBundle\Configuration\Method
;
use
Sensio\Bundle\FrameworkExtraBundle\Configuration\Route
;
use
Symfony\Bundle\FrameworkBundle\Controller\Controller
;
...
...
@@ -13,7 +14,7 @@ use Symfony\Component\HttpFoundation\Request;
class
AdministrationController
extends
Controller
{
/**
* @Route("/administration
/index
", name="admin_index")
* @Route("/administration", name="admin_index")
*/
public
function
indexAction
()
{
...
...
@@ -21,101 +22,98 @@ class AdministrationController extends Controller
}
/**
* @Route("/administration/wordlength
point
s", name="wordlength
point
s")
* @Route("/administration/
{id}/
wordlengths", name="wordlengths")
*/
public
function
wordLength
Points
Action
()
public
function
wordLengthAction
(
Language
$language
)
{
$wordlength
point
s
=
$this
->
getDoctrine
()
->
getRepository
(
'MagicWordBundle:Rules\WordLengthPoints'
)
->
findAll
(
);
$wordlengths
=
$this
->
getDoctrine
()
->
getRepository
(
WordLength
::
class
)
->
findByLanguage
(
$language
);
return
$this
->
render
(
'MagicWordBundle:Administration:wordlength
points
.html.twig'
,
[
'wordlength
point
s'
=>
$wordlength
point
s
]);
return
$this
->
render
(
'MagicWordBundle:Administration:wordlength.html.twig'
,
[
'wordlengths'
=>
$wordlengths
]);
}
/**
* @Route("/administration/combopoints", name="combopoints")
* @Route("/administration/
{id}/
combopoints", name="combopoints")
*/
public
function
comboPointsAction
()
public
function
comboPointsAction
(
Language
$language
)
{
$combopoints
=
$this
->
getDoctrine
()
->
getRepository
(
'MagicWordBundle:Rules\ComboPoints'
)
->
findAll
(
);
$combopoints
=
$this
->
getDoctrine
()
->
getRepository
(
ComboPoints
::
class
)
->
findByLanguage
(
$language
);
return
$this
->
render
(
'MagicWordBundle:Administration:combopoints.html.twig'
,
[
'combopoints'
=>
$combopoints
]);
}
/**
* @Route("/administration/wordlength
points
/{id}", name="wordlength
point
_edit")
* @Route("/administration/wordlength/{id}", name="wordlength_edit")
* @Method("GET")
*/
public
function
wordLength
Point
EditAction
(
WordLength
Points
$wordlength
point
)
public
function
wordLengthEditAction
(
WordLength
$wordlength
)
{
$form
=
$this
->
get
(
'mw_manager.
administration
'
)
->
getWordLength
Point
Form
(
$wordlength
point
);
$form
=
$this
->
get
(
'mw_manager.
rules
'
)
->
getWordLengthForm
(
$wordlength
);
return
$this
->
render
(
'MagicWordBundle:Administration:wordlength
point
-edit.html.twig'
,
[
'form'
=>
$form
,
'wordlength
point
'
=>
$wordlength
point
]);
return
$this
->
render
(
'MagicWordBundle:Administration:wordlength-edit.html.twig'
,
[
'form'
=>
$form
,
'wordlength'
=>
$wordlength
]);
}
/**
* @Route("/administration/combopoint
s
/{id}", name="combopoint_edit")
* @Route("/administration/combopoint/{id}", name="combopoint_edit")
* @Method("GET")
*/
public
function
comboPointEditAction
(
ComboPoints
$combopoint
)
{
$form
=
$this
->
get
(
'mw_manager.
administration
'
)
->
getComboPointForm
(
$combopoint
);
$form
=
$this
->
get
(
'mw_manager.
rules
'
)
->
getComboPointForm
(
$combopoint
);
return
$this
->
render
(
'MagicWordBundle:Administration:
wordlength
point-edit.html.twig'
,
[
'form'
=>
$form
,
'
wordlength
point'
=>
$combopoint
]);
return
$this
->
render
(
'MagicWordBundle:Administration:
combo
point-edit.html.twig'
,
[
'form'
=>
$form
,
'
combo
point
s
'
=>
$combopoint
]);
}
/**
* @Route("/administration/wordlength
points
/{id}", name="wordlength
point
_submit")
* @Route("/administration/wordlength/{id}", name="wordlength_submit")
* @Method("POST")
*/
public
function
wordLength
Point
SubmitAction
(
WordLength
Points
$wordlength
point
,
Request
$request
)
public
function
wordLengthSubmitAction
(
WordLength
$wordlength
,
Request
$request
)
{
$this
->
get
(
'mw_manager.
administration
'
)
->
handleWordLength
Point
Form
(
$wordlength
point
,
$request
);
$this
->
get
(
'mw_manager.
rules
'
)
->
handleWordLengthForm
(
$wordlength
,
$request
);
return
$this
->
redirectToRoute
(
'wordlength
points'
);
return
$this
->
redirectToRoute
(
'wordlength
s'
,
[
'id'
=>
$wordlength
->
getLanguage
()
->
getId
()]
);
}
/**
* @Route("/administration/combopoint
s
/{id}", name="combopoint_submit")
* @Route("/administration/combopoint/{id}", name="combopoint_submit")
* @Method("POST")
*/
public
function
comboPointSubmitAction
(
ComboPoints
$combopoint
,
Request
$request
)
{
$this
->
get
(
'mw_manager.
administration
'
)
->
handleComboPointForm
(
$combopoint
,
$request
);
$this
->
get
(
'mw_manager.
rules
'
)
->
handleComboPointForm
(
$combopoint
,
$request
);
return
$this
->
redirectToRoute
(
'combopoints'
);
return
$this
->
redirectToRoute
(
'combopoints'
,
[
'id'
=>
$combopoint
->
getLanguage
()
->
getId
()]
);
}
/**
* @Route("/administration/letters
language
", name="letters
language
")
* @Route("/administration/letters
/{id}
", name="letters")
*/
public
function
l
anguageL
etterPointsAction
()
public
function
letterPointsAction
(
Language
$language
)
{
$letters
language
=
$this
->
getDoctrine
()
->
getRepository
(
'
MagicWord
Bundle:Letter
\LetterLanguage'
)
->
findAll
(
);
$letters
=
$this
->
getDoctrine
()
->
getRepository
(
'
Lexicon
Bundle:Letter
'
)
->
findBy
([
"language"
=>
$language
],
[
"value"
=>
"ASC"
]
);
return
$this
->
render
(
'MagicWordBundle:Administration:letterslanguage.html.twig'
,
[
'letters
language
'
=>
$letters
language
]);
return
$this
->
render
(
'MagicWordBundle:Administration:letterslanguage.html.twig'
,
[
'letters'
=>
$letters
]);
}
/**
* @Route("/administration/letter
language
/{id}", name="letter
language
_edit")
* @Route("/administration/letter/{id}", name="letter_edit")
* @Method("GET")
*/
public
function
l
anguageL
etterPointsEditAction
(
Letter
Language
$letterlanguage
)
public
function
letterPointsEditAction
(
Letter
$letter
)
{
$form
=
$this
->
get
(
'mw_manager.
administration
'
)
->
getLetter
Language
Form
(
$letter
language
);
$form
=
$this
->
get
(
'mw_manager.
rules
'
)
->
getLetterForm
(
$letter
);
return
$this
->
render
(
'MagicWordBundle:Administration:letterslanguage-edit.html.twig'
,
[
'letter
language
'
=>
$letter
language
,
'form'
=>
$form
]);
return
$this
->
render
(
'MagicWordBundle:Administration:letterslanguage-edit.html.twig'
,
[
'letter'
=>
$letter
,
'form'
=>
$form
]);
}
/**
* @Route("/administration/letter
language
/{id}", name="letter
language
_submit")
* @Route("/administration/letter/{id}", name="letter_submit")
* @Method("POST")
*/
public
function
l
anguageL
etterPointsSubmitAction
(
Letter
Language
$letterlanguage
,
Request
$request
)
public
function
letterPointsSubmitAction
(
Letter
$letter
,
Request
$request
)
{
$this
->
get
(
'mw_manager.
administration
'
)
->
handleLetterLanguageForm
(
$letter
language
,
$request
);
$this
->
get
(
'mw_manager.
rules
'
)
->
handleLetterLanguageForm
(
$letter
,
$request
);
return
$this
->
redirectToRoute
(
'letters
language'
);
return
$this
->
redirectToRoute
(
'letters
'
,
[
'id'
=>
$letter
->
getLanguage
()
->
getId
()]
);
}
...
...
application/src/MagicWordBundle/Entity/Rules/ComboPoints.php
View file @
93bd1cc9
...
...
@@ -2,6 +2,7 @@
namespace
MagicWordBundle\Entity\Rules
;
use
LexiconBundle\Entity\Language
;
use
Doctrine\ORM\Mapping
as
ORM
;
/**
...
...
@@ -35,6 +36,12 @@ class ComboPoints
*/
private
$points
;
/**
* @ORM\ManyToOne(targetEntity="LexiconBundle\Entity\Language", inversedBy="wordLengths")
* @ORM\JoinColumn(nullable=false)
*/
private
$language
;
/**
* Get id.
*
...
...
@@ -92,4 +99,16 @@ class ComboPoints
{
return
$this
->
points
;
}
public
function
getLanguage
():
?Language
{
return
$this
->
language
;
}
public
function
setLanguage
(
?Language
$language
):
self
{
$this
->
language
=
$language
;
return
$this
;
}
}
application/src/MagicWordBundle/Entity/Rules/WordLengthPoints.php
deleted
100644 → 0
View file @
5428857a
<?php
namespace
MagicWordBundle\Entity\Rules
;
use
Doctrine\ORM\Mapping
as
ORM
;
/**
* Grid.
*
* @ORM\Table(name="word_length_points")
* @ORM\Entity()
*/
class
WordLengthPoints
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private
$id
;
/**
* @var int
*
* @ORM\Column(name="length", type="integer")
*/
private
$length
;
/**
* @var int
*
* @ORM\Column(name="points", type="integer")
*/
private
$points
;
/**
* Get id
*
* @return integer
*/
public
function
getId
()
{
return
$this
->
id
;
}
/**
* Set length
*
* @param integer $length
*
* @return WordLengthPoints
*/
public
function
setLength
(
$length
)
{
$this
->
length
=
$length
;
return
$this
;
}
/**
* Get length
*
* @return integer
*/
public
function
getLength
()
{
return
$this
->
length
;
}
/**
* Set points
*
* @param integer $points
*
* @return WordLengthPoints
*/
public
function
setPoints
(
$points
)
{
$this
->
points
=
$points
;