- Timestamp:
- 02/03/07 08:05:41 (5 years ago)
- Files:
-
- 1 modified
-
trunk/trax/vendor/trax/active_record.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/trax/vendor/trax/active_record.php
r278 r281 584 584 # special Trax methods ... 585 585 # ... first check for method names that match any of our explicitly 586 # declared associations for this model ( e.g. $this->has_many = array("movies" => null)) ...586 # declared associations for this model ( e.g. public $has_many = "movies" ) ... 587 587 if(is_array($parameters[0])) { 588 588 $parameters = $parameters[0]; … … 2815 2815 foreach($this->builtin_validation_functions as $method_name) { 2816 2816 $validation_name = $this->$method_name; 2817 if(is_string($validation_name)) { 2818 $validation_name = explode(",", $validation_name); 2819 } 2817 2820 if(method_exists($this, $method_name) && is_array($validation_name)) { 2818 2821 foreach($validation_name as $attribute_name => $options) { 2819 2822 if(!is_array($options)) { 2820 $options = array(); 2821 } 2823 $attribute_name = $options; 2824 $options = array(); 2825 } 2826 $attribute_name = trim($attribute_name); 2822 2827 $parameters = array(); 2823 2828 $on = array_key_exists('on', $options) ?
