public function findObjectInArray($objectname, $arr) {
        foreach ($arr as $i => $object) {
            if ($objectname == $object->getName()) {
                return $i;
            }
        }
        return null;
    }
public function findObjectInArray($objectname, $arr) {
        foreach ($arr as $i => $object) {
            if ($objectname == $object->getName()) {
                return $i;
            }
        }
        return null;
    }
public function findObjectInArray ( $ objectname , $ arr ) { foreach ( $ arr as $ i => $ object ) { if ( $ objectname == $ object -> getName ( ) ) { return $ i ; } } return null ; }
Returns the position of one object in the array.
@param string $objectname
@param array $arr
@return mixed
Returns the position of one object in the array .