JBZoo\Utils\Url::create PHP Метод

create() публичный статический Метод

public static create ( array $parts = [] ) : string
$parts array
Результат string
    public static function create(array $parts = array())
    {
        $parts = array_merge(array('scheme' => 'http', 'query' => array()), $parts);
        if (is_array($parts['query'])) {
            $parts['query'] = self::build($parts['query']);
        }
        return self::buildAll('', $parts, self::URL_REPLACE);
    }

Usage Example

Пример #1
0
 /**
  * @return Soap|\SoapClient
  */
 protected function _getClient()
 {
     $host = Env::get('WEB_HOST', '127.0.0.1', Env::VAR_STRING);
     $port = Env::get('WEB_PORT', '8081', Env::VAR_STRING);
     $loc = Url::create(['host' => $host, 'port' => $port, 'path' => 'wsSSMaker.asmx']);
     /** @var Soap $client */
     $client = new \SoapClient($loc . '?WSDL', ['trace' => true, 'location' => $loc]);
     return $client;
 }
All Usage Examples Of JBZoo\Utils\Url::create