示例#1
0
文件: cron.php 项目: LGBGit/tierno
 /**
  * Overloaded bind function
  *
  * @param   mixed  $src     An associative array or object to bind to the JTable instance.
  * @param   mixed  $ignore  An optional array or space separated list of properties to ignore while binding.
  *
  * @return  boolean  True on success.
  */
 public function bind($src, $ignore = array())
 {
     if (isset($src['params']) && is_array($src['params'])) {
         $registry = new JRegistry();
         $registry->loadArray($src['params']);
         $src['params'] = (string) $registry;
     }
     return parent::bind($src, $ignore);
 }
示例#2
0
 /**
  * Overloaded bind function
  *
  * @param	array		$hash named array
  *
  * @return	null|string	null is operation was satisfactory, otherwise returns an error
  * @see		JTable:bind
  * @since	1.5
  */
 public function bind($array, $ignore = '')
 {
     if (isset($array['params']) && is_array($array['params'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['params']);
         $array['params'] = (string) $registry;
     }
     //needed for form edit view where we see the database table anme and connection id
     $this->db_table_name = $array['db_table_name'];
     $this->connection_id = $array['connection_id'];
     return parent::bind($array, $ignore);
 }
示例#3
0
 /**
  * Overloaded bind function
  *
  * @param   array  $array   hash named array
  * @param   array  $ignore  An optional array or space separated list of properties to ignore while binding.
  *
  * @return  null|string	 null is operation was satisfactory, otherwise returns an error
  */
 public function bind($array, $ignore = array())
 {
     // Bind the rules.
     if (isset($array['rules']) && is_array($array['rules'])) {
         $rules = new JAccessRules($array['rules']);
         $this->setRules($rules);
     }
     if (isset($array['params']) && is_array($array['params'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['params']);
         $array['params'] = (string) $registry;
     }
     return parent::bind($array, $ignore);
 }
示例#4
0
文件: list.php 项目: rogeriocc/fabrik
 /**
  * Method to bind an associative array or object to the JTable instance.This
  * method only binds properties that are publicly accessible and optionally
  * takes an array of properties to ignore when binding.
  *
  * @param   mixed  $src     An associative array or object to bind to the JTable instance.
  * @param   mixed  $ignore  An optional array or space separated list of properties to ignore while binding.
  *
  * @return  boolean  True on success.
  */
 public function bind($src, $ignore = array())
 {
     // Bind the rules.
     if (isset($array['rules']) && is_array($array['rules'])) {
         $rules = new JAccessRules($array['rules']);
         $this->setRules($rules);
     }
     // Covert the params to a json object if its set as an array
     if (isset($src['params']) && is_array($src['params'])) {
         $registry = new JRegistry();
         $registry->loadArray($src['params']);
         $src['params'] = (string) $registry;
     }
     return parent::bind($src, $ignore);
 }
示例#5
0
文件: form.php 项目: rogeriocc/fabrik
 /**
  * Method to bind an associative array or object to the JTable instance.This
  * method only binds properties that are publicly accessible and optionally
  * takes an array of properties to ignore when binding.
  *
  * @param   mixed  $src     An associative array or object to bind to the JTable instance.
  * @param   mixed  $ignore  An optional array or space separated list of properties to ignore while binding.
  *
  * @return  boolean  True on success.
  */
 public function bind($src, $ignore = array())
 {
     if (isset($src['params']) && is_array($src['params'])) {
         $registry = new JRegistry();
         $registry->loadArray($src['params']);
         $src['params'] = (string) $registry;
     }
     // Neded for form edit view where we see the database table anme and connection id
     if (array_key_exists('db_table_name', $src)) {
         $this->db_table_name = $src['db_table_name'];
     }
     if (array_key_exists('connection_id', $src)) {
         $this->connection_id = $src['connection_id'];
     }
     return parent::bind($src, $ignore);
 }