AppBundle\Entity\Post::getId PHP Method

getId() public method

public getId ( )
    public function getId()
    {
        return $this->id;
    }

Usage Example

 /**
  * @return int
  */
 public function delete(User $user, Post $post)
 {
     $conn = $this->_em->getConnection();
     $statement = $conn->prepare('DELETE FROM post_vote WHERE user_id = :user_id AND post_id = :post_id');
     $statement->bindValue('user_id', $user->getId());
     $statement->bindValue('post_id', $post->getId());
     return $statement->execute();
 }
All Usage Examples Of AppBundle\Entity\Post::getId