/** * Get a list of all the available methods * * This function returns an array of all the methods, both native and mixed. * It will also return the methods exposed by the decorated object. * * @return array An array */ public function getMethods() { if (!$this->__methods) { $methods = array(); $object = $this->getObject(); if (!$object instanceof KObject) { $reflection = new ReflectionClass($object); foreach ($reflection->getMethods() as $method) { $methods[] = $method->name; } } else { $methods = $object->getMethods(); } $this->__methods = array_merge(parent::getMethods(), $methods); } return $this->__methods; }
/** * Return an array of methods. * * (non-PHPdoc) * @see KObject::getMethods() */ public function getMethods() { $behaviors = $this->getRepository()->getBehaviors(); foreach ($behaviors as $behavior) { $this->mixin($behavior); } return parent::getMethods(); }