JRegistry PHP Class Code Examples

This page contains top rated real world PHP examples of class JRegistry extracted from open source projects. You can rate examples to help us improve the quality of examples

Example #1
Show file File: newsfeed.php Project: shoffmann52/install-from-web-server
0
 /**
  * Method to get a single record.
  *
  * @param   integer    The id of the primary key.
  *
  * @return  mixed  Object on success, false on failure.
  * @since   1.6
  */
 public function getItem($pk = null)
 {
     if ($item = parent::getItem($pk)) {
         // Convert the params field to an array.
         $registry = new JRegistry();
         $registry->loadString($item->metadata);
         $item->metadata = $registry->toArray();
         // Convert the images field to an array.
         $registry = new JRegistry();
         $registry->loadString($item->images);
         $item->images = $registry->toArray();
     }
     // Load associated newsfeeds items
     $app = JFactory::getApplication();
     $assoc = JLanguageAssociations::isEnabled();
     if ($assoc) {
         $item->associations = array();
         if ($item->id != null) {
             $associations = JLanguageAssociations::getAssociations('com_newsfeeds', '#__newsfeeds', 'com_newsfeeds.item', $item->id);
             foreach ($associations as $tag => $association) {
                 $item->associations[$tag] = $association->id;
             }
         }
     }
     if (!empty($item->id)) {
         $item->tags = new JHelperTags();
         $item->tags->getTagIds($item->id, 'com_newsfeeds.newsfeed');
         $item->metadata['tags'] = $item->tags;
     }
     return $item;
 }
Example #2
Show file File: script.communitybuilder.php Project: bobozhangshao/HeartCare
0
 public function install($adapter)
 {
     /** @var $plugin JTableExtension */
     $plugin = JTable::getInstance('extension');
     if (!$plugin->load(array('type' => 'plugin', 'folder' => 'system', 'element' => 'communitybuilder'))) {
         return false;
     }
     /** @var $legacy JTableExtension */
     $legacy = JTable::getInstance('extension');
     if ($legacy->load(array('type' => 'plugin', 'folder' => 'system', 'element' => 'cbcoreredirect'))) {
         $pluginParams = new JRegistry();
         $pluginParams->loadString($plugin->get('params'));
         $legacyParams = new JRegistry();
         $legacyParams->loadString($legacy->get('params'));
         $pluginParams->set('rewrite_urls', $legacyParams->get('rewrite_urls', 1));
         $pluginParams->set('itemids', $legacyParams->get('itemids', 1));
         $plugin->set('params', $pluginParams->toString());
         $installer = new JInstaller();
         try {
             $installer->uninstall('plugin', $legacy->get('extension_id'));
         } catch (RuntimeException $e) {
         }
     }
     $plugin->set('enabled', 1);
     return $plugin->store();
 }
Example #3
Show file File: key.php Project: joshjim27/jobsglobal
0
 /**
  * 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 = '')
 {
     $input = JFactory::getApplication()->input;
     $task = $input->getString('task', '');
     if (($task == 'save' || $task == 'apply') && (!JFactory::getUser()->authorise('core.edit.state', 'com_api') && $array['state'] == 1)) {
         $array['state'] = 0;
     }
     if ($array['id'] == 0) {
         $array['created_by'] = JFactory::getUser()->id;
     }
     if (isset($array['params']) && is_array($array['params'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['params']);
         $array['params'] = (string) $registry;
     }
     if (isset($array['metadata']) && is_array($array['metadata'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['metadata']);
         $array['metadata'] = (string) $registry;
     }
     if (!JFactory::getUser()->authorise('core.admin', 'com_api.key.' . $array['id'])) {
         $actions = JFactory::getACL()->getActions('com_api', 'key');
         $default_actions = JFactory::getACL()->getAssetRules('com_api.key.' . $array['id'])->getData();
         $array_jaccess = array();
         foreach ($actions as $action) {
             $array_jaccess[$action->name] = $default_actions[$action->name];
         }
         $array['rules'] = $this->JAccessRulestoArray($array_jaccess);
     }
     //Bind the rules for ACL where supported.
     if (isset($array['rules']) && is_array($array['rules'])) {
         $this->setRules($array['rules']);
     }
     return parent::bind($array, $ignore);
 }
Example #4
Show file File: changelog.php Project: ZerGabriel/joomla-platform
0
 /**
  * Overrides JGithub constructor to initialise the api property.
  *
  * @param   mixed  $input       An optional argument to provide dependency injection for the application's
  *                              input object.  If the argument is a JInputCli object that object will become
  *                              the application's input object, otherwise a default input object is created.
  * @param   mixed  $config      An optional argument to provide dependency injection for the application's
  *                              config object.  If the argument is a JRegistry object that object will become
  *                              the application's config object, otherwise a default config object is created.
  * @param   mixed  $dispatcher  An optional argument to provide dependency injection for the application's
  *                              event dispatcher.  If the argument is a JDispatcher object that object will become
  *                              the application's event dispatcher, if it is null then the default event dispatcher
  *                              will be created based on the application's loadDispatcher() method.
  *
  * @see     loadDispatcher()
  * @since   11.1
  */
 public function __construct(JInputCli $input = null, JRegistry $config = null, JDispatcher $dispatcher = null)
 {
     parent::__construct($input, $config, $dispatcher);
     $options = new JRegistry();
     $options->set('headers.Accept', 'application/vnd.github.html+json');
     $this->api = new JGithub($options);
 }
Example #5
Show file File: t3.php Project: lazarch/t3
0
 function onExtensionAfterSave($option, $data)
 {
     if (defined('T3_PLUGIN') && T3::detect() && $option == 'com_templates.style' && !empty($data->id)) {
         //get new params value
         $japp = JFactory::getApplication();
         $params = new JRegistry();
         $params->loadString($data->params);
         //if we have any changed, we will update to global
         if (isset($this->gparams) && count($this->gparams)) {
             //get all other styles that have the same template
             $db = JFactory::getDBO();
             $query = $db->getQuery(true);
             $query->select('*')->from('#__template_styles')->where('template=' . $db->quote($data->template));
             $db->setQuery($query);
             $themes = $db->loadObjectList();
             //update all global parameters
             foreach ($themes as $theme) {
                 $registry = new JRegistry();
                 $registry->loadString($theme->params);
                 foreach ($this->gparams as $pname) {
                     $registry->set($pname, $params->get($pname));
                     //overwrite with new value
                 }
                 $query = $db->getQuery(true);
                 $query->update('#__template_styles')->set('params =' . $db->quote($registry->toString()))->where('id =' . (int) $theme->id)->where('id <>' . (int) $data->id);
                 $db->setQuery($query);
                 $db->execute();
             }
         }
     }
 }
Example #6
Show file File: address.php Project: yanghxstone/php
0
 /**
  * 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 = '')
 {
     $input = JFactory::getApplication()->input;
     $task = $input->getString('task', '');
     if (($task == 'save' || $task == 'apply') && (!JFactory::getUser()->authorise('core.edit.state', 'com_addressbook') && $array['state'] == 1)) {
         $array['state'] = 0;
     }
     if (isset($array['params']) && is_array($array['params'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['params']);
         $array['params'] = (string) $registry;
     }
     if (isset($array['metadata']) && is_array($array['metadata'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['metadata']);
         $array['metadata'] = (string) $registry;
     }
     if (!JFactory::getUser()->authorise('core.admin', 'com_addressbook.address.' . $array['id'])) {
         $actions = JFactory::getACL()->getActions('com_addressbook', 'address');
         $default_actions = JFactory::getACL()->getAssetRules('com_addressbook.address.' . $array['id'])->getData();
         $array_jaccess = array();
         foreach ($actions as $action) {
             $array_jaccess[$action->name] = $default_actions[$action->name];
         }
         $array['rules'] = $this->JAccessRulestoArray($array_jaccess);
     }
     //Bind the rules for ACL where supported.
     if (isset($array['rules']) && is_array($array['rules'])) {
         $this->setRules($array['rules']);
     }
     return parent::bind($array, $ignore);
 }
Example #7
Show file File: newsfeed.php Project: shoffmann52/install-from-web-server
0
 /**
  * Method to get newsfeed data.
  *
  * @param   integer	The id of the newsfeed.
  *
  * @return  mixed  Menu item data object on success, false on failure.
  * @since   1.6
  */
 public function &getItem($pk = null)
 {
     $pk = !empty($pk) ? $pk : (int) $this->getState('newsfeed.id');
     if ($this->_item === null) {
         $this->_item = array();
     }
     if (!isset($this->_item[$pk])) {
         try {
             $db = $this->getDbo();
             $query = $db->getQuery(true)->select($this->getState('item.select', 'a.*'))->from('#__newsfeeds AS a');
             // Join on category table.
             $query->select('c.title AS category_title, c.alias AS category_alias, c.access AS category_access')->join('LEFT', '#__categories AS c on c.id = a.catid');
             // Join on user table.
             $query->select('u.name AS author')->join('LEFT', '#__users AS u on u.id = a.created_by');
             // Join over the categories to get parent category titles
             $query->select('parent.title as parent_title, parent.id as parent_id, parent.path as parent_route, parent.alias as parent_alias')->join('LEFT', '#__categories as parent ON parent.id = c.parent_id')->where('a.id = ' . (int) $pk);
             // Filter by start and end dates.
             $nullDate = $db->quote($db->getNullDate());
             $nowDate = $db->quote(JFactory::getDate()->toSql());
             // Filter by published state.
             $published = $this->getState('filter.published');
             $archived = $this->getState('filter.archived');
             if (is_numeric($published)) {
                 $query->where('(a.published = ' . (int) $published . ' OR a.published =' . (int) $archived . ')')->where('(a.publish_up = ' . $nullDate . ' OR a.publish_up <= ' . $nowDate . ')')->where('(a.publish_down = ' . $nullDate . ' OR a.publish_down >= ' . $nowDate . ')')->where('(c.published = ' . (int) $published . ' OR c.published =' . (int) $archived . ')');
             }
             $db->setQuery($query);
             $data = $db->loadObject();
             if (empty($data)) {
                 JError::raiseError(404, JText::_('COM_NEWSFEEDS_ERROR_FEED_NOT_FOUND'));
             }
             // Check for published state if filter set.
             if ((is_numeric($published) || is_numeric($archived)) && ($data->published != $published && $data->published != $archived)) {
                 JError::raiseError(404, JText::_('COM_NEWSFEEDS_ERROR_FEED_NOT_FOUND'));
             }
             // Convert parameter fields to objects.
             $registry = new JRegistry();
             $registry->loadString($data->params);
             $data->params = clone $this->getState('params');
             $data->params->merge($registry);
             $registry = new JRegistry();
             $registry->loadString($data->metadata);
             $data->metadata = $registry;
             // Compute access permissions.
             if ($access = $this->getState('filter.access')) {
                 // If the access filter has been set, we already know this user can view.
                 $data->params->set('access-view', true);
             } else {
                 // If no access filter is set, the layout takes some responsibility for display of limited information.
                 $user = JFactory::getUser();
                 $groups = $user->getAuthorisedViewLevels();
                 $data->params->set('access-view', in_array($data->access, $groups) && in_array($data->category_access, $groups));
             }
             $this->_item[$pk] = $data;
         } catch (Exception $e) {
             $this->setError($e);
             $this->_item[$pk] = false;
         }
     }
     return $this->_item[$pk];
 }
Example #8
Show file File: adtour.php Project: hixbotay/executivetransport
0
 public function getItem($pk = null)
 {
     $item = parent::getItem($pk);
     if ($item) {
         if ($item->tour_class) {
             $item->tour_class = explode(':', $item->tour_class);
         }
         $registry = new JRegistry();
         if (isset($item->metadata)) {
             $registry = new JRegistry();
             $registry->loadString($item->metadata);
             $item->metadata = $registry->toArray();
         }
         //get value from params
         $item->calendar_shared_group_one_tour = '';
         $item->addon = null;
         $item->service_fee = 0;
         $item->tax = 0;
         $item->deposit = 0;
         $item->addroom = 0;
         if (isset($item->params['calendatype']['calendatype'])) {
             $item->calendar_shared_group_one_tour = $item->params['calendatype']['calendatype'];
         }
         $item->addon = isset($item->params['addon']) ? $item->params['addon'] : null;
         $item->service_fee = isset($item->params['service_fee']) ? $item->params['service_fee'] : null;
         $item->tax = isset($item->params['tax']) ? $item->params['tax'] : null;
         $item->deposit = isset($item->params['deposit']) ? $item->params['deposit'] : null;
         $item->addroom = isset($item->params['addroom']) ? $item->params['addroom'] : null;
     }
     //debug($item); die;
     return $item;
 }
Example #9
Show file File: corecontent.php Project: WineWorld/joomlatrialcmbg
0
 /**
  * Overloaded bind function
  *
  * @param   array  $array   Named array
  * @param   mixed  $ignore  An optional array or space separated list of properties
  *                          to ignore while binding.
  *
  * @return  mixed  Null if operation was satisfactory, otherwise returns an error string
  *
  * @see     JTable::bind()
  * @since   3.1
  */
 public function bind($array, $ignore = '')
 {
     if (isset($array['core_params']) && is_array($array['core_params'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['core_params']);
         $array['core_params'] = (string) $registry;
     }
     if (isset($array['core_metadata']) && is_array($array['core_metadata'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['core_metadata']);
         $array['core_metadata'] = (string) $registry;
     }
     if (isset($array['core_images']) && is_array($array['core_images'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['core_images']);
         $array['core_images'] = (string) $registry;
     }
     if (isset($array['core_urls']) && is_array($array['core_urls'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['core_urls']);
         $array['core_urls'] = (string) $registry;
     }
     if (isset($array['core_body']) && is_array($array['core_body'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['core_body']);
         $array['core_body'] = (string) $registry;
     }
     return parent::bind($array, $ignore);
 }
Example #10
Show file File: article.php Project: Arturogcalleja/herbolario
0
 /**
  * Method to save the form data.
  *
  * @param	array	The form data.
  *
  * @return	boolean	True on success.
  * @since	1.6
  */
 public function save($data)
 {
     if (isset($data['images']) && is_array($data['images'])) {
         $registry = new JRegistry();
         $registry->loadArray($data['images']);
         $data['images'] = (string) $registry;
     }
     if (isset($data['urls']) && is_array($data['urls'])) {
         $registry = new JRegistry();
         $registry->loadArray($data['urls']);
         $data['urls'] = (string) $registry;
     }
     // Alter the title for save as copy
     if (JRequest::getVar('task') == 'save2copy') {
         list($title, $alias) = $this->generateNewTitle($data['catid'], $data['alias'], $data['title']);
         $data['title'] = $title;
         $data['alias'] = $alias;
     }
     if (parent::save($data)) {
         if (isset($data['featured'])) {
             $this->featured($this->getState($this->getName() . '.id'), $data['featured']);
         }
         return true;
     }
     return false;
 }
Example #11
Show file File: categories.php Project: interfaceslivres/ccmd-ufpb
0
 /**
  * Method to index an item. The item must be a FinderIndexerResult object.
  *
  * @param   FinderIndexerResult  $item    The item to index as an FinderIndexerResult object.
  * @param   string               $format  The item format
  *
  * @return  void
  *
  * @since   2.5
  * @throws  Exception on database error.
  */
 protected function index(FinderIndexerResult $item, $format = 'html')
 {
     // Check if the extension is enabled
     if (JComponentHelper::isEnabled($this->extension) == false) {
         return;
     }
     $item->setLanguage();
     // Need to import component route helpers dynamically, hence the reason it's handled here
     $path = JPATH_SITE . '/components/' . $item->extension . '/helpers/route.php';
     if (is_file($path)) {
         include_once $path;
     }
     $extension = ucfirst(substr($item->extension, 4));
     // Initialize the item parameters.
     $registry = new JRegistry();
     $registry->loadString($item->params);
     $item->params = $registry;
     $registry = new JRegistry();
     $registry->loadString($item->metadata);
     $item->metadata = $registry;
     /* Add the meta-data processing instructions based on the categories
      * configuration parameters.
      */
     // Add the meta-author.
     $item->metaauthor = $item->metadata->get('author');
     // Handle the link to the meta-data.
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'link');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metakey');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metadesc');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metaauthor');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'author');
     //$item->addInstruction(FinderIndexer::META_CONTEXT, 'created_by_alias');
     // Trigger the onContentPrepare event.
     $item->summary = FinderIndexerHelper::prepareContent($item->summary, $item->params);
     // Build the necessary route and path information.
     $item->url = $this->getURL($item->id, $item->extension, $this->layout);
     $class = $extension . 'HelperRoute';
     if (class_exists($class) && method_exists($class, 'getCategoryRoute')) {
         $item->route = $class::getCategoryRoute($item->id);
     } else {
         $item->route = ContentHelperRoute::getCategoryRoute($item->slug, $item->catid);
     }
     $item->path = FinderIndexerHelper::getContentPath($item->route);
     // Get the menu title if it exists.
     $title = $this->getItemMenuTitle($item->url);
     // Adjust the title if necessary.
     if (!empty($title) && $this->params->get('use_menu_title', true)) {
         $item->title = $title;
     }
     // Translate the state. Categories should only be published if the parent category is published.
     $item->state = $this->translateState($item->state);
     // Add the type taxonomy data.
     $item->addTaxonomy('Type', 'Category');
     // Add the language taxonomy data.
     $item->addTaxonomy('Language', $item->language);
     // Get content extras.
     FinderIndexerHelper::getContentExtras($item);
     // Index the item.
     $this->indexer->index($item);
 }
Example #12
Show file File: k2.php Project: educakanchay/educa
0
 protected function index(FinderIndexerResult $item, $format = 'html')
 {
     // Check if the extension is enabled
     if (JComponentHelper::isEnabled($this->extension) == false) {
         return;
     }
     // Initialize the item parameters.
     $registry = new JRegistry();
     $registry->loadString($item->params);
     $item->params = JComponentHelper::getParams('com_k2', true);
     $item->params->merge($registry);
     $registry = new JRegistry();
     $registry->loadString($item->metadata);
     $item->metadata = $registry;
     // Trigger the onContentPrepare event.
     $item->summary = FinderIndexerHelper::prepareContent($item->summary, $item->params);
     $item->body = FinderIndexerHelper::prepareContent($item->body, $item->params);
     // Build the necessary route and path information.
     $item->url = $this->getURL($item->id, $this->extension, $this->layout);
     $item->route = K2HelperRoute::getItemRoute($item->slug, $item->catslug);
     $item->path = FinderIndexerHelper::getContentPath($item->route);
     // Get the menu title if it exists.
     $title = $this->getItemMenuTitle($item->url);
     // Adjust the title if necessary.
     if (!empty($title) && $this->params->get('use_menu_title', true)) {
         $item->title = $title;
     }
     // Add the meta-author.
     $item->metaauthor = $item->metadata->get('author');
     // Add the meta-data processing instructions.
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metakey');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metadesc');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metaauthor');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'author');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'created_by_alias');
     // Translate the state. Articles should only be published if the category is published.
     $item->state = $this->translateState($item->state, $item->cat_state);
     // Translate the trash state. Articles should only be accesible if the category is accessible.
     if ($item->trash || $item->cat_trash) {
         $item->state = 0;
     }
     // Add the type taxonomy data.
     $item->addTaxonomy('Type', 'K2 Item');
     // Add the author taxonomy data.
     if (!empty($item->author) || !empty($item->created_by_alias)) {
         $item->addTaxonomy('Author', !empty($item->created_by_alias) ? $item->created_by_alias : $item->author);
     }
     // Add the category taxonomy data.
     $item->addTaxonomy('K2 Category', $item->category, $item->cat_state, $item->cat_access);
     // Add the language taxonomy data.
     $item->addTaxonomy('Language', $item->language);
     // Get content extras.
     FinderIndexerHelper::getContentExtras($item);
     // Index the item.
     if (method_exists('FinderIndexer', 'getInstance')) {
         FinderIndexer::getInstance()->index($item);
     } else {
         FinderIndexer::index($item);
     }
 }
Example #13
Show file File: content.php Project: WineWorld/joomlatrialcmbg
0
 /**
  * Overloaded bind function
  *
  * @param   array  $array   Named array
  * @param   mixed  $ignore  An optional array or space separated list of properties
  *                          to ignore while binding.
  *
  * @return  mixed  Null if operation was satisfactory, otherwise returns an error string
  *
  * @see     JTable::bind()
  * @since   11.1
  */
 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'];
             $this->fulltext = '';
         } 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;
     }
     // Bind the rules.
     if (isset($array['rules']) && is_array($array['rules'])) {
         $rules = new JAccessRules($array['rules']);
         $this->setRules($rules);
     }
     return parent::bind($array, $ignore);
 }
Example #14
Show file File: categorie.php Project: tomazkramberger/autofilter
0
 /**
  * Overloaded bind function to pre-process the params.
  *
  * @param   array  $array   Named array
  * @param   mixed  $ignore  Optional array or list of parameters to ignore
  *
  * @return  null|string  null is operation was satisfactory, otherwise returns an error
  *
  * @see     JTable:bind
  * @since   1.5
  */
 public function bind($array, $ignore = '')
 {
     $input = JFactory::getApplication()->input;
     $task = $input->getString('task', '');
     if (($task == 'save' || $task == 'apply') && (!JFactory::getUser()->authorise('core.edit.state', 'com_autofilter') && $array['state'] == 1)) {
         $array['state'] = 0;
     }
     if ($array['id'] == 0) {
         $array['created_by'] = JFactory::getUser()->id;
     }
     if (isset($array['params']) && is_array($array['params'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['params']);
         $array['params'] = (string) $registry;
     }
     if (isset($array['metadata']) && is_array($array['metadata'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['metadata']);
         $array['metadata'] = (string) $registry;
     }
     if (!JFactory::getUser()->authorise('core.admin', 'com_autofilter.categorie.' . $array['id'])) {
         $actions = JAccess::getActionsFromFile(JPATH_ADMINISTRATOR . '/components/com_autofilter/access.xml', "/access/section[@name='categorie']/");
         $default_actions = JAccess::getAssetRules('com_autofilter.categorie.' . $array['id'])->getData();
         $array_jaccess = array();
         foreach ($actions as $action) {
             $array_jaccess[$action->name] = $default_actions[$action->name];
         }
         $array['rules'] = $this->JAccessRulestoArray($array_jaccess);
     }
     // Bind the rules for ACL where supported.
     if (isset($array['rules']) && is_array($array['rules'])) {
         $this->setRules($array['rules']);
     }
     return parent::bind($array, $ignore);
 }