Re: PHP y OOP
| From: | Matias Salimbene | Date: | Thu, 31 Mar 2005 00:59:34 +0000 |
| Subject: | Re: PHP y OOP | ||
| References: | 1 2 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-53885@lists.php.net to get a copy of this message | ||
andubo perfecto, porque es necesario poner var? y otra pregunta, puede una
clase que sea subclase de mas de una clase base?
algo como: "class subclase extends clase1,clase2"
"Jorge" <tontas@gmail.com> wrote in message
news:424B345E.8030202@gmail.com...
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
> }
>