Tag Archives: Classe

Can we create an object of a class inside another class in php?

Can we create an object of a class inside another class in php?I hav made a small application in php,now I am trying to convert the entire code in a class-methods-object fashion.I m now Confused.Continuer la lecture

Tagged , , | Laisser un commentaire

Class Extension PHP Dépasse RAM – CodeIgniter

I am modifying the model class by completely replacing it. I also wanted to break most of the components in different classes and to be loaded when they are needed. This particular class has to be loaded in the constructor.Continuer la lecture

Tagged , , , , | 1 Comment

Class Loading Its Extensions by itself – PHP

Voici mon problème.
It also comes with the next error.
*It’s not important, I am adding it instead of tags for search engines.
Call to a member function hi() sur un non-objet dans
/path/to/your/application/test.php on
en ligne 59

class Class_B{

     

Continuer la lecture

Tagged , , , , | Laisser un commentaire

PHP Warnings, Notices and Errors

Hey guys I’m getting three things right now that I’m trying to take care of, and hoping you can help. I have and error, a warning, and a notice in my code that I would like to patch up andContinuer la lecture

Tagged , , , , | Laisser un commentaire

Sending jquery ajax variable to a PHP class

I am using a php class to generate drop down boxes dynamically. But page was refreshing every time. But now i am trying to change it to ajax and i want to send ajax variable via post method. mais la… Continuer la lecture

Tagged , , , | Laisser un commentaire

Intermittent émission redimensionnement d'image

I’m uploading images via stream_copy_to_stream() and then re-sizing them using the class and method below.
This is my resize class: http://pastebin.com/wtbcbfzv
I’m using it like so.

$resizeObj = new resize('image.jpg');
$resizeObj -> resizeImage(960, 800, 'auto');
$resizeObj -> saveImage('image.jpg', 100);

Cependant Continuer la lecture

Tagged , , , | Laisser un commentaire

php classe d'hériter une seule méthode

I have these classes:

class User{
    private $user_ID;
    private $first_name;
    private $surname;
    ...

    private $website;
    private $company;

    function __construct($array){
        $this->user_ID            = $array["userId"];
        $this->first_name         = $array["first"];
        $this->surname            = $array["last"];
        $this->telephone          = $array["tele"];
        ...
    }
    public function addWebsite($array){
        $this->website = $array;
    }
    

Continuer la lecture

Tagged , , , | 2 Commentaires

PHP OOP Design Pattern

I recently read an article on Wikipedia about Design Pattern
So far I’ve done this, but it returns Fatal error: Maximum function nesting level of '100' reached, aborting!…
Logically I know, it will return nesting error, Mais, I don’t understand Continuer la lecture

Tagged , , , , | 1 Comment

how to get input parameters of any method of a class in PHP?

Let’s say I have a class with 10 méthodes, each method has different parameters.
I want to log input parameters of all methods of said class without having to do edit each method to insert that logging code. Y at-il… Continuer la lecture

Tagged , , , | Laisser un commentaire

PHP Variables, classes and inheritance understanding the basics

I am working on a PHP project and I need some help with the basics. I have a Vehicle class. Within the vehicle class there is a variable called fuel_capacity. As you would expect the fuel capacity changes from vehicleContinuer la lecture

Tagged , , , | Laisser un commentaire
12 pages