本文整理汇总了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;
}
示例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"]));
}
}
}
示例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);
}
}
}
示例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;
}
}
}
示例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();
}
示例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']);
}
示例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']);
}
示例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;
}
示例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');
}
示例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;
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}