« first day (32 days earlier)      last day (278 days later) » 

18:26
Gordon has unfrozen this room.
0
Q: How to include file & access class method from from within a method of another class?

Peter SnowI have a class called numDisplay containing several methods. Most of those methods need to use a method from another class called prefs which is contained in another file during the course of their duties. I think I could include the file, instantiate the class prefs and then access the method i...

-2
Q: PHP OOP nested methods?

rinchikI know that you can use nested functions in PHP. Here is the question: I have this code: class ClassName { private $data; function __construct() { } public function myFunction() { if($condition1 != NULL) { ...

0
Q: session_start(): Function spl_autoload_call()

Chris WestI am getting this message on going to several pages: Warning: session_start(): Function spl_autoload_call() hasn't defined the class it was called for in /var/www/library/session/session.php on line 18 This is the file that is creating the calls: <?php namespace iX\session; ...

0
Q: how can I share result of a JOIN between two or more instances?

skyline26for to reduce number of queries, when i select something from my database i want to launch the best possible one, which can be one of these: 1- SELECT ... FROM cities JOIN states ON city.stateID = state.stateID WHERE city.cityID = ... 2- SELECT ... FROM cities WHERE city.cityID = ... 3- SELECT ....

1
Q: Can PHP class contain method not listed by function `get_class_methods` ? If so, how? If not, why does it appear to?

Buttle ButkusI am digging into some Magento code. I'm looking at class Mage_Catalog_Model_Session There is code in class Mage_Catalog_Block_Product_List_Toolbar extends Mage_Core_Block_Template function getCurrentOrder like this: Mage::getSingleton('catalog/session')->getSortOrder(); Now, Mage::getSinglet...

0
Q: PDO and PHP OOP Code Advice

Peter FeatherstoneI am very new to PHP Object Orientated Programming so was wondering if I could get some good advice on a database object I created. I call the class db and include my class into every page load and initiate the database object using $db = new db. I then call the method inside this for each acti...

-4
Q: Deciding php technique

user1852196How to decide which php technique to use when building a website like MVC, OOP, etc...? What criteria should be considered to decide? And what type of website MVC is good for?

0
Q: Problems implementing data mapper pattern for custom PHP framework

james455Apologies in advance for the complexity of this question! After reading about the Data Mapper pattern here on Stack Overflow, I'm in the middle of refactoring the Model layer of my own PHP framework. It used to have a ActiveRecord-like implementation but it was getting too complex. A model tha...

2
Q: fat model and skinny controller design confusion between the controller method and model method

mohuri'm newbie in MVC (using codeIgniter as my example) and i have read MVC fat model and skinny controller for like 3 times, what i got : model does the hardwork while controller calls the model and passes the data to be rendered by view but i have one confusion , example i have an admin page th...

0
Q: How should I simplify PDO wrapping and how do I prevent repetitive code

Joey Salac HipolitoI have this database implementation using PDO. But I cannot continue on developing my application because I think there will be repetitive code I have setup the application so that it uses a front_controller. I have a boostrap that does the routing, passed in a request object to a router class ...

18:38
Please talk to @Feeds once in a while. Otherwise he gets lonely and more importantly the room will freeze
4
 
5 hours later…
23:24
0
Q: Form validation stops working when I render pages using another controller

pdizzI wrote a quick CI library class to render my pages so I wouldn't have to keep typing '$this->load->view' all the time and for DRY. Now when I re-render my contact form after passing in invalid data the error messages aren't showing up. The library class: class Page extends CI_Controller { ...

0
Q: Have access to a common class in a PHP MVC framework

Gerben JacobsI have read a lot of SO topics about this already, but still haven't found (or have been able to create) a proper answer. I am working on a small MVC framework and I want some global class/object that I can call from my controllers (but maybe models too). There are a couple of routes I can take...

23:42
0
Q: The life of static attributes

user2203484Let's say I have a Route class, and I call a couple of times Route::set() method. This method does one thing: self::objects[] = new Route(); which is saving the Route instance inside the class attribute array. What will happen in this situation? Logically, set() will create a lot of Route ins...


« first day (32 days earlier)      last day (278 days later) »