<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
class Network_Model_DbTable_Networks extends Engine_Db_Table
{
  protected $_rowClass = 'Network_Model_Network';

  protected $_serializedColumns = array('pattern');

  public function recalculate(User_Model_User $member, $values = null)
  {
    if( null === $values ) {
      $values = Engine_Api::_()->fields()->getFieldsValues($member);
    }

    foreach( $this->fetchAll() as $network )
    {
      $network->recalculate($member, $values);
    }

    return $this;
  }
}
