@param string $symbol

@return self

@throws Exception\UnknownSymbolException
353635
public function setCurrentPlayer($symbol)
    {
        $this->checkSymbol($symbol);

        if (TicTacToe::X === $symbol) {
            $this->lastMove = TicTacToe::O;
        }

        if (TicTacToe::O === $symbol) {
            $this->lastMove = TicTacToe::X;
        }

        return $this;
    }
1181079
public function setIdentifier(string $identifier) : self
    {
        // Sanitize Identifier => remove space and slashes
        $this->identifier = strtr(
            ucwords(strtr(
                $identifier,
                ['_' => ' ', '/' => '-', '.' => '_ ', '\\' => '_ ']
            )),
            [' ' => '']
        );

        return $this;
    }
256253
public function get(string $signal): callable
    {
        return $this->handlers[$signal] ?? static function () use ($signal) {
            throw new Exception\UnknownSignal($signal);
        };
    }
138633
public static function fromString(string $string): self
    {
        if (1 !== \preg_match('/^(?>\r\n|\n|\r)$/', $string)) {
            throw Exception\InvalidNewLineStringException::fromString($string);
        }

        return new self($string);
    }
512082
public function setIcon($icon)
    {
        if ($icon[0] != '<') {
            $icon = '<i class="icon-'.$icon.'"></i>';
        }
        $this->template->trySetHTML('icon', $icon);

        return $this;
    }
875210
public function setPrefix($prefix = null) {

		if(null !== $prefix) {

			if(false === is_string($prefix)) {
				return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($prefix)), E_USER_ERROR);
			}

			$this -> prefix = $prefix;
		}

		return $this;
	}
1287250
public function setPrefix($prefix)
    {
        switch ($prefix) {
            case 'a': //Access
            case 'c': //Company
            case 'u': //User
            case 'g': //License Groups
            case 'admin':
            case 'status':
            case 'login-logout':
                $this->prefix = '/'.$prefix.'/';
                break;
            case null:
            case '':
            case '/':
                $this->prefix = '';
                break;
            default:
                throw new \Exception(sprintf('Unknown prefix %s', $prefix));
        }
    }
637446
public function setIcon(?string $icon): self
    {
        if (null === $icon) {
            $this->icon = $this->iconType = null;

            return $this;
        }

        if (':' === \mb_substr($icon, 0, 1) && ':' === \mb_substr($icon, \mb_strlen($icon) - 1, 1)) {
            $this->iconType = self::ICON_TYPE_EMOJI;
        } else {
            $this->iconType = self::ICON_TYPE_URL;
        }

        $this->icon = $icon;

        return $this;
    }
608813
public function play($col, $row, $symbol)
    {
        $this->checkCoords($col, $row);
        $this->checkSymbol($symbol);

        if (null !== $this->getWinner()) {
            throw new Exception\InvalidMoveException('Game already finnished.');
        }

        if ($symbol === $this->lastMove) {
            throw new Exception\PlayingTwiceException();
        }

        if (!$this->isEmpty($col, $row)) {
            throw new Exception\InvalidMoveException(sprintf(
                'Case already filled by %s.',
                $this->get($col, $row)
            ));
        }

        $this->set($col, $row, $symbol);
        $this->lastMove = $symbol;

        return $this;
    }
1339634
public function setToken($token) : self
    {
        if (! (is_string($token) || is_null($token))) {
            throw new InvalidArgumentException(
                sprintf('Invalid $token type: "%s". Must be "string" or "null"', gettype($token))
            );
        }

        $this->token = $token;
        return $this;
    }
461881
public function setIcon($icon) {
		if (isset($this->_icon)) {
			$this->removePropertyValue("class", $this->_icon);
		}
		$this->_icon=$icon;
		$this->addToProperty("class", $icon);
		return $this;
	}
282731
public function icon($icon = null)
    {
        if ($icon === null) {
            return $this->_icon;
        }
        $this->_icon = $icon;

        return $this;
    }
237734
static public function get_coin_network($symbol, $network, $silentfail=false) {
        $data = self::get_coin($symbol, $silentfail);
        
        $info = @$data[$network];
        if( !$info && !$silentfail ) {
            throw new \Exception("Network not found: $symbol/$network");
        }
        
        return $info;
    }
596733
public static function getBySymbol(string $symbol): CurrencyCollection
    {
        $currencies = Currency::get();

        /** @var CurrencyCollection $currencies */
        $currencies = $currencies->where("symbol", $symbol);
        return new CurrencyCollection($currencies->elements());
    }
10443
public function symbols($currencies = null)
    {
        if (func_num_args() and !is_array(func_get_args()[0])) {
            $currencies = func_get_args();
        }

        $this->symbols = $currencies;

        return $this;
    }
1174409
public void consumeExpectedSymbol(String symbol) {
        if (current().matches(Token.TokenType.SYMBOL, symbol)) {
            consume();
        } else {
            addError(current(), "Unexpected token: '%s'. Expected: '%s'", current().getSource(), symbol);
        }
    }
608381
public function setPrefix($prefix)
    {
        $this->prefix = $prefix;
        $this->identifier = $this->prefix.$this->key;

        return $this;
    }