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


PHP Categoria::getId方法代码示例

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


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

示例1: inserir

 public function inserir(Categoria $categoria)
 {
     //Objetivo deste metodo é inserir um objeto no banco, fazendo-o ter persistencia.
     //utilizaremos a abstracao do SQL da classe TsqlInstruction
     //1. Foreach dos atributos . PRa cada existencia de atributo é um valor a ser adicionado.
     $instrucao = new TSqlInsert();
     $instrucao->setEntity("categoria");
     if ($categoria->getId() != null) {
         $instrucao->setRowData("id", $categoria->getId());
     }
     if ($categoria->getNome() != null) {
         $instrucao->setRowData("nome", $categoria->getNome());
     }
     if ($categoria->getDescricao() != null) {
         $instrucao->setRowData("descricao", $categoria->getDescricao());
     }
     echo $instrucao->getInstruction();
     if ($this->Conexao->query($instrucao->getInstruction())) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:joseolinda,项目名称:escritordesoftware,代码行数:23,代码来源:CategoriaDAO.class.php

示例2: setCategoria

 /**
  * Declares an association between this object and a Categoria object.
  *
  * @param      Categoria $v
  * @return     Pelicula The current object (for fluent API support)
  * @throws     PropelException
  */
 public function setCategoria(Categoria $v = null)
 {
     if ($v === null) {
         $this->setCategoriaId(NULL);
     } else {
         $this->setCategoriaId($v->getId());
     }
     $this->aCategoria = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the Categoria object, it will not be re-added.
     if ($v !== null) {
         $v->addPelicula($this);
     }
     return $this;
 }
开发者ID:nico85,项目名称:2012_pw2_tp2,代码行数:22,代码来源:BasePelicula.php

示例3: prune

 /**
  * Exclude object from result
  *
  * @param     Categoria $categoria Object to remove from the list of results
  *
  * @return    CategoriaQuery The current query, for fluid interface
  */
 public function prune($categoria = null)
 {
     if ($categoria) {
         $this->addUsingAlias(CategoriaPeer::ID, $categoria->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
开发者ID:nico85,项目名称:2012_pw2_tp2,代码行数:14,代码来源:BaseCategoriaQuery.php

示例4: filterByCategoria

 /**
  * Filter the query by a related Categoria object
  *
  * @param     Categoria|PropelCollection $categoria The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return    PeliculaQuery The current query, for fluid interface
  */
 public function filterByCategoria($categoria, $comparison = null)
 {
     if ($categoria instanceof Categoria) {
         return $this->addUsingAlias(PeliculaPeer::CATEGORIA_ID, $categoria->getId(), $comparison);
     } elseif ($categoria instanceof PropelCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(PeliculaPeer::CATEGORIA_ID, $categoria->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByCategoria() only accepts arguments of type Categoria or PropelCollection');
     }
 }
开发者ID:nico85,项目名称:2012_pw2_tp2,代码行数:21,代码来源:BasePeliculaQuery.php


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