Archivo de la etiqueta: clase
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.… Sigue leyendo
PHP Class Extension Exceeds 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.… Sigue leyendo
Class Loading Its Extensions by itself – PHP
Aquí está mi 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() en un no-objeto en el
/path/to/your/application/test.php on
línea 59
class Class_B{
…
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 and… Sigue leyendo
El envío de jQuery variable de ajax para una clase PHP
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. pero la… Sigue leyendo
Intermitente Cambiar el tamaño de la imagen de emisión
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);
…
Sin embargo Sigue leyendo
php class to inherit only one method
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;
}
…
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, Pero, I don’t understand Sigue leyendo
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. ¿Hay… Sigue leyendo
PHP, las variables, clases y herencia de la comprensión de los conceptos básicos
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 vehicle… Sigue leyendo





