projects
/
platal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12bcf04
)
Adds education related functions to Profile class.
author
Stéphane Jacob
<sj@m4x.org>
Thu, 25 Mar 2010 14:13:54 +0000
(15:13 +0100)
committer
Stéphane Jacob
<sj@m4x.org>
Thu, 25 Mar 2010 16:49:43 +0000
(17:49 +0100)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
classes/profile.php
patch
|
blob
|
blame
|
history
diff --git
a/classes/profile.php
b/classes/profile.php
index
96cc71e
..
a397da7
100644
(file)
--- a/
classes/profile.php
+++ b/
classes/profile.php
@@
-195,6
+195,25
@@
class Profile
return intval(substr($this->promo, 1, 4));
}
+ public function mainEducation()
+ {
+ return $this->promo{0};
+ }
+
+ public function mainEducationDuration()
+ {
+ switch ($this->mainEducation()) {
+ case 'X':
+ return 3;
+ case 'M':
+ return 2;
+ case 'D':
+ return 3;
+ default:
+ return 0;
+ }
+ }
+
/** Print a name with the given formatting:
* %s = • for women
* %f = firstname