? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/public_html/old/libraries/rokcommon/RokCommon/HTML/
File Upload :
Current File : /home/admin/public_html/old/libraries/rokcommon/RokCommon/HTML/Select_Option.php

<?php
/**
 * @version   $Id: Select_Option.php 10831 2013-05-29 19:32:17Z btowles $
 * @author    RocketTheme http://www.rockettheme.com
 * @copyright Copyright (C) 2007 - 2015 RocketTheme, LLC
 * @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
 */
defined('ROKCOMMON') or die;

/**
 *
 */
class RokCommon_HTML_Select_Option
{


	/**
	 * @var string
	 */
	protected $value;

	/**
	 * @var string
	 */
	protected $label;

	/**
	 * @var string[]
	 */
	protected $attribs;

	/**
	 * @var bool
	 */
	protected $selected = false;

	/**
	 * @param string $value
	 * @param string $label
	 * @param bool   $selected
	 * @param array  $attribs
	 */
	public function __construct($value, $label, $selected = false, $attribs = array())
	{
		$this->value    = $value;
		$this->label    = $label;
		$this->selected = $selected;
		$this->attribs  = $attribs;
	}


	/**
	 * @param $attribs
	 */
	public function setAttribs($attribs)
	{
		$this->attribs = $attribs;
	}

	/**
	 * @return array|string[]
	 */
	public function getAttribs()
	{
		return $this->attribs;
	}

	/**
	 * @param string $label
	 */
	public function setLabel($label)
	{
		$this->label = $label;
	}

	/**
	 * @return string
	 */
	public function getLabel()
	{
		return $this->label;
	}

	/**
	 * @param boolean $selected
	 */
	public function setSelected($selected)
	{
		$this->selected = $selected;
	}

	/**
	 * @return boolean
	 */
	public function isSelected()
	{
		return $this->selected;
	}

	/**
	 * @param string $value
	 */
	public function setValue($value)
	{
		$this->value = $value;
	}

	/**
	 * @return string
	 */
	public function getValue()
	{
		return $this->value;
	}

	/**
	 * @return string
	 */
	public function getHTML()
	{
		$internal = array();

		if (!empty($this->value)) {
			$internal[] = 'value="' . $this->value . '"';
		}

		foreach ($this->attribs as $attrib_name => $attrib_value) {
			$internal[] = $attrib_name . '="' . $attrib_value . '"';
		}

		if ($this->selected) {
			$internal[] = 'selected="selected"';
		}
		$internal_html = implode(' ', $internal);


		$html = '<option ' . $internal_html . '>' . rc__($this->label) . '</option>';
		return $html;
	}
}

T1KUS90T
  root-grov@210.1.60.28:~$