#
#
#yamynginx2020-04-18 21:58:32
PHP
#yamynginx, 2020-04-18 21:58:32

What is the right way to call such a class?

Hello. I am writing a library for VK, and then a question arose.

I want to make a regular class for working with messages, and an additional class for working with pictures.
Actually, what class should I call?

It seems to me that if I want to call VK_Image, then VK will be called (logically rofl), but there is no constructor in VK_Image. And yet, if I call the VK class, will it pull VK_Image along with it?

5e9b4d71beb80861043367.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alan Gibizov, 2020-04-19
@muxui

If I understand correctly, vk_image is based on the vk class. For the vk class, the child class vk_image is not "pulled up" in any way. On the contrary, when you create an object based on the vk_image class, the vk_image class will take the vk class (along with all its constructors, parameters and methods) as a basis and add to its methods and parameters (or replace it, depending on the implementation) with its own methods and options.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question