当前位置: 首页>>代码示例>>PHP>>正文


PHP JTable::bind方法代码示例

本文整理汇总了PHP中JTable::bind方法的典型用法代码示例。如果您正苦于以下问题:PHP JTable::bind方法的具体用法?PHP JTable::bind怎么用?PHP JTable::bind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JTable的用法示例。


在下文中一共展示了JTable::bind方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: load

 private function load()
 {
     $result = false;
     // Load the table object, empty if _state->data->key = null;
     $this->getTable()->load($this->_state->get($this->_key, null));
     //if we have incoming data, bind it to the table object
     if ($data = $this->_state->get('data', false)) {
         $this->_table->bind($data);
     }
     //set the state to the table data.
     $this->_state->set('data', get_object_vars($this->_table));
 }
开发者ID:Knuckle-ORM,项目名称:knorm,代码行数:12,代码来源:item.php

示例2: unserialize

 /**
  * Get a connection table object
  *
  * @param   int  $id  connection id
  *
  * @return  object  connection tables
  */
 public function &getConnection($id = null)
 {
     if (!is_null($id)) {
         $this->setId($id);
     }
     if (!is_object($this->_connection)) {
         $session = JFactory::getSession();
         $key = 'fabrik.connection.' . $this->_id;
         if ($session->has($key)) {
             $connProperties = unserialize($session->get($key));
             // $$$ rob since J1.6 - connection properties stored as an array (in f2 it was an object)
             if (is_a($connProperties, '__PHP_Incomplete_Class') || JArrayHelper::getValue($connProperties, 'id') == '') {
                 $session->clear($key);
             } else {
                 $this->_connection = FabTable::getInstance('connection', 'FabrikTable');
                 $this->_connection->bind($connProperties);
                 return $this->_connection;
             }
         }
         if ($this->_id == -1 || $this->_id == '') {
             $this->_connection = $this->loadDefaultConnection();
         } else {
             $this->_connection = FabTable::getInstance('Connection', 'FabrikTable');
             $this->_connection->load($this->_id);
         }
         // $$$ rob store the connection for later use as it may be required by modules/plugins
         $session->set($key, serialize($this->_connection->getProperties()));
     }
     return $this->_connection;
 }
开发者ID:rogeriocc,项目名称:fabrik,代码行数:37,代码来源:connection.php

示例3: bind

 /**
  * Bind Table override
  * @override
  * 
  * @see JTable::bind()
  */
 public function bind($fromArray, $saveTask = false, $sessionTask = false)
 {
     parent::bind($fromArray);
     if ($saveTask) {
         $services = array();
         foreach ($fromArray as $key => $value) {
             if (strpos($key, 'chk_') === 0) {
                 $services[$key] = $value;
             }
         }
         if (is_array($services)) {
             $this->services = json_encode($services);
         }
     }
     // Manage complex attributes during session recovering bind/load
     if ($sessionTask) {
         $services = array();
         foreach ($fromArray as $key => $value) {
             if (strpos($key, 'chk_') === 0) {
                 $services[$key] = $value;
             }
         }
         $registry = new JRegistry($services);
         $this->services = $registry;
     }
     return true;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:33,代码来源:pingomatic.php

示例4: bind

 public function bind($src, $ignore = array())
 {
     if (!is_object($src) && !is_array($src)) {
         $src = new stdClass();
     }
     return parent::bind($src, $ignore);
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:7,代码来源:parent.php

示例5: bind

	public function bind($array, $ignore = '')
	{
		// in here we are checking for the empty value of the checkbox

		//don't override without calling base class
		return parent::bind($array, $ignore);
	}
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:7,代码来源:group.php

示例6: bind

 /**
  * Overloaded bind function to pre-process the params.
  *
  * @param   array  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['print_title']) && is_array($array['print_title'])) {
         $array['print_title'] = array_filter($array['print_title']);
         if (count($array['print_title'])) {
             $registry = new JRegistry();
             $registry->loadArray($array['print_title']);
             $array['print_title'] = (string) $registry;
         }
     }
     if (isset($array['nutrients']) && is_array($array['nutrients'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['nutrients']);
         $array['nutrients'] = (string) $registry;
     }
     if (isset($array['compositions']) && is_array($array['compositions'])) {
         // delete 0 values
         $array['compositions'] = array_filter($array['compositions']);
         $registry = new JRegistry();
         $registry->loadArray($array['compositions']);
         $array['compositions'] = (string) $registry;
         // if composition has sub compositions then nutrients values must delete
         $array['nutrients'] = '';
     }
     return parent::bind($array, $ignore);
 }
开发者ID:smhnaji,项目名称:sdnet,代码行数:34,代码来源:composition.php

示例7: bind

 /**
  * Overloaded bind function
  *
  * @param   array  $array   Named array to bind
  * @param   mixed  $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())
 {
     if (!array_key_exists('readonly', $array)) {
         $array['readonly'] = '0';
     }
     return parent::bind($array, $ignore);
 }
开发者ID:esorone,项目名称:efcpw,代码行数:16,代码来源:componentobjects.php

示例8: testDelete

 /**
  * Test for delete method with no primary key specified.
  *
  * @return  void
  *
  * @since   12.3
  */
 public function testDelete()
 {
     $this->assertEquals(2, $this->getConnection()->getRowCount('jos_dbtest_composite'), "Pre-Condition");
     $this->object->bind(array('id1' => 25, 'id2' => 50, 'title' => 'My Title'));
     $this->object->delete();
     $this->assertEquals(1, $this->getConnection()->getRowCount('jos_dbtest_composite'), "Delete failed.");
 }
开发者ID:joomla-projects,项目名称:media-manager-improvement,代码行数:14,代码来源:JTableTest.php

示例9: bind

 /**
  * Overloaded bind function to pre-process the params.
  *
  * @param	array		Named array
  * @return	null|string	null is operation was satisfactory, otherwise returns an error
  * @see		JTable:bind
  * @since	3.3.3
  */
 public function bind($array, $ignore = '')
 {
     if ($array['date'] == 'update') {
         $array['date'] = '';
     }
     return parent::bind($array, $ignore);
 }
开发者ID:esorone,项目名称:efcpw,代码行数:15,代码来源:registration.php

示例10: bind

 public function bind($src, $ignore = array())
 {
     if (empty($src) || is_null($src)) {
         return true;
     }
     return parent::bind($src, $ignore);
 }
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:7,代码来源:fieldvalue.php

示例11: bind

 /**
  * Overloaded bind function to pre-process the params.
  *
  * @param   array  Named array
  * @return  null|string	null is operation was satisfactory, otherwise returns an error
  * @see     JTable:bind
  */
 public function bind($array, $ignore = '')
 {
     if (isset($array['body']) && is_array($array['body'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['body']);
         $array['body'] = (string) $registry;
     }
     if (isset($array['special']) && is_array($array['special'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['special']);
         $array['special'] = (string) $registry;
     }
     if (isset($array['laboratory']) && is_array($array['laboratory'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['laboratory']);
         $array['laboratory'] = (string) $registry;
     }
     if (isset($array['payment']) && is_array($array['payment'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['payment']);
         $array['payment'] = (string) $registry;
     }
     if (isset($array['ctags']) && is_array($array['ctags'])) {
         $array['ctags'] = implode(',', $array['ctags']);
     } else {
         $data['ctags'] = '';
     }
     return parent::bind($array, $ignore);
 }
开发者ID:smhnaji,项目名称:sdnet,代码行数:36,代码来源:request.php

示例12: bind

 /**
  * 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  $array   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.
  *
  * @link    https://docs.joomla.org/JTable/bind
  * @since   3.2
  * @throws  UnexpectedValueException
  */
 public function bind($array, $ignore = '')
 {
     if (isset($array['item_description'])) {
         $pattern = '#<hr\\s+id=("|\')system-readmore("|\')\\s*\\/*>#i';
         $tagPos = preg_match($pattern, $array['item_description']);
         if ($tagPos == 0) {
             $this->introtext = $array['item_description'];
             $this->fulltext = '';
         } else {
             list($this->introtext, $this->fulltext) = preg_split($pattern, $array['item_description'], 2);
         }
     }
     if (isset($array['params']) && is_array($array['params'])) {
         $tmp = array();
         foreach ($array['params']['attr'] as $key => $param) {
             $tmp['attr_' . $key] = $param;
         }
         $array['params'] = json_encode($tmp);
     }
     if (isset($array['metadata']) && is_array($array['metadata'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['metadata']);
         $array['metadata'] = (string) $registry;
     }
     if (isset($array['techs']) && is_array($array['techs'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['techs']);
         $array['techs'] = (string) $registry;
     }
     return parent::bind($array, $ignore);
 }
开发者ID:saity74,项目名称:com_catalogue,代码行数:45,代码来源:catalogue.php

示例13: bind

 /**
  * Overloaded bind function
  * @access public
  * @param array $hash named array
  * @return null|string	null is operation was satisfactory, otherwise returns an error
  */
 public function bind($array, $ignore = '')
 {
     if (key_exists('params', $array) && is_array($array['params'])) {
         $array['params'] = json_encode($array['params']);
     }
     return parent::bind($array, $ignore);
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:13,代码来源:jacc.php

示例14: bind

 public function bind($array, $ignore = '')
 {
     if (!isset($array['lic'])) {
         $array['lic'] = '0';
     }
     return parent::bind($array, $ignore);
 }
开发者ID:rsam,项目名称:com_tsj,代码行数:7,代码来源:account.php

示例15: bind

 /**
  * 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 (is_array($array['categoria'])) {
         $array['categoria'] = implode(',', $array['categoria']);
     }
     return parent::bind($array, $ignore);
 }
开发者ID:GGallery,项目名称:MDWEBTV-new,代码行数:15,代码来源:palinsesto.php


注:本文中的JTable::bind方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。