Skip to content

Commit

Permalink
Removed Tool class that is useless.
Browse files Browse the repository at this point in the history
  • Loading branch information
wdalmut committed Oct 19, 2011
1 parent 0860af6 commit 7b4f475
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Wally/Wordpress/Model/ArrayAccessAbstract.php
Expand Up @@ -70,7 +70,7 @@ public function count() {
public function __call($method, $arguments)
{
if (@preg_match('/(find(?:One|All)?(?:By|GreaterThan|LessThan))(.+)/', $method, $match)) {
return $this->{$match[1]}(Wally_Wordpress_Tool::lcfirst($match[2]), $arguments[0]);
return $this->{$match[1]}(lcfirst($match[2]), $arguments[0]);
} else {
throw new Zend_Exception("Method {$method} not allowed. Use findBy regexp methods");
}
Expand Down Expand Up @@ -107,4 +107,11 @@ public function findAllBy($name, $arg)
}

abstract public function find($name, $arg, $all = false, $operator = self::EQUALS);
}
}

if (!function_exists("lcfirst")) {
function lcfirst($string)
{
return strtolower($string{0}) . substr($string, 1);
}
}

0 comments on commit 7b4f475

Please sign in to comment.