kohana-3.2

How to upgrade from Kohana 3.2 to 3.3 (implementing PSR-0)?

纵然是瞬间 提交于 2019-12-09 01:38:18
问题 What steps do I need tot take to upgrade from Kohana 3.2 to 3.3 with respect to the implementation of PSR-0 and what commands have to be executed from the command line? 回答1: Unix command line: These are the steps I took to implement PSR-0 in my Kohana application. I removed the following system/ dir: rm -rf system In your current bootstrap.php the only change is to make the classes start with an upper, so best is to keep your old bootstrap and just change the following lines on top of the

Suppressing the request when running PHPUnit with Kohana 3.2

痞子三分冷 提交于 2019-12-07 07:32:27
I'm having trouble correctly setting up unit testing in Kohana 3.2. I installed PHPUnit. I changed the bootstrap to activate Kohana's unittest module. I also changed the index.php file to look like this: if ( ! defined('SUPPRESS_REQUEST')) { echo Request::factory() ->execute() ->send_headers() ->body(); } I created a folder tests in my application folder. In it, I inserted a phpunit.xml file that looks like this: <phpunit colors="true" bootstrap="../../index.php"> <testsuites> <testsuite name="Kohana Tests"> <directory>./</directory> </testsuite> </testsuites> I am having two problems (the

scraping all images from a website using DOMDocument

大兔子大兔子 提交于 2019-12-01 07:55:44
问题 I basically want to get ALL the images in any website using DOMDocument. but then i cant even load my html due to some reasons I dont know yet. $url="http://<any_url_here>/"; $dom = new DOMDocument(); @$dom->loadHTML($url); //i have also tried removing @ $dom->preserveWhiteSpace = false; $dom->saveHTML(); $images = $dom->getElementsByTagName('img'); foreach ($images as $image) { echo $image->getAttribute('src'); } what happens is nothing gets printed . or did I do something wrong with the

How to upgrade from Kohana 3.2 to 3.3 (implementing PSR-0)?

谁都会走 提交于 2019-12-01 00:57:58
What steps do I need tot take to upgrade from Kohana 3.2 to 3.3 with respect to the implementation of PSR-0 and what commands have to be executed from the command line? Daan Unix command line: These are the steps I took to implement PSR-0 in my Kohana application. I removed the following system/ dir: rm -rf system In your current bootstrap.php the only change is to make the classes start with an upper, so best is to keep your old bootstrap and just change the following lines on top of the file: // Load the core Kohana class require SYSPATH.'classes/Kohana/Core'.EXT; if (is_file(APPPATH.