modifying a property of an object from a different class


Posted on 16th Feb 2014 07:03 pm by admin

I have 2 classes:
- Math
- Distance

in my math class, I have this line:
$distance = new Distance($this->query, $this->distances);
and this property:
public $special = array();

in my Distance class, when it is created, it has a method that is run called "parse". In the parse method, I want to modify the property shown above in Math, and add values to that array. How can I do this?

No comments posted yet

Your Answer:

Login to answer
309 Like 34 Dislike
Previous forums Next forums
Other forums

If a record matches an existing record do nothing
So I don't know if I should put this here or in mysql, but what my script is for is for people to ad

NOOB needs help with upload file
The intent of this form is to create a folder for a client and upload an image into another folder '

Creating XML with php
I need to creat an XML with php and have successfully produced a valid output.
The problem I hav

Display last record first.
I need some help how put the last record first and first record last.

Thanks

Code: &am

trim function issues
Hi guys, total noob here...

So I've been tinkering around with a html and am using php to em

Image DPI
Hi.

I allow users to upload images, the user then is able to adjust several settings for the

PHP4 to PHP5 Conversion
Hi Everyone,

I am working on a site that is built up on PHP4 and each page is being started f

having a small php error tha deals with the 'foreach'
Last night i was working on a script for a cart and it seemed to working good, until this morning. F

output_buffering so rewrite
I'm planning to rewrite some of my scripts so they don't have to use output buffering to accomplish

Loosing changed contents when used FM REUSE_ALV_GRID_DISPLAY
Hi,

I have used FM REUSE_ALV_GRID_DISPLAY in my program as below.

CALL FUNCT

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash