Find Jobs
Hire Freelancers

refactor mantis to object orientation

$30-100 USD

Closed
Posted about 15 years ago

$30-100 USD

Paid on delivery
refactor parts of the procedural code of mantis[1] to object orientation. Involves highly repetitive work, which can not easily be automized. Requires knowledge in PHP5, implementation guidelines of eZ Components[2], GIT[3] and the ability to install and test the changes. The current sourcecode can be cloned by git clone git://[login to view URL] [1] [login to view URL] [2] [login to view URL] [3] [login to view URL](software) ## Deliverables The task requires to refactor a lot of functions like the one below into class methods and applying the following changes: - function parameters which are properties of the object can be omitted from the method parameters - The method name is shortened, because it doesn't need to reference the classes name anymore and written in camel case - all calls to the former function needs to be searched in the rest of the code and refactored to calls to the new object's method. This required to get a reference to the object beforehand, which can be done by mntsBaseUser::getById( $id ) There are already class stubs in the models/ directory. The old code is in the core/ directory. If a class is in models/mntsBaseUser, then the old code is in core/user_api.php. It is recommended that the programmer uses a powerful editor like VIM, emacs, ... which can help in automating many tasks. I'm a PHP programmer myself and can be contacted during the project via instant messaging. function user_get_access_level( $p_user_id, $p_project_id = ALL_PROJECTS ) { $t_access_level = user_get_field( $p_user_id, 'access_level' ); if( $t_access_level >= ADMINISTRATOR ) { return $t_access_level; } $t_project_access_level = project_get_local_user_access_level( $p_project_id, $p_user_id ); if( false === $t_project_access_level ) { return $t_access_level; } else { return $t_project_access_level; } } class mntsBaseUser extends mntsBaseModel { public function getAccessLevel( $p_project_id = ALL_PROJECTS ) { $t_access_level = $this->accessLevel; if( $t_access_level >= ADMINISTRATOR ) { return $t_access_level; } $t_project_access_level = project_get_local_user_access_level( $p_project_id, $this->id ); if( false === $t_project_access_level ) { return $t_access_level; } else { return $t_project_access_level; } } }
Project ID: 3661132

About the project

Remote project
Active 15 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

About the client

Flag of SWITZERLAND
Switzerland
0.0
0
Member since Feb 22, 2009

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.