All Questions
Tagged with visibility php
142
questions
0
votes
3
answers
108
views
undefined variable in construct function [closed]
I think this might be a simple issue of variable scope, but I'm stumped as to where the issue lies. Given the following lines of code
class mysqlaccess {
private $creds;
private $error;
protected $...
4
votes
1
answer
5k
views
Private method overriding and visibility
I'm having a hard time trying to understand the output of the following code:
class Bar
{
public function test() {
$this->testPublic();
$this->testPrivate();
}
...
2
votes
2
answers
1k
views
PHP variable visibility and behaviour with magic method
This question is related to: PHP magic methods example
I've asked this question in comment in accepted answer but I guess, it has not been noticed so I have to create this question.
<?php
...
0
votes
1
answer
875
views
Accessing child property from Parent class in php
I come from java background and recently testing some OOP methodology in PHP. I found that it is permitted for a parent class to use Child class property. The code below describes what I am trying to ...
-2
votes
1
answer
175
views
PHP profile columns visibility + MySQL
I'm seeking for the best method to implement the column visibility in users profile.
Imagine the following scenario:
Name : stackoverflow | [checkbox] visible = 1
Address: New York | [...
2
votes
1
answer
268
views
php inheritance with protected array property is giving me a serious headache
So I decided to make some classes in PHP so I can dynamically construct a menu bar using <ul>, <li> and <a> tags. Reason why is because I want to reuse this across projects.
First the Blob ...
1
vote
2
answers
746
views
Images wont show in wordpress
So,
My images are located in wp-content/themes/mytheme/images
Originally, when i converted my site from html/css the path looked like this:
<img src="images/myimage.png" alt="some text" />
...
0
votes
1
answer
146
views
PHP class Heritage and Iteration on members when using private visibility
I just wanted to implement generic methods on all my classes ( wich represents data from a database ).
I wasn't able to find a reason why this isn't working, any ideas ? (on php 5.3.1)
class ...
1
vote
3
answers
3k
views
Change protected value in object (PHP)
When I do a var_dump of the array $mailer I get:
object(Fooman_EmailAttachments_Model_Core_Email_Template_Mailer)#352 (8) {
["_emailInfos":protected]=>
array(3) {
[0]=>
object(...
0
votes
2
answers
808
views
Laravel - extending models to controller
Is extending model to a controller a good idea?
Like say I want to make my functions in the model protected instead of public and then extend my model to the controller so that the controller can ...
4
votes
3
answers
4k
views
mysql - How to pass main query value into a join in subquery
I have the following query (well... the part that bugs me of it):
SELECT DISTINCT `serv`.`id`, `serv`.`name`, `prj`.`id` AS `idProject`, `prj`.`name` AS `projectName`, `units`.`id` AS `idUnit`,
`...
3
votes
3
answers
618
views
Access private methods from outside a class
I have a Bcrypt.class which contains my hashing methods and I have a userDAO.class which contains my register method.
In my Bcrypt.class the methods are private. How can I access them in my userDAO....
1
vote
2
answers
2k
views
Joomla call another controller function
hi currently i have 2 controllers as follow:
item.php
function convertItem(){
}
project.php
function saveProject(){
}
How can i call saveProject() function within convertItem() ? Thanks
0
votes
3
answers
93
views
public array property not populated when using method to populate
I'm making a generic function to push key-value pairs in an array that is a public property.
When I call the pushDetailsToArray function, inside the getHospitalDetails function the public property ...
0
votes
2
answers
89
views
Wordpress: Turn off login verification on post view page
Now when I want visit unpublished post page by direct URL like http://.../?p=123 I see 404 error page. Where in code I must to perform fixes to show posts for all guests and visitors undependable from ...