Re: PHP y OOP
| From: | jorge | Date: | Wed, 30 Mar 2005 23:21:02 +0000 |
| Subject: | Re: PHP y OOP | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-53884@lists.php.net to get a copy of this message | ||
Hola!
prueba a ponerle el var delante :)
abstract class Core
{
//Core Attributes
var $class; //The class of the element
var $id; //A unique id for the element
var $style; //An inline style definition
...
a ver si tira :D
Matias Salimbene wrote:
Holas, queria saber si se puede usar clases abstractas que contengan solo variables. La idea es tener una base abstracta con un grupo de varibles que despues se pasen a las subclases. Yo uso PHP Designer 5, y me tira un error que dice que espera una funcion en lugar de una variable, en la linea donde aparece la primera variable dentro de la clase abastracta. Por eso mi consulta. saludos! EJEMPLO: abstract class Core {//Core Attributes $class; //The class of the element $id; //A unique id for the element $style; //An inline style definition $title; //A text to display in a tool tip //Language Attributes $dir; //Sets the text direction $lang; //Sets the language code //Keyboard Attributes $accesskey; //Sets a keyboard shortcut to access an element $tabindex; //Sets the tab order of an element} class Table extends Core {//Optional Attributes $align; //Aligns the table. Deprecated. Use styles instead. TF $border; // pixels Specifies the border width. $cellpadding; //Specifies the space between the cell walls and contents STF $cellspacing; //Specifies the space between cells STF $frame; //Specifies how the outer borders should be displayed. $rules; //Specifies the horizontal/vertical divider lines. $summary; //Specifies a summary of the table for speech-synthesizing/non-visual browsers $width; //Specifies the width of the table STF}