ITELEC 4100: PHP OOP

0.0(0)
studied byStudied by 7 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/18

flashcard set

Earn XP

Description and Tags

PHP OOP

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

19 Terms

1
New cards

Object-Oriented Programming (OOP)

is a programming model that is based on the concept of classes and objects.

2
New cards

Class

is a self-contained, independent collection of variables and functions which work together to perform one or more specific tasks.

acts as template or blueprint from which individual objects can be created.

3
New cards

Object

are individual instances of a class.

4
New cards

class

A class can be declared using the ____ keyword, followed by the name of the class, and a pair of curly braces {}.

5
New cards

Properties, Methods

Variables within a class are called _____, while functions are called ______.

6
New cards

PascalCase

Class names are also conventionally written in ________

i.e. each concatenated word starts with an uppercase letter

(e.g. MyClass).

7
New cards

arrow symbol (->)

is an OOP construct that is used to access contained properties and methods of a given object.

8
New cards

$this

The pseudo-variable that provides a reference to the

calling object.

9
New cards

Constructor __construct()

allows us to initialize the object’s properties upon creation of the object.

10
New cards

Constructor

is invoked automatically every time you create an object.

11
New cards

Destructor

is invoked automatically every time you createa __destruct() function.

12
New cards

Access Modifiers

When working with classes, you can even restrict access to its properties and methods using the visibility keywords for greater control.

13
New cards

Public

a public property or method can be accessed anywhere within or outside of class. Default in PHP

14
New cards

Protected

a protected property or method can only be accessed within the class itself or in inherited classes.

15
New cards

Private

a private property or method is accessible only within the class that defines it.

16
New cards

extends

Classes can inherit the properties and methods of another class

using the _______ keyword.

17
New cards

constant

fixed in compile-time variable that cannot be changed at runtime

18
New cards

static

fixed in compile time variable that can be changed during runtime

19
New cards

Valorant class: Initiator

This class inherits the ability to INITIATE a site with a method of constructing information and destructing opposing team.