Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function classify(array $data)
- {
- if (isset($data[$this->attribute])) {
- $attrValue = $data[$this->attribute];
- if (!$this->hasValue($attrValue)) {
- return 'unclassified';
- }
- $child = $this->values[$attrValue];
- if (!$child->getIsLeaf()) {
- return $child->classify($data);
- } else {
- return $child->getChild('result');
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement