/** * @return PrimitiveIdentifier **/ public function setMethodName($methodName) { if (strpos($methodName, '::') === false) { $dao = $this->dao(); Assert::isTrue(method_exists($dao, $methodName), "knows nothing about '" . get_class($dao) . "::{$methodName}' method"); } else { ClassUtils::checkStaticMethod($methodName); } $this->methodName = $methodName; return $this; }
/** * @param mixed $extractMethod * @return IdentifiablePrimitive */ public function setExtractMethod($extractMethod) { if (is_callable($extractMethod)) { /* all ok, call what you want */ } elseif (strpos($extractMethod, '::') === false) { Assert::isTrue(method_exists($this->className, $extractMethod), "knows nothing about '" . $this->className . "::{$extractMethod}' method"); } else { ClassUtils::checkStaticMethod($extractMethod); } $this->extractMethod = $extractMethod; return $this; }