SHARE
TWEET

Untitled

a guest Feb 14th, 2020 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public function classify(array $data)
  2. {
  3.     if (isset($data[$this->attribute])) {
  4.         $attrValue = $data[$this->attribute];
  5.         if (!$this->hasValue($attrValue)) {
  6.             return 'unclassified';
  7.         }
  8.         $child = $this->values[$attrValue];
  9.         if (!$child->getIsLeaf()) {
  10.             return $child->classify($data);
  11.         } else {
  12.             return $child->getChild('result');
  13.         }
  14.     }
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top