本文整理汇总了PHP中Host类的典型用法代码示例。如果您正苦于以下问题:PHP Host类的具体用法?PHP Host怎么用?PHP Host使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Host类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: __construct
public function __construct()
{
$this->id = $_POST['cId'];
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_marcas();
}
开发者ID:llanosCoder,项目名称:mybu,代码行数:11,代码来源:obtener_marcas_categoria.php
示例17: getOutput
/**
* get the output
*
* @since 2.4.0
*
* @return string
*/
public function getOutput()
{
$protocol = new Protocol($this->_request);
$host = new Host($this->_request);
$directory = new Directory($this->_request);
/* collect output */
$output = $protocol->getOutput() . '://' . $host->getOutput();
if ($directory->getOutput() !== '/' && $directory->getOutput() !== '\\') {
$output .= $directory->getOutput();
}
return $output;
}
开发者ID:amanpreetsinghmalhotra,项目名称:redaxscript,代码行数:19,代码来源:Root.php
示例18: __construct
public function __construct($cat_desc)
{
session_start();
$this->categoria = $cat_desc;
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->sql_con = new mysqli($this->link['host'], $this->link['user'], $this->link['pass'], $this->link['bd']);
$this->obtener_productos();
}
开发者ID:llanosCoder,项目名称:mybu,代码行数:12,代码来源:obtener_productos_categoria.php
示例19: __construct
public function __construct()
{
session_start();
//ini_set('display_errors', 'on');
require '../hosts.php';
require 'conexion_new.php';
$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']);
$this->obtener_parametros();
}
开发者ID:llanosCoder,项目名称:mybu,代码行数:13,代码来源:obtener_resumen_productos.php
示例20: conexion
protected function conexion()
{
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']);
$hosteo = new Host();
$hosteo->obtener_conexion(1);
$this->sql_con_admin = new mysqli($hosteo->datos_conexion['host'], $hosteo->datos_conexion['user'], $hosteo->datos_conexion['pass'], $hosteo->datos_conexion['bd']);
$this->sql_con_admin->set_charset('utf8');
}
开发者ID:llanosCoder,项目名称:mybu,代码行数:13,代码来源:definir_categorias.php
注:本文中的Host类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论