Add missing class declaration

Fix tests

Update tests

Fix CS
This commit is contained in:
Nicolas Le Goff
2012-10-17 15:27:00 +02:00
parent a837ede270
commit ec8d577a41
19 changed files with 227 additions and 213 deletions

View File

@@ -61,7 +61,7 @@ define('GV_smtp_port', '');
define('GV_smtp_secure', false);
define('GV_smtp_user', '');
define('GV_smtp_password', '');
define('GV_activeFTP', false);
define('GV_activeFTP', true);
define('GV_ftp_for_user', false);
define('GV_download_max', '120');
define('GV_ong_search', '1');

View File

@@ -45,8 +45,10 @@ use Alchemy\Phrasea\Controller\Prod\Order;
use Alchemy\Phrasea\Controller\Prod\Printer;
use Alchemy\Phrasea\Controller\Prod\Push;
use Alchemy\Phrasea\Controller\Prod\Query;
use Alchemy\Phrasea\Controller\Prod\Record\Property;
use Alchemy\Phrasea\Controller\Prod\Property;
use Alchemy\Phrasea\Controller\Prod\Records;
use Alchemy\Phrasea\Controller\Prod\Root as Prod;
use Alchemy\Phrasea\Controller\Prod\Share;
use Alchemy\Phrasea\Controller\Prod\Story;
use Alchemy\Phrasea\Controller\Prod\Tools;
use Alchemy\Phrasea\Controller\Prod\Tooltip;
@@ -136,6 +138,7 @@ return call_user_func(function($environment = null) {
$app->mount('/prod/WorkZone', new WorkZone());
$app->mount('/prod/lists', new UsrLists());
$app->mount('/prod/MustacheLoader', new MustacheLoader());
$app->mount('/prod/records/', new Records());
$app->mount('/prod/records/edit', new Edit());
$app->mount('/prod/records/property', new Property());
$app->mount('/prod/records/movecollection', new MoveCollection());

View File

@@ -18,11 +18,6 @@ use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/**
*
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
class Export implements ControllerProviderInterface
{
@@ -113,7 +108,12 @@ class Export implements ControllerProviderInterface
*/
public function displayMultiExport(Application $app, Request $request)
{
$download = new \set_export($app, $request->request->get('lst', ''), (int) $request->request->get('ssel'), $request->request->get('story'));
$download = new \set_export(
$app,
$request->request->get('lst', ''),
$request->request->get('ssel', ''),
$request->request->get('story')
);
return new Response($app['twig']->render('common/dialog_export.html.twig', array(
'download' => $download,
@@ -165,32 +165,51 @@ class Export implements ControllerProviderInterface
$download = new \set_exportftp($app, $request->request->get('lst'), $request->request->get('ssttid'));
if (null === $address = $request->request->get('addr')) {
$app->abort(400, _('Missing ftp address'));
$app->abort(400, _('addr parameter is missing'));
}
if (null === $login = $request->request->get('login')) {
$app->abort(400, _('Missing ftp lofin'));
$app->abort(400, _('login parameter is missing'));
}
if (null === $destFolder = $request->request->get('destfolder')) {
$app->abort(400, _('Missing destination folder'));
$app->abort(400, _('destfolder parameter is missing'));
}
if (null === $folderTocreate = $request->request->get('NAMMKDFOLD')) {
$app->abort(400, _('Missing folder to create'));
$app->abort(400, _('NAMMKDFOLD parameter is missing'));
}
if (null === $subdefs = $request->request->get('obj')) {
$app->abort(400, _('Missing subdefs to export'));
$app->abort(400, _('obj parameter is missing'));
}
if (count($download->get_display_ftp()) == 0) {
return $app->json(array('success' => false, 'message' => _('Documents can be sent by FTP')));
} else {
return $app->json(array('success' => false, 'message' => _("You do not have required rights to send these documents over FTP")));
}
try {
$download->prepare_export($app['phraseanet.user'], $app['filesystem'], $request->request->get('obj'), false, $request->request->get('businessfields'));
$download->export_ftp($request->request->get('user_dest'), $address, $login, $request->request->get('pwd', ''), $request->request->get('ssl'), $request->request->get('nbretry'), $request->request->get('passif'), $destFolder, $folderTocreate, $request->request->get('logfile'));
$download->prepare_export(
$app['phraseanet.user'],
$app['filesystem'],
$request->request->get('obj'),
false,
$request->request->get('businessfields')
);
$download->export_ftp(
$request->request->get('user_dest'),
$address,
$login,
$request->request->get('pwd', ''),
$request->request->get('ssl'),
$request->request->get('nbretry'),
$request->request->get('passif'),
$destFolder,
$folderTocreate,
$request->request->get('logfile')
);
return $app->json(array(
'success' => true,
@@ -204,7 +223,6 @@ class Export implements ControllerProviderInterface
));
}
}
}
/**
* Export document by mail
@@ -224,7 +242,14 @@ class Export implements ControllerProviderInterface
//prepare export
$download = new \set_export($app, $lst, $ssttid);
$list = $download->prepare_export($app['phraseanet.user'], $app['filesystem'], $request->request->get('obj'), $request->request->get("type") == "title" ? : false, $request->request->get('businessfields'));
$list = $download->prepare_export(
$app['phraseanet.user'],
$app['filesystem'],
$request->request->get('obj'),
$request->request->get("type") == "title" ? : false,
$request->request->get('businessfields')
);
$list['export_name'] = sprintf("%s.zip", $download->getExportName());
$list['email'] = $request->request->get("destmail", "");
@@ -250,7 +275,12 @@ class Export implements ControllerProviderInterface
if (count($destMails) > 0 && $token) {
//zip documents
\set_export::build_zip(new Filesystem(), $token, $list, $app['phraseanet.registry']->get('GV_RootPath') . 'tmp/download/' . $token . '.zip');
\set_export::build_zip(
new Filesystem(),
$token,
$list,
$app['phraseanet.registry']->get('GV_RootPath') . 'tmp/download/' . $token . '.zip'
);
$remaingEmails = $destMails;
@@ -263,7 +293,16 @@ class Export implements ControllerProviderInterface
//send mails
foreach ($destMails as $key => $mail) {
if (\mail::send_documents($app, trim($mail), $url, $from, $endDateObject, $request->request->get('textmail'), $request->request->get('reading_confirm') == '1' ? : false)) {
if (\mail::send_documents(
$app,
trim($mail),
$url,
$from,
$endDateObject,
$request->request->get('textmail'),
$request->request->get('reading_confirm') == '1' ? : false
)
) {
unset($remaingEmails[$key]);
}
}

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Alchemy\Phrasea\Controller\Prod\Record;
namespace Alchemy\Phrasea\Controller\Prod;
use Alchemy\Phrasea\Controller\RecordsRequest;
use Silex\Application;
@@ -18,11 +18,6 @@ use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/**
*
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
class Property implements ControllerProviderInterface
{
@@ -122,8 +117,6 @@ class Property implements ControllerProviderInterface
$statusBit = $nRec = array();
foreach ($records as $record) {
if ($this->isEligible($app, $record)) {
//perform logic
$sbasId = $record->get_databox()->get_sbas_id();
@@ -138,7 +131,6 @@ class Property implements ControllerProviderInterface
}
if (!isset($statusBit[$sbasId])) {
$statusBit[$sbasId] = isset($databoxStatus[$sbasId]) ? $databoxStatus[$sbasId] : array();
foreach (array_keys($statusBit[$sbasId]) as $bit) {
@@ -152,7 +144,6 @@ class Property implements ControllerProviderInterface
$statusBit[$sbasId][$bit]["nset"] += substr($status, $bit, 1) !== "0" ? 1 : 0;
}
}
}
foreach ($records->databoxes() as $databox) {
$sbasId = $databox->get_sbas_id();
@@ -186,8 +177,6 @@ class Property implements ControllerProviderInterface
$recordsType = array();
foreach ($records as $record) {
if ($this->isEligible($app, $record)) {
//perform logic
$sbasId = $record->get_databox()->get_sbas_id();
@@ -201,7 +190,6 @@ class Property implements ControllerProviderInterface
$recordsType[$sbasId][$record->get_type()][] = $record;
}
}
return new Response($app['twig']->render('prod/actions/Property/type.html.twig', array(
'records' => $records,
@@ -305,38 +293,6 @@ class Property implements ControllerProviderInterface
return null;
}
/**
*
* @param Application $app
* @param record_adapter $record
* @return boolean
*/
private function isEligible(Application $app, \record_adapter $record)
{
$eligible = false;
if (!$app['phraseanet.user']->ACL()->has_hd_grant($record) ||
!$app['phraseanet.user']->ACL()->has_preview_grant($record)) {
try {
$stmt = $record->get_databox()->get_connection()->prepare(sprintf('SELECT record_id FROM record WHERE ((status ^ %s) & %s) = 0 AND record_id = :record_id', $app['phraseanet.user']->ACL()->get_mask_xor($record->get_base_id()), $app['phraseanet.user']->ACL()->get_mask_and($record->get_base_id())));
$stmt->execute(array(':record_id' => $record->get_record_id()));
if ($stmt->rowCount() > 0) {
$eligible = true;
}
$stmt->closeCursor();
unset($stmt);
} catch (\Exception $e) {
}
} else {
$eligible = true;
}
return $eligible;
}
/**
* Prefix the method to call with the controller class name
*

View File

@@ -9,21 +9,15 @@
* file that was distributed with this source code.
*/
namespace Alchemy\Phrasea\Controller\Prod\Records;
namespace Alchemy\Phrasea\Controller\Prod;
use Alchemy\Phrasea\Controller\RecordsRequest;
use Silex\Application;
use Silex\ControllerProviderInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
/**
*
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
class Deletion implements ControllerProviderInterface
class Records implements ControllerProviderInterface
{
/**
@@ -32,11 +26,9 @@ class Deletion implements ControllerProviderInterface
public function connect(Application $app)
{
$controllers = $app['controllers_factory'];
$controllers->before(function(Request $request) use ($app) {
$response = $app['firewall']->requireNotGuest();
if ($response instanceof Response) {
return $response;
}
$app['firewall']->requireNotGuest();
});
/**
@@ -52,7 +44,7 @@ class Deletion implements ControllerProviderInterface
*
* return : JSON Response
*/
$controllers->post('/', $this->call('deleteRecord'))
$controllers->post('/delete/', $this->call('doDeleteRecords'))
->bind('record_delete');
/**
@@ -60,15 +52,15 @@ class Deletion implements ControllerProviderInterface
*
* name : record_what_can_i_delete
*
* description : Save CSS preferences
* description : Verify if I can delete records
*
* method : POST
*
* parameters : none
*
* return : JSON Response
* return : HTML Response
*/
$controllers->get('/', $this->call('whatCanIDelete'))
$controllers->post('/delete/what/', $this->call('whatCanIDelete'))
->bind('record_what_can_i_delete');
/**
@@ -97,7 +89,7 @@ class Deletion implements ControllerProviderInterface
* @param Request $request
* @return HtmlResponse
*/
public function deleteRecord(Application $app, Request $request)
public function doDeleteRecords(Application $app, Request $request)
{
$records = RecordsRequest::fromRequest($app, $request, !!$app->request->get('del_children'), array(
'candeleterecord'
@@ -141,7 +133,7 @@ class Deletion implements ControllerProviderInterface
));
return $app['twig']->render('prod/actions/delete_records_confirm.html.twig', array(
'lst' => explode(';', $records->serializedList()),
'lst' => $records->serializedList(),
'groupings' => $records->stories()->count(),
));
}

View File

@@ -16,11 +16,6 @@ use Silex\ControllerProviderInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/**
*
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
class Share implements ControllerProviderInterface
{

View File

@@ -16,11 +16,6 @@ use Silex\ControllerProviderInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\JsonResponse;
/**
*
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
class Notifications implements ControllerProviderInterface
{
@@ -30,11 +25,11 @@ class Notifications implements ControllerProviderInterface
public function connect(Application $app)
{
$controllers = $app['controllers_factory'];
$controllers->before(function(Request $request) use ($app) {
$app['firewall']->requireNotGuest();
});
/**
* Read all notifications
*
@@ -64,7 +59,7 @@ class Notifications implements ControllerProviderInterface
*
* return : JSON Response
*/
$controllers->post('/read/', $this->call('setNotificationsReaded'))
$controllers->post('/read/', $this->call('readNotifications'))
->bind('set_notifications_readed');
return $controllers;
@@ -77,14 +72,17 @@ class Notifications implements ControllerProviderInterface
* @param Request $request
* @return JsonResponse
*/
public function setNotificationsReaded(Application $app, Request $request)
public function readNotifications(Application $app, Request $request)
{
if (!$request->isXmlHttpRequest()) {
$app->abort(400);
}
try {
$app['events-manager']->read(explode('_', (string) $request->request->get('notifications')), $app['phraseanet.user']->get_id());
$app['events-manager']->read(
explode('_', (string) $request->request->get('notifications')),
$app['phraseanet.user']->get_id()
);
return $app->json(array('success' => true, 'message' => ''));
} catch (\Exception $e) {

View File

@@ -25,6 +25,7 @@ class Preferences implements ControllerProviderInterface
public function connect(Application $app)
{
$controllers = $app['controllers_factory'];
$controllers->before(function(Request $request) use ($app) {
$app['firewall']->requireAuthentication();
});
@@ -83,7 +84,7 @@ class Preferences implements ControllerProviderInterface
$msg = _('Error while saving preference');
if ($prop && $value) {
$app['session']->set('pref.' . $prop, $value);
$app['session']->set('phraseanet.' . $prop, $value);
$success = true;
$msg = _('Preference saved !');
}

View File

@@ -753,3 +753,4 @@
});
</script>
{% endif %}

View File

@@ -31,8 +31,19 @@ class SetupTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
*/
public function testPostGlobals()
{
// $this->setAdmin(true);
$registry = $this->getMockBuilder('\registry')
->disableOriginalConstructor()
->getMock();
$registry->expects($this->atLeastOnce())
->method('set')
->with(
$this->stringStartsWith('GV_'),
$this->anything(),
$this->isType('string'));
self::$DI['app']['phraseanet.registry'] = $registry;
self::$DI['client'] = new Symfony\Component\HttpKernel\Client(self::$DI['app']);
self::$DI['client']->request('POST', '/admin/setup/');
$this->assertTrue(self::$DI['client']->getResponse()->isRedirect());
}

View File

@@ -5,19 +5,29 @@ require_once __DIR__ . '/../../../../PhraseanetWebTestCaseAuthenticatedAbstract.
use Alchemy\Phrasea\Controller\Prod\Export;
use Symfony\Component\HttpFoundation\Request;
/**
* @todo Test Alchemy\Phrasea\Controller\Prod\Export::exportMail
*/
class ExportTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
protected $client;
protected static $GV_activeFTP;
public function tearDown()
{
if(self::$GV_activeFTP) {
self::$DI['app']['phraseanet.registry']->set('GV_activeFTP', true, \registry::TYPE_BOOLEAN);
}
self::$GV_activeFTP = null;
parent::tearDown();
}
/**
* Delete inserted rows from FTP export
*/
public static function tearDownAfterClass()
{
self::$DI['app']['phraseanet.registry']->set('GV_activeFTP', self::$GV_activeFTP, \registry::TYPE_BOOLEAN);
self::$GV_activeFTP = null;
$conn = self::$DI['app']['phraseanet.appbox']->get_connection();
$sql = 'DELETE FROM ftp_export WHERE mail = :email_dest';
@@ -32,6 +42,7 @@ class ExportTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
$stmtElements->closeCursor();
unset($conn, $stmtFtp, $stmtElements);
parent::tearDownAfterClass();
}
/**
@@ -132,17 +143,19 @@ class ExportTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
);
}
/**
* @covers Alchemy\Phrasea\Controller\Prod\Export::exportFtp
*/
public function testExportFtp()
{
self::$GV_activeFTP = self::$DI['app']['phraseanet.registry']->get('GV_activeFTP');
self::$DI['app']['phraseanet.registry']->set('GV_activeFTP', '1', \registry::TYPE_BOOLEAN);
if (!self::$DI['app']['phraseanet.registry']->get('GV_activeFTP')) {
self::$DI['app']['phraseanet.registry']->set('GV_activeFTP', true, \registry::TYPE_BOOLEAN);
self::$GV_activeFTP = true;
}
//inserted rows from this function are deleted in tearDownAfterClass
self::$DI['client']->request('POST', '/prod/export/ftp/', array(
'lst' => self::$DI['record_2']->get_serialize_key(),
'lst' => self::$DI['record_1']->get_serialize_key(),
'user_dest' => self::$DI['user']->get_id(),
'addr' => 'local.phrasea.test',
'login' => self::$DI['user']->get_email(),
@@ -150,6 +163,7 @@ class ExportTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
'NAMMKDFOLD' => 'test2/',
'obj' => array('preview')
));
$response = self::$DI['client']->getResponse();
$this->assertTrue($response->isOk());
$datas = (array) json_decode($response->getContent());
@@ -165,11 +179,9 @@ class ExportTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
*/
public function testRequireAuthentication()
{
$this->markTestSkipped();
$this->logout(self::$DI['app']);
self::$DI['client']->request('POST', '/prod/export/multi-export/');
$this->assertTrue(self::$DI['client']->getResponse()->isRedirect());
}
/**
* @todo Test Alchemy\Phrasea\Controller\Prod\Export::exportMail
*/
}

View File

@@ -1,16 +1,13 @@
<?php
require_once __DIR__ . '/../../../../../PhraseanetWebTestCaseAuthenticatedAbstract.class.inc';
use Alchemy\Phrasea\Controller\Prod\Record\Property;
use Symfony\Component\HttpFoundation\Request;
require_once __DIR__ . '/../../../../PhraseanetWebTestCaseAuthenticatedAbstract.class.inc';
class PropertyTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
protected $client;
/**
* @covers Alchemy\Phrasea\Controller\Prod\Record\Property::displayStatusProperty
* @covers Alchemy\Phrasea\Controller\Prod\Property::displayStatusProperty
*/
public function testDisplayStatusProperty()
{
@@ -22,7 +19,7 @@ class PropertyTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
/**
* @expectedException \Symfony\Component\HttpKernel\Exception\HttpException
* @covers Alchemy\Phrasea\Controller\Prod\Record\Property::displayStatusProperty
* @covers Alchemy\Phrasea\Controller\Prod\Property::displayStatusProperty
*/
public function testDisplayStatusPropertyNotXMLHTTPRequets()
{
@@ -30,7 +27,7 @@ class PropertyTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
}
/**
* @covers Alchemy\Phrasea\Controller\Prod\Record\Property::displayTypeProperty
* @covers Alchemy\Phrasea\Controller\Prod\Property::displayTypeProperty
*/
public function testDisplayTypeProperty()
{
@@ -42,7 +39,7 @@ class PropertyTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
/**
* @expectedException \Symfony\Component\HttpKernel\Exception\HttpException
* @covers Alchemy\Phrasea\Controller\Prod\Record\Property::displayProperty
* @covers Alchemy\Phrasea\Controller\Prod\Property::displayProperty
*/
public function testDisplayTypePropertyNotXMLHTTPRequets()
{
@@ -50,7 +47,7 @@ class PropertyTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
}
/**
* @covers Alchemy\Phrasea\Controller\Prod\Record\Property::changeStatus
* @covers Alchemy\Phrasea\Controller\Prod\Property::changeStatus
*/
public function testChangeStatus()
{
@@ -94,7 +91,7 @@ class PropertyTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
}
/**
* @covers Alchemy\Phrasea\Controller\Prod\Record\Property::changeType
* @covers Alchemy\Phrasea\Controller\Prod\Property::changeType
*/
public function testChangeType()
{

View File

@@ -90,6 +90,10 @@ class ShareTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
->method('ACL')
->will($this->returnValue($stubbedACL));
$share->shareRecord(self::$DI['app'], $this->getMock('Symfony\Component\HttpFoundation\Request'), self::$DI['record_1']->get_base_id(), self::$DI['record_1']->get_record_id());
$share->shareRecord(
self::$DI['app'],
$this->getMock('Symfony\Component\HttpFoundation\Request'),
self::$DI['record_1']->get_base_id(), self::$DI['record_1']->get_record_id()
);
}
}

View File

@@ -495,7 +495,7 @@ class ControllerRssFeedTest extends \PhraseanetWebTestCaseAbstract
$available_medium = array('image', 'audio', 'video');
array_walk($content, $this->removeBadItems($content, $available_medium));
$media_group = $xpath->query("/rss/channel/item[" . $count . "]/media:group");
$this->assertEquals(sizeof($content), $media_group->length);
$this->assertEquals(sizeof($content), $media_group->length, sizeof($content)." != ".$media_group->length);
foreach ($media_group as $media) {
$entry_item = array_shift($content);

View File

@@ -44,13 +44,13 @@ class NotificationsTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
public function testSetNotificationsReaded()
{
$this->XMLHTTPRequest('POST', '/user/notifications/read/', array(
'notifications' => array()
'notifications' => ''
));
$response = self::$DI['client']->getResponse();
$this->assertTrue($response->isOk());
$datas = (array) json_decode($response->getContent());
$this->assertArrayHasKey('success', $datas);
$this->assertTrue($datas['success']);
$this->assertTrue($datas['success'], $response->getContent());
$this->assertArrayHasKey('message', $datas);
unset($response);
}

View File

@@ -66,7 +66,7 @@ class Bridge_ApiTest extends PhraseanetPHPUnitAuthenticatedAbstract
$this->assertTrue($this->object->is_disabled());
sleep(3);
$update2 = $this->object->get_updated_on();
$this->assertTrue($update2 > $update1);
$this->assertTrue($update2 > $update1, $update2->format('Y-m-d, H:i:s') ." sould be > to " . $update1->format('Y-m-d, H:i:s'));
$this->assertFalse($this->object->is_disabled());
$this->object->enable();
$this->assertFalse($this->object->is_disabled());

View File

@@ -23,7 +23,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase
*
* @var \Pimple
*/
protected static $DI;
public static $DI;
protected static $testsTime = array();
protected static $records;
public static $recordsInitialized = false;
@@ -139,6 +139,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase
self::$DI['client'] = self::$DI->share(function($DI) {
return new Client($DI['app'], array());
});
}
public function tearDown()
@@ -158,11 +159,15 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase
parent::tearDown();
$duration = (microtime(true) - $this->start);
// $duration = (microtime(true) - $this->start);
// if ($duration > 0.75) {
// echo "test in " . get_class($this) . " last " . $duration . "\n";
// }
$this->start = null;
//In case some executed script modify 'max_execution_time' ini var
//Initialize set_time_limit(0) which is the default value for PHP CLI
set_time_limit(0);
}
/**