Actions

API16

JTableContent/bind

From Joomla! Documentation

< API16:JTableContent
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Overloaded bind function

[Edit Descripton]

Description:JTableContent/bind

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);
}

[Edit See Also] SeeAlso:JTableContent/bind

Examples

<CodeExamplesForm />