Возвращает активный Порт сервера

@return string
486603
protected function getCurrentPort()
    {
        // Сначала проверьте наличие прокси-сервера
        $port = $this->getHeader('X_FORWARDED_PORT');
        if ($port) {
            return (string)$port;
        }

        $protocol = (string)$this->getHeader('X_FORWARDED_PROTO');
        if ($protocol === 'https') {
            return '443';
        }

        return (string)$this->getServerVar('SERVER_PORT');
    }
809134
public function toString()
    {

        $preApproval = array();
        $preApproval['code'] = $this->code;
        $preApproval['email'] = $this->sender ? $this->sender->getEmail() : "null";
        $preApproval['date'] = $this->date;
        $preApproval['reference'] = $this->reference;
        $preApproval['status'] = $this->status ? $this->status->getValue() : "null";
        $preApproval['charge'] = $this->charge;
        $preApproval['tracker'] = $this->tracker;
     
        $preApproval = "PreApproval: " . var_export($preApproval, true);

        return $preApproval;

    }
464124
public function toString()
    {
        $serviceLocator = $this->getServiceLocator();
        
        $config = $serviceLocator->get('Config');
        
        $configWidgets = isset($config['modules']['Grid\Core']['beforeContentWidget'])
                         ? $config['modules']['Grid\Core']['beforeContentWidget']
                         : array();
        
        foreach ( $configWidgets as $serviceClass )
        {
            $service = $serviceLocator->get( $serviceClass );
            
            if ( $service instanceof ServiceLocatorAwareInterface )
            {
                $service->setServiceLocator( $serviceLocator );
            }
            
            $this->addWidget($service);
        }
        
        $view    = $this->getView();
        $content = '';

        /* @var $widget \Grid\Core\View\BeforeContentWidget\BeforeContentWidgetInterface */
        foreach ( $this->widgets as $widget )
        {
            $content .= $widget->render($view);
        }

        return $content;
    }
888555
public function toString()
	{
		$attributes = $this->buildAttributes();

		$select = array();
		$select[] = '<select '.$attributes.'>';

		$firstValue = $this->firstValue;
		
		$value = isset($this->override) ? $this->override : (isset($this->attributes['value']) ? $this->attributes['value'] : '');

		if($firstValue)
		{
			$selected = $value == $firstValue['value'] ? 'selected' : '';
			$select[] = '<option '.$selected.' value="'.$firstValue['value'].'">'.$firstValue['label'].'</option>';
		}

		foreach($this->options as $val => $label)
		{
			if(is_array($label))
			{
				$select[] = '<optgroup label="'.$val.'">';
				foreach($label as $v => $l)
				{
					$selected = $v === $value ? 'selected' : '';
					$select[] = '<option '.$selected.' value="'.$v.'">'.$l.'</option>';
				}
				$select[] = '</optgroup>';
			}
			else
			{
				$selected = $val === $value ? 'selected' : '';
				$select[] = '<option '.$selected.' value="'.$val.'">'.$label.'</option>';
			}
		}

		$select[] = '</select>';

		return implode('', $select);
	}
1204824
public function getMessageString()
    {
        $str = $this->pri;
        $str .= implode(' ', $this->header);

        if ($this->message['APP-NAME']) {
            $str .= ' ' . $this->message['APP-NAME'] . ': ' . $this->message['MSG'];
        } else {
            $str .= ' ' . $this->message['MSG'];
        }
        return $str;
    }
840556
protected function getValue()
    {
        if (isset($this->_maker, $this->_name)){
            $parent = $this->_maker->getValue(); // Берется значения родителя (родитель, возможно, берет значения у своего родителя..)
            return isset($parent[$this->_name])? $parent[$this->_name] : null; // Из него выбирается своё
        }else{
            return $this->_value;
        }
    }
197695
public function __tostring()
    {
        ob_start();
        $close = $this->_opened;
        $this->open();
        if (!in_array('start', $this->options)) {
            $this->content();
        }
        if (!$this->hasOption('start') || $close) {
            $this->close();
        }

        return ob_get_clean();
    }
1278360
public function processCallback()
	{
		$request = Request::header();
		Log::info('Пришёл запрос callback с такими заголовками ', $request);
		$provider = $this->getProvider();
		$oSettings = Setting::whereGateId($provider['login'])->first();
		$this->setConfigForGateway($oSettings);

		$requestParams = Input::all();
		Log::info('Получены параметры в qiwi-shop для обработки callback:', array(
			'$requestParams' => $requestParams,
			'$provider'      => $provider,
		));
		$gate = new Gateway($this->makeCurl());
		if ($gate->doParseCallback($requestParams)) {
			$order = Order::find($gate->getCallbackOrderId());
			if (!$order) {
				$gate->createCallbackResponse(Gateway::C_BILL_NOT_FOUND);

				return $gate->doCallbackResponse();
			}
			$newStatus = $gate->getValueBillStatus();
			Log::info('Статусы заказов после обработки callback:', array(
				'oldStatus' => $order->status,
				'newStatus' => $newStatus,
			));
			if ($order->status != $newStatus) {
				$order->status = $newStatus;
				$order->save();
			}
		}

		return $gate->doCallbackResponse();
	}
1346766
public function toString() {
		$txt = $this->getName ();
		$txt .= $this->getPesel ();
		$txt .= "id:";
		$txt .= $this->getId ();
		$txt .= "oid:";
		$txt .= $this->getOddzialId ();
		$txt .= "d:";
		$data = $this->getDataKategoryzacji ();
		if ($data instanceof \DateTime) {
			$txt .= $this->getDataKategoryzacji ()->format ( "Y-m-d" );
		} else {
			$txt .= $this->getDataKategoryzacji ();
		}
		return $txt;
	}
1317789
public function getAVSCode()
    {
        if (isset($this->data->transactionResponse)) {
            return (string)$this->data->transactionResponse->avsResultCode;
        } else {
            return '';
        }
    }
274262
public function toString()
    {
        $status = sprintf('HTTP/%s %d %s', $this->getVersion(), $this->getStatusCode(), $this->getStatusMessage());

        $str  = trim($status) . "\r\n";
        $str .= $this->getHeaders();
        $str .= "\r\n";
        $str .= $this->getContent();
        return $str;
    }
618327
public function postChangeData()
	{
		$data = Input::all();

		//проверяем данные
		$errors = $this->getErrorFromChangeData($data);
		if ($errors) {
			return $errors;
		}

		//Проверяем текущий пароль
		$user_id = Config::get('ff-qiwi-gate::user_id');
		$currentMerchant = Merchant::find($user_id);
		if ($data['oldPassword'] != $currentMerchant->password) {
			$result['errors'] = array(
				'username'        => '',
				'callback'        => '',
				'email'           => '',
				'key'             => '',
				'password'        => '',
				'confirmPassword' => '',
				'oldPassword'     => 'Неверный пароль',
			);

			return $result;
		}

		//Изменяем данные
		$merchant = Merchants::ChangeMerchant($currentMerchant, $data);
		if ($merchant) {
			$message = 'Данные изменены';

			return array('message' => $message);
		}
		$result['errors'] = array(
			'oldPassword' => 'Ошибка, попробуйте ещё раз.',
		);

		return $result;

	}
611075
public function getHeaderString()
    {
        $string = '';
        foreach ($this->headers as $name => $values) {
            foreach ($values as $value) {
                $string .= $name . ': ' . $value . "\r\n";
            }
        }
        return $string;
    }
1291074
public function toString()
    {
        $credentials = array();
        $credentials['E-mail'] = $this->email;
        $credentials['Token'] = $this->token;
        return implode(' - ', $credentials);
    }
1038888
public function toString()
   {

      if ( empty( $this->_subdomainName ) )
      {

         if ( \is_null( $this->_sld ) )
         {
            return '';
         }

         return $this->_sld->toString();

      }

      if ( \is_null( $this->_sld ) )
      {
         return $this->_subdomainName;
      }

      return $this->_subdomainName . '.' . $this->_sld->toString();

   }
881935
public function toString()
    {
        $result = "";
        if ($this->scheme) {
            $result .= $this->scheme.'://';
        }
        if ($this->user) {
            $result .= $this->user;
            if ($this->pass) {
                $result .= $this->user;
            }
            $result .= '@';
        }
        if ($this->host) {
            $result .= $this->host;
        }
        if ($this->port) {
            $result .= ':'.$this->port;
        }
        if ($this->pathSegments) {
            $result .= '/'.implode('/', $this->pathSegments);
        }
        if ($this->parameters) {
            $result .= '?'.http_build_query($this->parameters);
        }
        if ($this->fragment) {
            $result .= '#'.$this->fragment;
        }
        return $result;
    }
1187252
public function toString()
    {
        return implode(', ', array_filter([
            $this->name,
            $this->street1,
            $this->street2,
            $this->city,
            $this->county,
            $this->postcode,
            $this->country($this->country)->name,
        ]));
    }