Exemplo n.º 1
0
 /**
  * Renders the library method.
  *
  * @param MethodInterface $method
  *
  * @return string
  */
 public function renderMethod(MethodInterface $method)
 {
     if (!$method->supports(MethodInterface::BROWSER_PLATFORM)) {
         throw new \InvalidArgumentException('Renderer only accepts browser methods.');
     }
     return 'window.analytics.' . $method->getName() . '(' . $this->renderArguments($method) . ');';
 }