Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7436475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:14:44+00:00 2026-05-29T10:14:44+00:00

Is it possible to make a method documentation on the abstract method and whoever

  • 0

Is it possible to make a method documentation on the abstract method and whoever extends it inhered the documentation also?
Example:

<?php
abstract class Math{
    /**
     * Method that receive two values and return the result of some operation.
     * @param $a Number
     * @param $b Number
     */
    abstract public function values($a, $b);
}
?>

<?php
class Sum extends Math{
    /**
     * @return $a+$b;
     */
    public function values($a, $b){
        return $a+$b;
    }
}
?>

<?php
class Divide extends Math{
    /**
     * @return $a/$b;
     * @throws Exception.
     */
    public function values($a, $b){
        if($b != 0){
            return $a/$b;
        }else{
            throw new Exception("Impossible to divide by 0.");
        }
    }
}
?>

How do I put all those informations about the method together? Currently, I work with Netbeans 7.1. Is it a IDE issue? Or is it just not how this works?

<?php
// Estabele conexão com o MySQL
$connect = mysql_connect('localhost', 'root', '123456') or die('A conexão falhou.');
// Seleciona o banco de dados
$database = mysql_select_db('monografia', $connect) or die('Falha ao tentar selecionar banco de dados.');

if ($database)
    echo 'Conectado atraves do driver nativo.';

?>

<br />

<?php
class Conexao {
    protected $conexao;
    public function Conexao() {
        $this->conexao = new MySQLi('localhost', 'root', '123456', 'monografia', 3306);
        if (!$this->conexao->connect_error)
            echo 'Conectado atraves da extensao MySQLi.';
    }
}
new Conexao();

?>

<br />

<?php
class ConexaoPDO {
    protected $pdo;    
    public function ConexaoPDO() {
        try {
            $this->pdo = new PDO('mysql:host=localhost:3306;dbname=monografia', 'root', '123456', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
            echo 'Conectado atraves do PDO.';
        } catch(PDOException $e) {
            echo $e->getMessage();
        }
    }
}

new ConexaoPDO();
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:14:45+00:00Added an answer on May 29, 2026 at 10:14 am

    I suggest you look at @inheritDoc tag.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How does one make a method in an interface that's not abstract? I know
Is it possible to make a method that returns a String[] in java?
I have a base class that is marked as abstract. Is it possible to
Is it possible to make a method return a dynamic List type. Such as
I'm wondering if it's possible to make a method which behaves differently when called
Is it possible to make a public method private in a subclass? I don't
Is it possible make some handler that will do something when user shutdown computer
Is it possible to make it appear to a system that a key was
Is it possible to create a dbus method that accepts multiple arguments? I wish
Is it possible to make Visual Studio 2010's code completion window more like that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.