Skip to main content

All Questions

Tagged with
2 votes
1 answer
314 views

PHP OOP: Configuring MySQL DB & query w/ Twig

I decided to up my PHP game and learn some OOP. I am re-building my website from procedural to OOP, but since I don't want to use a full framework I fiddle with some components. As a router I use ...
bender's user avatar
  • 21
3 votes
2 answers
209 views

Router and solid principle

I would like to know if my Routing system respects the solid principle ? The system is simple, Router class contains the routes and returns the correct route and Route class represents a route, ...
user avatar
1 vote
1 answer
187 views

Is this an good OOP Design in MVC PHP for getting User Details?

I was given a API project by my co-worker to work on half created a system in slim PHP. The project consists of the Models and controllers. When the route is called it calls the Controller with the ...
camille's user avatar
  • 147
1 vote
1 answer
1k views

PHP OOP MVC Project Structure

I'm a beginner in OOP and PHP frameworks. I used slim skeleton to create a project and designed the project in this way. Project structure is given by the slim skeleton. Object Mappers are added by ...
Tharindu's user avatar
  • 143
4 votes
1 answer
175 views

Upload and database insert php function

I love to post here on codereview my code to have a feedback from developers that have more experience than me, to improve my coding skills. During these days I'm working on a webapp for a small ...
user9741470's user avatar
1 vote
1 answer
73 views

store and warehouse management class

I've already posted this PHP class few days ago when I started writing it. Now that all the methods and all the controller logics are ready, I will be ask here for some suggestions about how to ...
user9741470's user avatar
1 vote
1 answer
183 views

Controller with abstract methods for a delete method

I'm studying OOP and MVC structure, and all my controllers extends the main controller, and almost all of them has a delete method, basically this: ...
Thiago Dias's user avatar
1 vote
1 answer
150 views

Fat-free MVC Controller

I have this class containing a method that performs a few processes for displaying the payment page. ...
herondale's user avatar
  • 145
2 votes
1 answer
187 views

Improving my bootstrap class (MVC)

I need feedback on my Bootstrap for the MVC architecture that I follow. I load the routes via yaml. Here is an example: ...
DaAmidza's user avatar
  • 259
3 votes
2 answers
581 views

Business logic inside MVC Cart Controller method

I have a controller method, invoked when a user adds the product he is viewing to the cart. The way I understand how MVC works, this can be considered a fat controller already, but I'm still not ...
herondale's user avatar
  • 145
1 vote
2 answers
16k views

PHP Routing with MVC Structure

I'm trying to do a simple CMS with PHP from scratch using MVC structure. Yesterday I posted this, which is a login system using PHP and it works but it has a handful of problems regarding the OOP ...
nick's user avatar
  • 335
0 votes
1 answer
685 views

MVC Auth Structure and Dependency Injection with PHP-DI 5 and Slim 3

I'm creating an authentication with the Slim 3 framework and PHP-DI 5 (PHP-DI/PHP-DI). The project will be the base/starter template for my new projects. I want it to be easy to extend, also to ...
Ramon Bakker's user avatar
3 votes
2 answers
220 views

Separating PHP code and logic

I am new to OOP and slowly starting to learn it to increase my PHP. This is my first attempt at writing something using OOP. Now people always talk about separating the logic and php code from the ...
Tim C's user avatar
  • 167
2 votes
1 answer
196 views

CMS controllers, from procedural to object oriented

I made my own extra slim flat file CMS with PHP, for a website that needs simple updates. You can have a look at its functional current state here (username is Username, password is Password). I ...
Raoulito's user avatar
  • 121
5 votes
1 answer
4k views

Building a model-view-controller application in PHP

I've seen at least two recent PHP questions that would do well from a Model-View-Controller ('MVC' from here-on-out in this question) setup. Now, me, being the horrible person I am, I wanted to build ...
Der Kommissar's user avatar

15 30 50 per page
1
2 3 4 5