当前位置: 首页>>代码示例>>PHP>>正文


PHP Software::setId方法代码示例

本文整理汇总了PHP中Software::setId方法的典型用法代码示例。如果您正苦于以下问题:PHP Software::setId方法的具体用法?PHP Software::setId怎么用?PHP Software::setId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Software的用法示例。


在下文中一共展示了Software::setId方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: retornaSoftwaresComId

 public function retornaSoftwaresComId()
 {
     $sql = "SELECT * FROM software ORDER BY id_software DESC LIMIT 10";
     $result = $this->conexao->query($sql);
     foreach ($result as $linha) {
         $software = new Software();
         $software->setNome($linha['nome']);
         $software->setLinguagem($linha['linguagem']);
         $software->setId($linha['id_software']);
         $softwares[] = $software;
     }
     if (isset($softwares)) {
         return $softwares;
     } else {
         return null;
     }
 }
开发者ID:joseolinda,项目名称:escritordesoftware,代码行数:17,代码来源:SoftwareDAO.class.php

示例2: toEntity

 public static function toEntity(SoftwareDTO $softwareDTO)
 {
     $software = new Software();
     $software->setId($softwareDTO->getId());
     $software->setSoftwareNumeroSerie($softwareDTO->getSoftwareNumeroSerie());
     $software->setSoftwareNombre($softwareDTO->getSoftwareNombre());
     $software->setSoftwareVersion($softwareDTO->getSoftwareVersion());
     $software->setSoftwareFechaCaducidad($softwareDTO->getSoftwareFechaCaducidad());
     $software->setSoftwareFechaAquisicion($softwareDTO->getSoftwareFechaAquisicion());
     $software->setSoftwareEquiposPermitidos($softwareDTO->getSoftwareEquiposPermitidos());
     $software->setSoftwareComentarios($softwareDTO->getSoftwareComentarios());
     return $software;
 }
开发者ID:AtsumiK,项目名称:ClasesComputadoras,代码行数:13,代码来源:SoftwareDTO.php

示例3: SoftwareDAO

<body>

	<div id="topo">
		<img src="images/logo.png" alt="" />
	</div>

	<div id="conteiner">
		<?php 
if ($_GET['idsoftware']) {
    // vou fechar isso lá no final
    $_SESSION['meuSoftwareId'] = $_GET['idsoftware'];
    $conexao = Conexao::retornaConexaoComBanco();
    $softwaredao = new SoftwareDAO();
    $softwaredao->setConexao($conexao);
    $software = new Software();
    $software->setId($_GET['idsoftware']);
    $software = $softwaredao->retornaSoftwareDetalhado($software);
    ?>
	
				
		<div id="esquerda">

			<?php 
    echo '<h1>' . $software->getNome() . '</h1>';
    echo '<h2>Informações:</h2>
				<p>Linguagem: ' . $software->getLinguagem();
    if ($software->getBancoDeDados()) {
        echo '; Banco: ' . $software->getBancoDeDados()->getSistemaGerenciadorDeBancoDeDados() . '</p>';
    }
    ?>
 
开发者ID:joseolinda,项目名称:escritordesoftware,代码行数:30,代码来源:escreversoftware.php

示例4: Atributo

	<div id="conteiner">
		
		<div id="esquerda">
			<?php 
if ($_SESSION['meuSoftwareId'] && $_POST['nomedoatributo']) {
    $atributo = new Atributo();
    $atributo->setNome($_POST['nomedoatributo']);
    $atributo->setTipo($_POST['tipodeatributo']);
    $atributo->setIndice($_POST['indice']);
    $atributo->setTipoDeRelacionamentoComObjeto($_POST['relacionamento_com_outro_tipo']);
    $objeto = new Objeto();
    $objeto->setId($_POST['objeto']);
    $objeto->addAtributo($atributo);
    $software = new Software();
    $software->setId($_SESSION['meuSoftwareId']);
    $software->addObjetoNaLista($objeto);
    $conexao = Conexao::retornaConexaoComBanco();
    $atributodao = new AtributoDAO();
    $atributodao->setConexao($conexao);
    if ($atributodao->inserir($objeto, $atributo)) {
        echo "Atributo Inserido Com sucesso!";
        echo '<META HTTP-EQUIV="REFRESH" CONTENT="0; URL=software.php?idsoftware=' . $_SESSION['meuSoftwareId'] . '">';
    } else {
        echo "Atributo Não Inserido";
        echo '<META HTTP-EQUIV="REFRESH" CONTENT="0; URL=software.php?idsoftware=' . $_SESSION['meuSoftwareId'] . '">';
    }
}
?>

			
开发者ID:joseolinda,项目名称:escritordesoftware,代码行数:28,代码来源:inserirprodutos.php

示例5: listComputadoraSoftwaresBySoftwareId

 /**
  * Listar algunos ComputadoraSoftware dado el $softwareId
  * 
  * @param $softwareId
  * @param $performSize
  * @param $firstResultNumber
  * @param $numResults
  */
 public function listComputadoraSoftwaresBySoftwareId($softwareId, $performSize = false, $firstResultNumber = null, $numResults = null, $orderBy = null, $orderPriority = SQL_ASCENDING_ORDER)
 {
     $objBean = new SoftwareBean($this->persistenceManager);
     $obj = new Software();
     $obj->setId($softwareId);
     # Validamos los campos
     if ($firstResultNumber !== null && !EntityValidator::validatePositiveNumber($firstResultNumber)) {
         throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 105);
     }
     if (!EntityValidator::validateGlobalOrderPriority($orderPriority)) {
         throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 107);
     }
     if (!EntityValidator::validateId($softwareId)) {
         throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 109);
     }
     # Verificamos que la entidad exista
     if (!$objBean->getSoftware($obj)) {
         throw new Exception(SALAS_COMP_ALERT_E_ENTITY_NOT_FOUND_FAIL, $this->ID + 111);
     }
     # Listamos las entidades
     if ($performSize) {
         $this->lastRequestSize = $this->computadoraSoftwareBean->countGetComputadoraSoftwaresBySoftware($obj);
     }
     return ComputadoraSoftwareDTO::loadFromEntities($this->computadoraSoftwareBean->listComputadoraSoftwaresBySoftware($obj, $firstResultNumber, $numResults, $orderBy, $orderPriority));
 }
开发者ID:AtsumiK,项目名称:ClasesComputadoras,代码行数:33,代码来源:ComputadoraSoftwareController.php

示例6: removeSoftware

 /**
  * Eliminar un Software Dado el $softwareId
  * 
  * @param $softwareId
  */
 public function removeSoftware($softwareId)
 {
     $computadoraSoftwareBean = new ComputadoraSoftwareBean($this->persistenceManager);
     $software = new Software();
     $software->setId($softwareId);
     # Validamos los campos
     if (!EntityValidator::validateId($softwareId)) {
         throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 249);
     }
     # Verificamos que la entidad exista.
     if (!$this->softwareBean->getSoftware($software)) {
         throw new Exception(SALAS_COMP_ALERT_E_ENTITY_NOT_FOUND_FAIL, $this->ID + 250);
     }
     # Verificamos que la entidad no esté siendo utilziada en alguna otra.
     # Verificamos que la entidad no esté siendo utilziada en ComputadoraSoftware->software
     $computadoraSoftwares = $computadoraSoftwareBean->getComputadoraSoftwaresBySoftware($software);
     if (count($computadoraSoftwares) > 0) {
         throw new Exception(SALAS_COMP_ALERT_E_PERSISTENCE_REMOVE_LINKED_FAIL, $this->ID + 248);
     }
     # Eliminamos la entidad
     if (!$this->softwareBean->removeSoftware($software)) {
         throw new Exception(SALAS_COMP_ALERT_E_PERSISTENCE_REMOVE_FAIL, $this->ID + 251);
     }
 }
开发者ID:AtsumiK,项目名称:ClasesComputadoras,代码行数:29,代码来源:SoftwareController.php


注:本文中的Software::setId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。