original_string: public function singleton($alias, $callback, $share = false)
      {
          return $this->add($alias, $callback, $share)->setSingleton(true);
      }
code: public function singleton($alias, $callback, $share = false)
      {
          return $this->add($alias, $callback, $share)->setSingleton(true);
      }
code_tokens: public function singleton ( $ alias , $ callback , $ share = false ) { return $ this -> add ( $ alias , $ callback , $ share ) -> setSingleton ( true ) ; }
docstring: this method marks your alias as a singleton
  so it will be resolve only once and reuse everytime
  
  @param string $alias the alias name of instance, you might wanna give an interface name
  @param mixed $callback the callback can be an object, Closure or the name of class
  @example add('mysql', 'MysqlInterface')
  @param bool $share if you put true on this argument, this will shared with other container objects
  @see Container::share()
  @example add('mysql', 'MysqlInterface', true);
  @throws ResolverException
  @return ClassDefinition
docstring_tokens: this method marks your alias as a singleton so it will be resolve only once and reuse everytime