當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Host類代碼示例

本文整理匯總了PHP中Host的典型用法代碼示例。如果您正苦於以下問題:PHP Host類的具體用法?PHP Host怎麽用?PHP Host使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Host類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: isPermited

 function isPermited(Host &$host, VM &$vm)
 {
     if (is_null($this->matrix)) {
         throw new Exception("TestingWithoutMatrix", 1);
     }
     return isset($this->matrix[$host->getId()][$vm->getId()]) ? $this->matrix[$host->getId()][$vm->getId()] : false;
 }
開發者ID:arthurd2,項目名稱:placements,代碼行數:7,代碼來源:rule.php

示例2: __construct

 public function __construct($url = null)
 {
     if ($url) {
         $parts = parse_url($url);
         if (isset($parts["scheme"])) {
             $this->setScheme(new Scheme($parts["scheme"]));
         } else {
             if (substr($url, 0, 2) === '//') {
                 $this->makeSchemeless();
             }
         }
         if (isset($parts["user"]) || isset($parts["pass"])) {
             $this->setAuthInfo(new AuthInfo($parts["user"], $parts["pass"]));
         }
         if (isset($parts["host"])) {
             $this->setHost(new Host($parts["host"]));
             if (isset($parts["port"])) {
                 $this->host->setPort($parts["port"]);
             }
         }
         if (isset($parts["path"])) {
             $this->setPath(new Path($parts["path"]));
         }
         if (isset($parts["query"])) {
             $this->setQuery(new Query($parts["query"]));
         }
         if (isset($parts["fragment"])) {
             $this->setFragment(new Fragment($parts["fragment"]));
         }
     }
 }
開發者ID:jimbojsb,項目名稱:swurl,代碼行數:31,代碼來源:Url.php

示例3: obtener_ofertas

 protected function obtener_ofertas()
 {
     $this->usuario = $_SESSION['id'];
     $this->sucursal = $_SESSION['sucursal'];
     $this->empresa = $_SESSION['empresa'];
     $this->propias = $_POST['propias'];
     $this->filtro = mysqli_real_escape_string($this->sql_con, $_POST['filtro']);
     if ($this->propias == 'true') {
         $hosteo = new Host();
         $hosteo->obtener_conexion(0);
         $this->set_conexion($hosteo->datos_conexion['host'], $hosteo->datos_conexion['user'], $hosteo->datos_conexion['pass'], $hosteo->datos_conexion['bd']);
     }
     $this->obtener_filtro();
     $result_ofertas = $this->sql_con->query($this->query);
     if ($result_ofertas === false) {
         trigger_error("Ha ocurrido un error");
     } else {
         while ($row_ofertas = $result_ofertas->fetch_assoc()) {
             $dato = array();
             foreach ($row_ofertas as $indice => $valor) {
                 $dato[$indice] = $valor;
             }
             array_push($this->datos, $dato);
         }
     }
 }
開發者ID:llanosCoder,項目名稱:mybu,代碼行數:26,代碼來源:obtener_ofertas.php

示例4: __construct

 public function __construct($accion)
 {
     session_start();
     require '../hosts.php';
     require 'conexion_new.php';
     date_default_timezone_set('America/Buenos_Aires');
     $this->tipo_cuenta = $_SESSION['tipo_cuenta'];
     $this->usuario = $_SESSION['id'];
     $hosteo = new Host();
     $hosteo->obtener_conexion(0);
     $this->set_conexion($hosteo->datos_conexion['host'], $hosteo->datos_conexion['user'], $hosteo->datos_conexion['pass'], $hosteo->datos_conexion['bd']);
     for ($i = 0; $i < count($accion); $i++) {
         switch ($accion[$i]) {
             case 'ventas_tiempo_real':
                 $this->obtener_ventas_tiempo_real();
                 break;
             case 'ventas_minuto':
                 $this->obtener_ventas_minuto();
                 break;
             case 'ventas_hora':
                 $this->ventas_hora();
                 break;
             case 'ventas_dia':
                 $this->ventas_dia();
                 break;
             case 'ventas_mes':
                 $this->ventas_mes();
                 break;
             case 'ranking_semanal':
                 $this->ranking_semanal();
                 break;
             case 'comparativo_mes':
                 $this->comparativo_mes();
                 break;
             case 'ranking_vendedores':
                 $this->ranking_vendedores();
                 break;
             case 'fluctuacion_mes':
                 $this->fluctuacion_mes();
                 break;
             case 'promedio_compra':
                 $this->promedio_compra();
                 break;
             case 'total_ventas_dia':
                 $this->total_ventas_dia();
                 break;
             case 'total_ventas_mes':
                 $this->total_ventas_mes();
                 break;
             case 'total_productos_dia':
                 $this->total_productos_dia();
                 break;
             case 'total_productos_mes':
                 $this->total_productos_mes();
                 break;
         }
     }
 }
開發者ID:llanosCoder,項目名稱:mybu,代碼行數:58,代碼來源:obtener_estadisticas.php

示例5: search_post

 public function search_post()
 {
     unset($this->headerData[0], $this->headerData[5], $this->attributes[0], $this->attributes[5], $this->templates[0], $this->templates[5]);
     foreach ((array) $this->getClass('TaskManager')->search() as $Task) {
         $Host = new Host($Task->get('hostID'));
         $this->data[] = array('task_id' => $Task->get('id'), 'task_name' => $Task->get('name'), 'host_name' => $Task->get('isForced') ? '* ' . $Host->get('name') : $Host->get('name'), 'task_type' => $Task->getTaskTypeText(), 'task_state' => $Task->getTaskStateText());
     }
     $this->render();
 }
開發者ID:bramverstraten,項目名稱:fogproject,代碼行數:9,代碼來源:TaskMobile.class.php

示例6: __construct

 public function __construct()
 {
     session_start();
     require_once '../hosts.php';
     require_once 'conexion_new.php';
     $hosteo = new Host();
     $hosteo->obtener_conexion(0);
     $this->set_conexion($hosteo->datos_conexion['host'], $hosteo->datos_conexion['user'], $hosteo->datos_conexion['pass'], $hosteo->datos_conexion['bd']);
 }
開發者ID:llanosCoder,項目名稱:mybu,代碼行數:9,代碼來源:logax.model.php

示例7: conexion

 protected function conexion()
 {
     session_start();
     require '../hosts.php';
     require 'conexion_new.php';
     $hosteo = new Host();
     $hosteo->obtener_conexion(1);
     $this->set_conexion($hosteo->datos_conexion['host'], $hosteo->datos_conexion['user'], $hosteo->datos_conexion['pass'], $hosteo->datos_conexion['bd']);
 }
開發者ID:llanosCoder,項目名稱:mybu,代碼行數:9,代碼來源:solicitar_categoria.php

示例8: set_host

 protected function set_host($host)
 {
     if ($host != $this->host_anterior) {
         $hosteo = new Host();
         $hosteo->obtener_conexion($host);
         $this->set_conexion($hosteo->datos_conexion['host'], $hosteo->datos_conexion['user'], $hosteo->datos_conexion['pass'], $hosteo->datos_conexion['bd']);
     }
     $this->host_anterior = $host;
 }
開發者ID:llanosCoder,項目名稱:mybu,代碼行數:9,代碼來源:administrar_cuentas.php

示例9: save

 function save($id = FALSE)
 {
     if ($_POST) {
         $host = new Host($id);
         $host->from_array($_POST);
         $host->save();
         set_notify('success', lang('save_data_complete'));
     }
     redirect('hosts');
 }
開發者ID:unisexx,項目名稱:thaigcd2015,代碼行數:10,代碼來源:hosts.php

示例10: isEquivalentTo

 /**
  * 
  * @param \webignition\Url\Host\Host $comparator
  * @param array $excludeParts
  * @return boolean
  */
 public function isEquivalentTo(Host $comparator, $excludeParts = array())
 {
     $thisHost = new Host(idn_to_ascii((string) $this));
     $comparatorHost = new Host(idn_to_ascii((string) $comparator));
     if (!is_array($excludeParts) || count($excludeParts) == 0) {
         return $thisHost->equals($comparatorHost);
     }
     $thisParts = $this->excludeParts($thisHost->getParts(), $excludeParts);
     $comparatorParts = $this->excludeParts($comparatorHost->getParts(), $excludeParts);
     return $thisParts == $comparatorParts;
 }
開發者ID:sintoris,項目名稱:Known,代碼行數:17,代碼來源:Host.php

示例11: __construct

 public function __construct($cat_desc)
 {
     $this->categoria = $cat_desc;
     session_start();
     require '../hosts.php';
     require 'conexion_new.php';
     $hosteo = new Host();
     $hosteo->obtener_conexion(0);
     $this->set_conexion($hosteo->datos_conexion['host'], $hosteo->datos_conexion['user'], $hosteo->datos_conexion['pass'], $hosteo->datos_conexion['bd']);
     $this->obtener_ofertas();
 }
開發者ID:llanosCoder,項目名稱:mybu,代碼行數:11,代碼來源:obtener_ofertas_categoria.php

示例12: __construct

 public function __construct()
 {
     session_start();
     require '../hosts.php';
     require 'conexion_new.php';
     ini_set('display_errors', 'on');
     $hosteo = new Host();
     $hosteo->obtener_conexion(0);
     $this->set_conexion($hosteo->datos_conexion['host'], $hosteo->datos_conexion['user'], $hosteo->datos_conexion['pass'], $hosteo->datos_conexion['bd']);
     $this->procesar();
 }
開發者ID:llanosCoder,項目名稱:mybu,代碼行數:11,代碼來源:eliminar_producto.php

示例13: __construct

 public function __construct()
 {
     session_start();
     require '../../hosts.php';
     require 'conexion_new.php';
     $hosteo = new Host();
     $hosteo->obtener_conexion(7);
     $this->set_conexion($hosteo->datos_conexion['host'], $hosteo->datos_conexion['user'], $hosteo->datos_conexion['pass'], $hosteo->datos_conexion['bd']);
     $this->obtener_parametros();
     // $this->verificar_cliente();
 }
開發者ID:llanosCoder,項目名稱:mybu,代碼行數:11,代碼來源:verificar.php

示例14: __construct

 public function __construct()
 {
     session_start();
     ini_set('display_errors', 'off');
     require '../hosts.php';
     require '../classes/conexion_new.php';
     $hosteo = new Host();
     $hosteo->obtener_conexion(7);
     $this->set_conexion($hosteo->datos_conexion['host'], $hosteo->datos_conexion['user'], $hosteo->datos_conexion['pass'], $hosteo->datos_conexion['bd']);
     $this->traer_fichas();
 }
開發者ID:llanosCoder,項目名稱:mybu,代碼行數:11,代碼來源:traer_fichas.php

示例15: __construct

 public function __construct()
 {
     session_start();
     $this->sucursal = $_SESSION["sucursal"];
     require '../hosts.php';
     require 'conexion_new.php';
     $hosteo = new Host();
     $hosteo->obtener_conexion(0);
     $this->set_conexion($hosteo->datos_conexion['host'], $hosteo->datos_conexion['user'], $hosteo->datos_conexion['pass'], $hosteo->datos_conexion['bd']);
     $this->obtener_planes();
 }
開發者ID:llanosCoder,項目名稱:mybu,代碼行數:11,代碼來源:ptv_obtener_planes.php


注:本文中的Host類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。