Fills $this->visitor
196097
public function process()
    {
        $this->getVisitor();
        $this->saveVisitor();

        if (!$this->visitor->hasUserId() && !Yii::$app->user->isGuest) {
            $this->visitor->setUserId(Yii::$app->user->identity->getId());
        }

        if ($this->detectFirstVisitSource) {

        }

        if ($this->detectAllVisitsSources) {

        }

        if ($this->storeLastActivity) {
            $this->visitor->save();
        }

        if ($this->storeVisitedPages) {

        }
    }
989771
private function saveVisitor()
    {
        Yii::$app->session->set($this->visitorCookieName, $this->visitor->getPrimaryKey());

        if (!Yii::$app->request->cookies->has($this->visitorCookieName)) {
            $this->setVisitorCookie();
            return;
        }

        $cookie = Yii::$app->request->cookies->get($this->visitorCookieName);
        if ($cookie->expire - time() <= $this->visitorCookieExpireTime) {
            $this->setVisitorCookie();
        }
    }
549440
public function populate()
    {
        if ($this->configurator) {
            call_user_func($this->configurator);
        }

        $this->populateListeners();
        $this->populateSubscribers();
    }
1221847
public function fill()
    {
        $params          = array_merge($this->attributes, [
            'id'            => $this->id,
            'widget'        => $this->model,
            'name'          => $this->name,
            'title'         => strlen($this->title) > 0 ? $this->title : $this->name,
            'description'   => $this->description,
            'editable'      => $this->editable(),
            'widgets'       => $this->widgets,
            'template'      => $this->template,
            'only_template' => $this->renderOnlyWithTemplate
        ]);
        $reflectionClass = new ReflectionClass(get_called_class());
        if ($reflectionClass->getParentClass()->getName() === "Antares\UI\UIComponents\Templates\Datatables") {
            array_set($params, 'datatable', true);
        }
        array_set($params, 'content', $this->templateAdapter->share($params)->decorate($this->render()));
        return $params;
    }
842833
public function visitor($visitorId = null)
  {
    if($visitorId === null)
    {
      $visitorId = $this->getVisitorIdCookie();
    }
    return Visitor::newInstance($this)
      ->setVisitorId($visitorId);
  }
38907
function LoadCurrent()
    {
        $this->user = null;
        $userID = null;
        if (isset($_SESSION[self::$sessionParam]))
             $userID = $_SESSION[self::$sessionParam];
        
        if ($userID)
        {
            $user = new User($userID);
            if ($user->Exists())
                $this->user = $user;
        }
        return $this->user !== null;
    }
632927
private function populate_input()
    {
        if ($this->get_method() === 'GET') {
            $this->input = new Bag($this->query->to_array());
        } else {
            $this->input = new Bag(
                \array_merge($this->query->to_array(), $this->post->to_array(), $this->files->to_array())
            );
        }
    }
918820
protected function _populate() {
		if ($this->closed() || !$this->_result->valid()) {
			return;
		}
		$data = $this->_result->current();
		$result = $this->_set($data, null, ['exists' => true, 'original' => true]);
		$this->_result->next();

		return $result;
	}
1289050
protected function fillDataForEmpty()
    {
        // Fill field references if they are empty
        $fields = [];

        // Add columns for attributes
        foreach ($this->info->attributes as $attribute) {

            if ($attribute->hidden || ! $this->shouldAttributeBeEditableByDefault($attribute, $this->info)) {
                continue;
            }

            $fields[ $attribute->name ] = $this->makeModelFormFieldDataForAttributeData($attribute);
        }


        // Add fields for relations
        foreach ($this->info->relations as $relation) {

            $fields[ $relation->name ] = $this->makeModelFormFieldDataForRelationData($relation);
        }


        $this->info->form->fields = $fields;
    }
1009340
private function fillPath()
    {
          $this->_url = '';
          $this->_fullUrl = '';
          $this->_treePath = '';

          foreach ($this->getPath() as $item) { 	  
            $this->_treePath .= '/item-'.$item->id;
            if ($item->isRoot()) continue;
            
            $this->_fullUrl .= '/'.$item->alias;
            if ($item->isServer()) continue;
            
            $this->_url .= '/'.$item->alias;
          }
          $this->_url      = $this->_url.'/';
          $this->_fullUrl  = $this->_fullUrl.'/';
          $this->_treePath = '/root'.$this->_treePath;
          if ($this->_url == '') $this->_url = '/';
		  //die('***');
    }
810980
public function autoFill()
    {
        // The date format method to use with Carbon to convert the dates
        $dateFormatMethod = 'to' . strtolower($this->format) . 'String';

        if (null === $this->pubDate) {
            $this->pubDate = Carbon::parse('now')->{$dateFormatMethod}();
        }

        if (null === $this->summary) {
            $summary = strip_tags($this->content);

            $this->summary = substr($summary, 0, 144) . '...';
        }
    }
299862
public function _construct()
    {
        $this->_controller = 'adminhtml_dashboard';
        $this->_headerText = __('Dashboard');
        parent::_construct();

        /**
         * Contact sync.
         */
        $this->buttonList->add(
            'contact_sync',
            [
                'label' => __('Run Contact Sync'),
                'class' => 'primary'
            ]
        );

        /**
         * Importer sync.
         */
        $this->buttonList->add(
            'importer_sync',
            [
                'label' => __('Run Importer Sync'),
                'class' => 'primary'
            ]
        );
    }
456019
public function fillFields()
    {
        // Fill the fields from $_POST array
        foreach ($_POST as $key => $val) {
            
            // Get int value form field parent id
            if ($key == 'ParentID' && $val == 0) {
                
                $this[$key] = null;
                
                // Get other fields
            } elseif ($key != 'StructureID') {
                
                $this[$key] = $val;
            }
        }

        // Save data about application
        $this['applicationGenerate'] = isset($_POST['generate-application'])&&($_POST['generate-application'] == true) ? 1 : 0;
        $this['applicationOutput'] = isset($_POST['output-application'])&&($_POST['output-application'] == true) ? 1 : 0;
        $this['applicationOutputStructure'] = isset($_POST['output-structure-application'])&&($_POST['output-structure-application'] == true) ? 1 : 0;
        $this['applicationRenderMain'] = isset($_POST['render-main-application'])&&($_POST['render-main-application'] == true) ? 1 : 0;

        // If application need to generate then set system property to 1 or 0
        $this['system'] = isset($_POST['generate-application'])&&($_POST['generate-application'] == true) ? 1: 0;

        // Save icon
        $icon = isset($_POST['icon-application']) ? filter_var($_POST['icon-application']) : null;
        if (strlen($icon) > 0) {
            $this['applicationIcon'] = $icon;
        }

        /** TODO: Authenticated user can be not instance of user table */
        if (!$this->query->entity('\samson\activerecord\user')->where('user_id', $this->UserID)->first()) {
            $this->UserID = 1;
        }
        // Save object
        $this->save();

        if (isset($_POST['ParentID']) && $_POST['ParentID'] != 0) {
            // Create new relation
            $strRelation = new \samson\activerecord\structure_relation(false);
            $strRelation->parent_id = $_POST['ParentID'];
            $strRelation->child_id = $this->id;

            // Save relation
            $strRelation->save();
        }
    }
299065
public function fill($newValue): self
    {
        foreach ($this->values as $index => $value) {
            $this->values[$index] = $newValue;
        }

        return $this;
    }
594716
protected function fill()
    {
        $readFilterCallback = $this->readFilterCallback;
        $this->buffer .= $readFilterCallback($this->stream->read(self::BUFFER_SIZE));

        if ($this->stream->eof()) {
            $this->buffer .= $readFilterCallback();
        }
    }
724102
public function _construct()
    {
        $this->_init(
            \Dotdigitalgroup\Email\Model\Wishlist::class,
            \Dotdigitalgroup\Email\Model\ResourceModel\Wishlist::class
        );
    }
1067441
protected function fill_user_subscription_cache() {
        foreach ($this->forums as $forum) {
            $cm = get_fast_modinfo($this->courses[$forum->course])->instances['forum'][$forum->id];
            $modcontext = \context_module::instance($cm->id);

            $this->subscribedusers[$forum->id] = [];
            if ($users = \mod_forum\subscriptions::fetch_subscribed_users($forum, 0, $modcontext, 'u.id, u.maildigest', true)) {
                foreach ($users as $user) {
                    // This user is subscribed to this forum.
                    $this->subscribedusers[$forum->id][$user->id] = $user->id;
                    if (!isset($this->users[$user->id])) {
                        // Store minimal user info.
                        $this->users[$user->id] = $user;
                    }
                }
                // Release memory.
                unset($users);
            }
        }
    }