Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mathieu Loiseau
LexiconBundle
Commits
ce39aad4
Commit
ce39aad4
authored
Feb 03, 2017
by
arnaudbey
Browse files
1st commit
parents
Changes
15
Hide whitespace changes
Inline
Side-by-side
DependencyInjection/Configuration.php
0 → 100644
View file @
ce39aad4
<?php
namespace
Innova\LexiconBundle\DependencyInjection
;
use
Symfony\Component\Config\Definition\Builder\TreeBuilder
;
use
Symfony\Component\Config\Definition\ConfigurationInterface
;
/**
* This is the class that validates and merges configuration from your app/config files.
*
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/configuration.html}
*/
class
Configuration
implements
ConfigurationInterface
{
/**
* {@inheritdoc}
*/
public
function
getConfigTreeBuilder
()
{
$treeBuilder
=
new
TreeBuilder
();
$rootNode
=
$treeBuilder
->
root
(
'innova_lexicon'
);
// Here you should define the parameters that are allowed to
// configure your bundle. See the documentation linked above for
// more information on that topic.
return
$treeBuilder
;
}
}
DependencyInjection/InnovaLexiconExtension.php
0 → 100644
View file @
ce39aad4
<?php
namespace
Innova\LexiconBundle\DependencyInjection
;
use
Symfony\Component\DependencyInjection\ContainerBuilder
;
use
Symfony\Component\Config\FileLocator
;
use
Symfony\Component\HttpKernel\DependencyInjection\Extension
;
use
Symfony\Component\DependencyInjection\Loader
;
/**
* This is the class that loads and manages your bundle configuration.
*
* @link http://symfony.com/doc/current/cookbook/bundles/extension.html
*/
class
InnovaLexiconExtension
extends
Extension
{
/**
* {@inheritdoc}
*/
public
function
load
(
array
$configs
,
ContainerBuilder
$container
)
{
$configuration
=
new
Configuration
();
$config
=
$this
->
processConfiguration
(
$configuration
,
$configs
);
$loader
=
new
Loader\YamlFileLoader
(
$container
,
new
FileLocator
(
__DIR__
.
'/../Resources/config'
));
$loader
->
load
(
'services.yml'
);
}
}
Entity/Category.php
0 → 100644
View file @
ce39aad4
<?php
namespace
Innova\LexiconBundle\Entity
;
use
Doctrine\ORM\Mapping
as
ORM
;
/**
* Category.
*
* @ORM\Table(name="lexicon.category")
* @ORM\Entity()
*/
class
Category
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private
$id
;
/**
* @var string
*
* @ORM\Column(name="value", type="string", length=255)
*/
private
$value
;
/**
* Get id.
*
* @return int
*/
public
function
getId
()
{
return
$this
->
id
;
}
/**
* Set value.
*
* @param string $value
*
* @return Category
*/
public
function
setValue
(
$value
)
{
$this
->
value
=
$value
;
return
$this
;
}
/**
* Get value.
*
* @return string
*/
public
function
getValue
()
{
return
$this
->
value
;
}
}
Entity/Gender.php
0 → 100644
View file @
ce39aad4
<?php
namespace
Innova\LexiconBundle\Entity
;
use
Doctrine\ORM\Mapping
as
ORM
;
/**
* Gender.
*
* @ORM\Table(name="lexicon.gender")
* @ORM\Entity()
*/
class
Gender
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private
$id
;
/**
* @var string
*
* @ORM\Column(name="value", type="string", length=255)
*/
private
$value
;
/**
* Get id.
*
* @return int
*/
public
function
getId
()
{
return
$this
->
id
;
}
/**
* Set value.
*
* @param string $value
*
* @return Gender
*/
public
function
setValue
(
$value
)
{
$this
->
value
=
$value
;
return
$this
;
}
/**
* Get value.
*
* @return string
*/
public
function
getValue
()
{
return
$this
->
value
;
}
}
Entity/Inflection.php
0 → 100644
View file @
ce39aad4
<?php
namespace
Innova\LexiconBundle\Entity
;
use
Doctrine\ORM\Mapping
as
ORM
;
use
Doctrine\ORM\Mapping\Index
;
use
JsonSerializable
;
/**
* Inflection.
*
* @ORM\Table(name="lexicon.inflection", indexes={
* @Index(name="cleaned_content", columns={"cleaned_content"}),
* })
* @ORM\Entity(repositoryClass="Innova\LexiconBundle\Repository\Lexicon\InflectionRepository")
*/
class
Inflection
implements
JsonSerializable
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private
$id
;
/**
* @ORM\ManyToOne(targetEntity="Innova\LexiconBundle\Entity\Language")
*/
private
$language
;
/**
* @ORM\ManyToOne(targetEntity="Innova\LexiconBundle\Entity\Lemma", cascade={"persist"})
*/
private
$lemma
;
/**
* @var string
*
* @ORM\Column(name="content", type="string", length=255)
*/
private
$content
;
/**
* @var string
*
* @ORM\Column(name="cleaned_content", type="string", length=255)
*/
private
$cleanedContent
;
/**
* @ORM\ManyToOne(targetEntity="Innova\LexiconBundle\Entity\Number")
*/
private
$number
;
/**
* @ORM\ManyToOne(targetEntity="Innova\LexiconBundle\Entity\Gender")
*/
private
$gender
;
/**
* @ORM\ManyToOne(targetEntity="Innova\LexiconBundle\Entity\Tense")
*/
private
$tense
;
/**
* @ORM\ManyToOne(targetEntity="Innova\LexiconBundle\Entity\Person")
*/
private
$person
;
/**
* @ORM\ManyToOne(targetEntity="Innova\LexiconBundle\Entity\Mood")
*/
private
$mood
;
/**
* @var string
*
* @ORM\Column(name="phonetic1", type="string", length=255)
*/
private
$phonetic1
;
/**
* @var string
*
* @ORM\Column(name="phonetic2", type="string", length=255)
*/
private
$phonetic2
;
/**
* Get id.
*
* @return int
*/
public
function
getId
()
{
return
$this
->
id
;
}
/**
* Set content.
*
* @param string $content
*
* @return Inflection
*/
public
function
setContent
(
$content
)
{
$this
->
content
=
$content
;
return
$this
;
}
/**
* Get content.
*
* @return string
*/
public
function
getContent
()
{
return
$this
->
content
;
}
/**
* Set phonetic1.
*
* @param string $phonetic1
*
* @return Inflection
*/
public
function
setPhonetic1
(
$phonetic1
)
{
$this
->
phonetic1
=
$phonetic1
;
return
$this
;
}
/**
* Get phonetic1.
*
* @return string
*/
public
function
getPhonetic1
()
{
return
$this
->
phonetic1
;
}
/**
* Set phonetic2.
*
* @param string $phonetic2
*
* @return Inflection
*/
public
function
setPhonetic2
(
$phonetic2
)
{
$this
->
phonetic2
=
$phonetic2
;
return
$this
;
}
/**
* Get phonetic2.
*
* @return string
*/
public
function
getPhonetic2
()
{
return
$this
->
phonetic2
;
}
/**
* Set lemma.
*
* @param \Innova\LexiconBundle\Entity\Lemma $lemma
*
* @return Inflection
*/
public
function
setLemma
(
\
Innova\LexiconBundle\Entity\Lemma
$lemma
=
null
)
{
$this
->
lemma
=
$lemma
;
return
$this
;
}
/**
* Get lemma.
*
* @return \Innova\LexiconBundle\Entity\Lemma
*/
public
function
getLemma
()
{
return
$this
->
lemma
;
}
/**
* Set number.
*
* @param \Innova\LexiconBundle\Entity\Number $number
*
* @return Inflection
*/
public
function
setNumber
(
\
Innova\LexiconBundle\Entity\Number
$number
=
null
)
{
$this
->
number
=
$number
;
return
$this
;
}
/**
* Get number.
*
* @return \Innova\LexiconBundle\Entity\Number
*/
public
function
getNumber
()
{
return
$this
->
number
;
}
/**
* Set gender.
*
* @param \Innova\LexiconBundle\Entity\Gender $gender
*
* @return Inflection
*/
public
function
setGender
(
\
Innova\LexiconBundle\Entity\Gender
$gender
=
null
)
{
$this
->
gender
=
$gender
;
return
$this
;
}
/**
* Get gender.
*
* @return \Innova\LexiconBundle\Entity\Gender
*/
public
function
getGender
()
{
return
$this
->
gender
;
}
/**
* Set tense.
*
* @param \Innova\LexiconBundle\Entity\Tense $tense
*
* @return Inflection
*/
public
function
setTense
(
\
Innova\LexiconBundle\Entity\Tense
$tense
=
null
)
{
$this
->
tense
=
$tense
;
return
$this
;
}
/**
* Get tense.
*
* @return \Innova\LexiconBundle\Entity\Tense
*/
public
function
getTense
()
{
return
$this
->
tense
;
}
/**
* Set person.
*
* @param \Innova\LexiconBundle\Entity\Person $person
*
* @return Inflection
*/
public
function
setPerson
(
\
Innova\LexiconBundle\Entity\Person
$person
=
null
)
{
$this
->
person
=
$person
;
return
$this
;
}
/**
* Get person.
*
* @return \Innova\LexiconBundle\Entity\Person
*/
public
function
getPerson
()
{
return
$this
->
person
;
}
/**
* Set mood.
*
* @param \Innova\LexiconBundle\Entity\Mood $mood
*
* @return Inflection
*/
public
function
setMood
(
\
Innova\LexiconBundle\Entity\Mood
$mood
=
null
)
{
$this
->
mood
=
$mood
;
return
$this
;
}
/**
* Get mood.
*
* @return \Innova\LexiconBundle\Entity\Mood
*/
public
function
getMood
()
{
return
$this
->
mood
;
}
/**
* Set cleanedContent.
*
* @param string $cleanedContent
*
* @return Inflection
*/
public
function
setCleanedContent
(
$cleanedContent
)
{
$this
->
cleanedContent
=
$cleanedContent
;
return
$this
;
}
/**
* Get cleanedContent.
*
* @return string
*/
public
function
getCleanedContent
()
{
return
$this
->
cleanedContent
;
}
/**
* Set language.
*
* @param \Innova\LexiconBundle\Entity\Language $language
*
* @return Game
*/
public
function
setLanguage
(
\
Innova\LexiconBundle\Entity\Language
$language
=
null
)
{
$this
->
language
=
$language
;
return
$this
;
}
/**
* Get language.
*
* @return \Innova\LexiconBundle\Entity\Language
*/
public
function
getLanguage
()
{
return
$this
->
language
;
}
public
function
jsonSerialize
()
{
return
array
(
'id'
=>
$this
->
id
,
'content'
=>
$this
->
content
,
'cleanedContent'
=>
$this
->
cleanedContent
,
);
}
}
Entity/InflectionStart.php
0 → 100644
View file @
ce39aad4
<?php
namespace
Innova\LexiconBundle\Entity
;
use
Doctrine\ORM\Mapping
as
ORM
;
use
Doctrine\ORM\Mapping\Index
;
/**
* @ORM\Table(name="lexicon.inflection_start", indexes={
* @Index(columns={"start"}, flags={"fulltext"}),
* @Index(name="language_id", columns={"language"}),
* })
* @ORM\Entity(repositoryClass="Innova\LexiconBundle\Repository\Lexicon\InflectionStartRepository")
*/
class
InflectionStart
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private
$id
;
/**
* @var int
*
* @ORM\Column(name="language", type="integer")
*/
private
$language
=
0
;
/**
* @var string
*
* @ORM\Column(name="start", type="string", length=255)
*/
private
$start
;
/**
* Get id.
*
* @return int
*/
public
function
getId
()
{
return
$this
->
id
;
}
/**
* Set start.
*
* @param string $start
*
* @return InflectionStart
*/
public
function
setStart
(
$start
)
{
$this
->
start
=
$start
;
return
$this
;
}
/**
* Get start.
*
* @return string
*/
public
function
getStart
()
{
return
$this
->
start
;
}
/**
* Set language.
*
* @param int $language
*
* @return InflectionStart
*/
public
function
setLanguage
(
$language
)