/** * Translate this program to some program code (e.g. PHP) via * GeneratorInterface implementation * * @param GeneratorInterface $generator * @return mixed */ public function generateCode(GeneratorInterface $generator) { return $generator->generate($this); }
/** * Get an Identicon PNG image resource * * @param string $string * @param integer $size * @param string $color * @param string $backgroundColor * * @return string */ public function getImageResource($string, $size = 120, $color = null, $backgroundColor = null) { return $this->generator->getImageResource($string, $size, $color, $backgroundColor); }
/** * 根据action生成url * * @param string $action * @param array $parameters * @param boolean $absolute * @return string */ function generateByAction($action, $parameters = [], $absolute = true) { return $this->_generator->generateByAction($action, $parameters, $absolute); }