Jump to content

Hari KT

  • Posts

  • Joined

  • Last visited

Everything posted by Hari KT

  1. RT @philsturgeon: A Peek At Aura v2 -- Aura.Dispatcher http://t.co/z9pCf2IuWs #php

  2. RT @pmjones: @stanlemon Totally! Dispatcher is totally agnostic there. Any object and method can be dispatched to. /cc @auraphp

  3. Yey, nice time to get involved in ProcessWire. I have been looking at Processwire for a recent project. It is really nice from a user perspective hiding all the complex functionalities. Amazing work guys. I don't say you move to use this or that ( Though I am more inclined towards Aura ). Composer is really a nice tool, and when we go with composer and you install it is always good to keep the files in vendor folder itself. Some of the things in my mind are 1. Flexibility to move the index.php to outside the main folder. So only index.php is the only file lies there. else vendor folder will be visible to the public . May be readmes and all . 2. When working on aura v1 , we installed the packages in the package folder itself. But that is a hard way to manage. So we started with http://github.com/auraphp/Aura.Includer/ So it will be nice to have something like adding a certain configuration file in the module of PW which helps to recognise the file is processwires and which needs to be loaded via same ? Also does the 2.4 development is finished ? There is PSR-4 also coming, which reduces the size of the namespace stuffs. \ProcessWire\Event\Manager => src/Manager.php ( PSR-4 ) than the previous one /src/ProcessWire/Event/Manager.php I am looking forward to contribute to PW aslo please choose PSR-2 also. It is all about future and how we all PHP community work ( For I contribute to Aura, Symfony, Zend etc life is easy ) . Thanks
  4. Thanks @Wanze . So to make it clear, what I am doing is moving the index.php to a seprate folder. Say site wire web index.php So the problem we are going to face is none of the images, js, css cannot be accessed. A good example is call for http://processwire.localhost/site/templates/styles/main.css will result in 404 , for the only entry point is index.php . I can create symbolic links, but I thought of making a module . So my goal is to create a module which can check whether the request is for a certain type ( css, image, js ) and return the content according to the type. (I have already created the same.) About the usage of $_SERVER seems a bad idea to me as I mentioned earlier. If some ( 3rd party module ) replaces the content, hard to deal. For those who don't know me, I have a bit of background in aura project ( and some other open-source projects ) and you can see the how the $_SERVER is accessed. Once you set, even if someone resets the superglobals the object value never changes. Let me show you an example from aura v2 <?php use Aura\Web\WebFactory; $web_factory = new WebFactory($GLOBALS); $request = $web_factory->newRequest(); echo " Request uri is " . $request->server->get('REQUEST_URI'); $_SERVER['REQUEST_URI'] = 'oye I am changing'; echo $_SERVER['REQUEST_URI'] . PHP_EOL; echo $request_uri = $request->server->get('REQUEST_URI', ''); If you have tried the above example you will understand what I mean. ( I am not promoting aura here, my goal is to make PW things better and secure. I am also going to search for the thread composer and how it is utilized ) If anyone is interested have a look into the links below https://github.com/auraphp/Aura.Web/blob/develop-2/README-REQUEST.md#superglobals https://github.com/auraphp/Aura.Web/blob/develop-2/src/Request.php#L162 https://github.com/auraphp/Aura.Web/blob/develop-2/src/Request/Globals.php#L99 https://github.com/auraphp/Aura.Web/blob/develop-2/src/Request/Values.php#L36 Thank you.
  5. RT @jibone: This AuraPHP seems interesting... Libraries first, framework second eh? http://t.co/SlMZmch3UB

  6. Thank you @Michael. No I wasn't looking how I can iterate through the server variables. According to what I learned using global values inside the class seems not a good way, so was wondering whether the post values, what sort of REQUEST_METHOD is already called is available via some objects which is called in bootstrap. You can have a test to the code below to see what I mean var_dump($_SERVER); // see how the o/p differs $_SERVER = array(); var_dump($_SERVER); That becomes a hell to all if someone set like this in a module.
  7. Thank you. I found the correct hook, that solves the first part. Like public function init() { $this->addHookAfter('ProcessPageView::pageNotFound', $this, 'someMethod'); } Now looking for the second part . About the $_SERVER usage. Thank you.
  8. Hi, Thank you for the wonderful CMF. This is my first question to the PW community as I started with it. I am in the process of trying to create a module. The basic need is I want to change the content of the 404 page, if the route is something special. Eg : say the request is for http://processwire.localhost/hello and if I know the path doesn't exists I want to do something special. public function init() { $this->addHookBefore('ProcessController::execute', $this, 'someMethod'); } public function someMethod($event) { // also how do I access the $_SERVER variables from processwire point of view } Also how do I access the $_SERVER variables from a PW context. Something like $pages->get('SERVER').
  9. RT @planetphp: A Peek At Aura v2: Aura.Dispatcher - Paul M. Jones http://t.co/xlFIXiEz2W

  10. RT @PHPTownHall: A Peek At Aura v2 -- Aura.Dispatcher http://t.co/CEMIdK0F5P

  11. RT @JeremyKendall: … that a true RESTful API does not exist, and all the back and forth over what is and is not REST is just a bunch of aca…

  12. #zf2 feed please add all the dependencies for the components. I am installing each one separately when I am seeing an exception :( .

  13. RT @nigelbabu: Why isn't this a meme yet? RT @valueof: I can't stop looking at this cat. http://t.co/skoU7mZxfD

  14. RT @shameerc: Be so good, then peoples can't ignore you!

  • Create New...