New methods cannot have underscore!

Registered by TitanKing

When creating/modifying an old method the method should not have any underscores...

This means for instance when moving a methods from any of the core legacy classes for example security.class.php to PHPDS_security.class.php.

The old methods used underscore in its naming conventions, this is not allowed in new methods, the container/alias of the old methods should stay in the old legacy class calling the new camel case method in the new class for backwards compatibility.

For instance, in security.class.php we find:
public function my_test_class ()
{
/// code...
}

We now move this code to PHPDS_security.class.php as:
public function myTestClass ()
{
/// code...
}
This means we now have two classes that does the same thing, well we dont, we need to modify the old class to only call the new class, so in security.class.php we now have :
public function my_test_class () {
    return $this->myTestClass();
}

This will help backwards compatibility and allow the new standards to catch up.

Methods with names like test () can simply be moved over as no camel is required.

If a old legacy method will not be compatible with old system, rather duplicate the method to the new class and redo it while leaving the old method!

Blueprint information

Status:
Complete
Approver:
TitanKing
Priority:
Not
Drafter:
TitanKing
Direction:
Needs approval
Assignee:
TitanKing
Definition:
Obsolete
Series goal:
None
Implementation:
Blocked
Milestone target:
None
Started by
Greg
Completed by
Greg

Related branches

Sprints

Whiteboard

A page on the website has done added on this subject.

Security class is completely converted and can serve as a good example. Note all methods is simply a call to new methods because security is only used by core and no backwards compatibility can arise seeing that no plugins will use these methods.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.