Skip to content
Snippets Groups Projects

Phpmd on bibnumerique webservices

Merged Patrick Barroca requested to merge phpmd-on-bibnumerique-webservices into master
Compare and
+ 45
72
Preferences
Compare changes
Files
@@ -66,19 +66,23 @@ class Class_WebService_Bibnumerique_ArteVOD_FilmReader {
$this->_film->addMatiere($data);
}
public function endDuration($data) {
$this->_film->addDuration($data);
}
public function endProduction_Year($data) {
$this->_film->setYear($data);
}
public function endTag($data) {
$this->_film->addTag($data);
}
public function startPerson($data) {
public function startPerson() {
if ($this->_xml_parser->inParents('authors')) {
$this->_current_author = new StdClass();
$this->_current_author->first_name = '';
@@ -89,44 +93,34 @@ class Class_WebService_Bibnumerique_ArteVOD_FilmReader {
$this->_current_actor = new StdClass();
$this->_current_actor->first_name = '';
$this->_current_actor->last_name='';
}
}
public function endFirst_name($data) {
if ($this->_xml_parser->inParents('authors')) {
if ($this->_xml_parser->inParents('authors'))
$this->_current_author->first_name = $data;
}
if ($this->_xml_parser->inParents('actors') && $data) {
$this->_current_actor->first_name = $data;
}
if ($this->_xml_parser->inParents('actors') && $data)
$this->_current_actor->first_name = $data;
}
public function endLast_name($data) {
if ($this->_xml_parser->inParents('authors')) {
if ($this->_xml_parser->inParents('authors'))
$this->_current_author->last_name = $data;
}
if ($this->_xml_parser->inParents('actors') && $data) {
if ($this->_xml_parser->inParents('actors') && $data)
$this->_current_actor->last_name = $data;
}
}
public function endPerson($data) {
if ($this->_xml_parser->inParents('authors')) {
public function endPerson() {
if ($this->_xml_parser->inParents('authors'))
$this->_film->addAuthor($this->_current_author->first_name.' '.$this->_current_author->last_name);
}
if ($this->_xml_parser->inParents('actors')) {
$this->_film->addActor($this->_current_actor);
}
if ($this->_xml_parser->inParents('actors'))
$this->_film->addActor($this->_current_actor);
}