Development

Changeset 10977

You must first sign up to be able to contribute.

Changeset 10977

Show
Ignore:
Timestamp:
08/20/08 08:12:05 (11 months ago)
Author:
dwhittle
Message:

1.2: updated ObjectHelper? to be compatable with Propel 1.3

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.2/lib/helper/ObjectHelper.php

    r9340 r10977  
    7373  { 
    7474    // text method exists? 
    75     if ($text_method && !is_callable(array($option, $text_method))) 
     75    if ($text_method && !method_exists(array($option, $text_method))) 
    7676    { 
    7777      throw new sfViewException(sprintf('Method "%s" doesn\'t exist for object of class "%s".', $text_method, _get_class_decorated($option))); 
     
    7979 
    8080    // value method exists? 
    81     if (!is_callable(array($option, $value_method))) 
     81    if (!method_exists(array($option, $value_method))) 
    8282    { 
    8383      throw new sfViewException(sprintf('Method "%s" doesn\'t exist for object of class "%s".', $value_method, _get_class_decorated($option))); 
     
    168168        foreach (array($text_method, '__toString', 'toString', $key_method) as $method) 
    169169        { 
    170           if (is_callable(array($tmp_object, $method))) 
     170          if (method_exists(array($tmp_object, $method))) 
    171171          { 
    172172            $methodToCall = $method; 
     
    296296    $method = array($method, $param); 
    297297  } 
    298    
     298 
    299299  // method exists? 
    300   if (!is_callable(array($object, $method[0]))) 
     300  if (!method_exists(array($object, $method[0]))) 
    301301  { 
    302302    throw new sfViewException(sprintf('Method "%s" doesn\'t exist for object of class "%s".', $method[0], _get_class_decorated($object))); 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.