API16:JTableContent/bind
From Joomla! Documentation
Description
Overloaded bind function
Syntax
bind($array, $ignore= '')
| Parameter Name | Default Value | Description |
|---|---|---|
| $array | $hash named array | |
| $ignore |
Returns
null|string null is operation was satisfactory, otherwise returns an error
Defined in
libraries/joomla/database/table/content.php
Importing
jimport( 'joomla.database.table.content' );
Source Body
public function bind($array, $ignore = '')
{
// Search for the {readmore} tag and split the text up accordingly.
if (isset($array['articletext'])) {
$pattern = '#<hr\s+id=("|\')system-readmore("|\')\s*\/*>#i';
$tagPos = preg_match($pattern, $array['articletext']);
if ($tagPos == 0) {
$this->introtext = $array['articletext'];
} else {
list($this->introtext, $this->fulltext) = preg_split($pattern, $array['articletext'], 2);
}
}
if (isset($array['attribs']) && is_array($array['attribs'])) {
$registry = new JRegistry();
$registry->loadArray($array['attribs']);
$array['attribs'] = (string)$registry;
}
if (isset($array['metadata']) && is_array($array['metadata'])) {
$registry = new JRegistry();
$registry->loadArray($array['metadata']);
$array['metadata'] = (string)$registry;
}
return parent::bind($array, $ignore);
}
Examples
Code Examples