implements = $implements; $this->tokens = $tokens; } function validate(mtgMetaInfo $meta) {} function getImplements() { if(!$this->implements) return array(); $imps = array(); foreach($this->implements as $imp) $imps[] = $imp->resolve(); return $imps; } function getFuncs() { return $this->funcs; } function addFunc(mtgMetaFunc $fn) { if($this->hasFunc($fn->getName())) throw new Exception("Interface '{$this->name}' already has func '{$fn->getName()}'"); $this->funcs[$fn->getName()] = $fn; } function hasFunc($name) { return isset($this->funcs[$name]); } function getFunc($name) { if(!isset($this->funcs[$name])) throw new Exception("No such funcs '$name'"); return $this->funcs[$name]; } }