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.Continue lendo

Tagged , , | Deixe um comentário

PHP Extensão Classe Excede 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.Continue lendo

Tagged , , , , | 1 Como

Class Loading Its Extensions by itself – PHP

Aqui está o meu problema.
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() em um não-objeto em
/path/to/your/application/test.php on
linha 59

class Class_B{

     

Continue lendo

Tagged , , , , | Deixe um comentário

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 andContinue lendo

Tagged , , , , | Deixe um comentário

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. mas o… Continue lendo

Tagged , , , | Deixe um comentário

Edição de Imagem Intermitente Re-dimensionamento

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);

Contudo Continue lendo

Tagged , , , | Deixe um comentário

php class para herdar apenas um método

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;
    }
    

Continue lendo

Tagged , , , | 2 Comentários

PHP Design Pattern OOP

I recently read an article on Wikipedia about Design Pattern
Até agora eu fiz isso, mas retorna Fatal error: Maximum function nesting level of '100' reached, aborting!…
Logicamente eu sei, ele irá retornar erro de aninhamento, Mas, I don’t understand Continue lendo

Tagged , , , , | 1 Como

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

Let’s say I have a class with 10 métodos, 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. Existe… Continue lendo

Tagged , , , | Deixe um comentário

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 vehicleContinue lendo

Tagged , , , | Deixe um comentário
12 páginas