-----------------------------------------------------------------------------
332181
public function getCriteriaClause($lhs = true, $operand = true, $rhs = true, $rhs1 = false, $rhs2 = false, $add_del = true)
    {

        $cls = "";

        if ($this->_use == "SHOW/HIDE-and-GROUPBY") {
            $add_del = false;
        }

        if ($this->column_value == "(ALL)") {
            return $cls;
        }

        if ($this->column_value == "(NOTFOUND)") {
            $cls = " AND 1 = 0";
            return $cls;
        }

        if (!$this->column_value) {
            return ($cls);
        }

        $del = '';

        switch ($this->criteria_type) {

            case "ANY":
            case "ANYCHAR":
            case "TEXTFIELD":
                if ($add_del) {
                    $del = $this->getValueDelimiter();
                }

                $extract = explode(',', $this->column_value);
                if (is_array($extract)) {
                    $ct = 0;
                    foreach ($extract as $col) {
                        if (is_string($col)) {
                            $col = trim($col);
                        }

                        if (!$col) {
                            continue;
                        }

                        if ($col == "(ALL)") {
                            continue;
                        }

                        if ($ct == 0) {
                            if ($lhs) {
                                //$cls .= " XX".$this->table_name.".".$this->column_name;
                                $cls .= " AND " . $this->column_name;
                            }
                            if ($rhs) {
                                if ($operand) {
                                    $cls .= " IN (";
                                }

                                $cls .= $del . $col . $del;
                            }
                        } else
                        if ($rhs) {
                            $cls .= "," . $del . $col . $del;
                        }

                        $ct++;
                    }

                    if ($ct > 0 && $rhs) {
                        if ($operand) {
                            $cls .= " )";
                        }
                    }

                } else {
                    if ($lhs) {
                        if ($this->table_name && $this->column_name) {
                            $cls .= " AND " . $this->table_name . "." . $this->column_name;
                        } else
                        if ($this->column_name) {
                            $cls .= " AND " . $this->column_name;
                        }

                    }
                    if ($rhs) {
                        if ($operand) {
                            $cls .= " =" . $del . $this->column_value . $del;
                        } else {
                            $cls .= $del . $this->column_value . $del;
                        }
                    }

                }
                break;

            case "LIST":
                if ($add_del) {
                    $del = $this->getValueDelimiter();
                }

                if (!is_array($this->column_value)) {
                    $this->column_value = explode(',', $this->column_value);
                }

                if (is_array($this->column_value)) {
                    $ct = 0;
                    foreach ($this->column_value as $col) {
                        if (is_string($col)) {
                            $col = trim($col);
                        }

                        if ($col == "(ALL)") {
                            continue;
                        }

                        if ($ct == 0) {
                            if ($lhs) {
                                if ($this->table_name && $this->column_name) {
                                    $cls .= " AND " . $this->table_name . "." . $this->column_name;
                                } else
                                if ($this->column_name) {
                                    $cls .= " AND " . $this->column_name;
                                }

                            }
                            if ($rhs) {
                                if ($operand) {
                                    $cls .= " IN (";
                                }

                                $cls .= $del . $col . $del;
                            }
                        } else
                        if ($rhs) {
                            $cls .= "," . $del . $col . $del;
                        }

                        $ct++;
                    }

                    if ($ct > 0) {
                        if ($operand) {
                            $cls .= " )";
                        }
                    }

                } else {
                    if ($lhs) {
                        if ($this->table_name && $this->column_name) {
                            $cls .= " AND " . $this->table_name . "." . $this->column_name;
                        } else
                        if ($this->column_name) {
                            $cls .= " AND " . $this->column_name;
                        }

                    }
                    if ($rhs) {
                        if ($operand) {
                            $cls .= " =" . $del . $this->column_value . $del;
                        } else {
                            $cls .= $del . $this->column_value . $del;
                        }

                    }
                }
                break;

            case "DATE":
                $cls = "";
                if ($this->column_value) {
                    $val1 = ReporticoLocale::parseDate($this->column_value, false, ReporticoApp::getConfig("prep_dateformat"));
                    $val1 = ReporticoLocale::convertYMDtoLocal($val1, ReporticoApp::getConfig("prep_dateformat"), ReporticoApp::getConfig("db_dateformat"));
                    if ($lhs) {
                        if ($this->table_name && $this->column_name) {
                            $cls .= " AND " . $this->table_name . "." . $this->column_name;
                        } else
                        if ($this->column_name) {
                            $cls .= " AND " . $this->column_name;
                        }

                    }
                    if ($add_del) {
                        $del = $this->getValueDelimiter();
                    }

                    if ($rhs) {
                        if ($operand) {
                            $cls .= " = ";
                        }

                        $cls .= $del . $val1 . $del;
                    }
                }
                break;

            case "DATERANGE":
                $cls = "";
                if ($this->column_value) {
                    // If daterange value here is a range in a single value then its been
                    // run directly from command line and needs splitting up using "-"

                    $val1 = ReporticoLocale::parseDate($this->column_value, false, ReporticoApp::getConfig("prep_dateformat"));
                    $val2 = ReporticoLocale::parseDate($this->column_value2, false, ReporticoApp::getConfig("prep_dateformat"));
                    $val1 = ReporticoLocale::convertYMDtoLocal($val1, ReporticoApp::getConfig("prep_dateformat"), ReporticoApp::getConfig("db_dateformat"));
                    $val2 = ReporticoLocale::convertYMDtoLocal($val2, ReporticoApp::getConfig("prep_dateformat"), ReporticoApp::getConfig("db_dateformat"));
                    if ($lhs) {
                        if ($this->table_name && $this->column_name) {
                            $cls .= " AND " . $this->table_name . "." . $this->column_name;
                        } else
                        if ($this->column_name) {
                            $cls .= " AND " . $this->column_name;
                        }

                    }

                    if ($add_del) {
                        $del = $this->getValueDelimiter();
                    }

                    if ($rhs) {
                        $cls .= " BETWEEN ";
                        //$cls .= $del.$this->column_value.$del;
                        $cls .= $del . $val1 . $del;
                        $cls .= " AND ";
                        //$cls .= $del.$this->column_value2.$del;
                        $cls .= $del . $val2 . $del;
                    }
                    if ($rhs1) {
                        $cls = $del . $val1 . $del;
                    }
                    if ($rhs2) {
                        $cls = $del . $val2 . $del;
                    }
                }
                break;

            case "LOOKUP":
                if ($add_del) {
                    $del = $this->getValueDelimiter();
                }

                if (!is_array($this->column_value)) {
                    $this->column_value = explode(',', $this->column_value);
                }

                if (is_array($this->column_value)) {
                    $ct = 0;
                    foreach ($this->column_value as $col) {
                        if (is_string($col)) {
                            $col = trim($col);
                        }

                        if ($col == "(ALL)") {
                            continue;
                        }

                        if ($ct == 0) {
                            if ($lhs) {
                                if ($this->table_name && $this->column_name) {
                                    $cls .= " AND " . $this->table_name . "." . $this->column_name;
                                } else
                                if ($this->column_name) {
                                    $cls .= " AND " . $this->column_name;
                                }

                            }
                            if ($rhs) {
                                if ($operand) {
                                    $cls .= " IN (";
                                }

                                $cls .= $del . $col . $del;
                            }
                        } else
                        if ($rhs) {
                            $cls .= "," . $del . $col . $del;
                        }

                        $ct++;
                    }

                    if ($ct > 0) {
                        if ($operand) {
                            $cls .= " )";
                        }
                    }

                } else {
                    if ($lhs) {
                        if ($this->table_name && $this->column_name) {
                            $cls .= " AND " . $this->table_name . "." . $this->column_name;
                        } else
                        if ($this->column_name) {
                            $cls .= " AND " . $this->column_name;
                        }

                    }
                    if ($rhs) {
                        if ($operand) {
                            $cls .= " =" . $del . $this->column_value . $del;
                        } else {
                            $cls .= $del . $this->column_value . $del;
                        }

                    }
                }
                break;

            default:
                break;
        }

        return ($cls);
    }
1008357
public function next()
    {
        parent::next();
        if ($this->_validValues) {
            $this->_values->next();
        }
        $this->_validValues = $this->_values->valid();
    }
208531
public function init()
    {
        if ( $this->lat0 == 0 ) {
            $this->lat0 = 90; //$this->lat0 ca
        }

        /* Place parameters in static storage for common use
          ------------------------------------------------- */
        $this->temp = $this->b / $this->a;
        $this->es = 1.0 - pow( $this->temp, 2 ); // devait etre dans tmerc.js mais n y est pas donc je commente sinon retour de valeurs nulles 
        $this->e = sqrt( $this->es );
        $this->e0 = Common::e0fn( $this->es );
        $this->e1 = Common::e1fn( $this->es );
        $this->e2 = Common::e2fn( $this->es );
        $this->e3 = Common::e3fn( $this->es );
        $this->ml0 = Common::mlfn( $this->e0, $this->e1, $this->e2, $this->e3, $this->lat0 ); //si que des zeros le calcul ne se fait pas
        //if (!$this->ml0) {$this->ml0=0;}
    }
734008
public function execute()
    {
        $this->insertID = $this->table->insertOne($this->context + $this->data);
        parent::execute();
    }
202558
public function initializeObject()
    {
        if ($this->cache->has('parsedFormats') && $this->cache->has('parsedFormatsIndices') && $this->cache->has('localizedSymbols')) {
            $this->parsedFormats = $this->cache->get('parsedFormats');
            $this->parsedFormatsIndices = $this->cache->get('parsedFormatsIndices');
            $this->localizedSymbols = $this->cache->get('localizedSymbols');
        }
    }
289324
public function initialize()
    {
        $this->where  = new WhereClause($this);
        $this->order  = new OrderClause($this);
        $this->limit  = new LimitClause($this);
        $this->joins  = new JoinClause($this);
    }
6957
private void init() {
        quantiles = new double[data.length][8];
        for (int i = 0; i < data.length; i++) {
            int n = data[i].length;
            Arrays.sort(data[i]);
            quantiles[i][1] = data[i][n / 4];
            quantiles[i][2] = data[i][n / 2];
            quantiles[i][3] = data[i][3 * n / 4];
            quantiles[i][5] = quantiles[i][3] - quantiles[i][1]; // interquartile range
            quantiles[i][6] = quantiles[i][1] - 1.5 * quantiles[i][5];
            quantiles[i][7] = quantiles[i][3] + 1.5 * quantiles[i][5];
            quantiles[i][0] = quantiles[i][6] < data[i][0] ? data[i][0] : quantiles[i][6];
            quantiles[i][4] = quantiles[i][7] > data[i][data[i].length - 1] ? data[i][data[i].length - 1] : quantiles[i][7];
        }
    }
810772
public function initialize()
    {
        if ($this->initialized || ! $this->association) {
            return;
        }

        $this->doInitialize();

        $this->initialized = true;
    }
496591
public function initializeObject()
    {
        if ($this->cache->has('parsedFormats') && $this->cache->has('parsedFormatsIndices') && $this->cache->has('localizedLiterals')) {
            $this->parsedFormats = $this->cache->get('parsedFormats');
            $this->parsedFormatsIndices = $this->cache->get('parsedFormatsIndices');
            $this->localizedLiterals = $this->cache->get('localizedLiterals');
        }
    }
845733
public function indexAction()
    {
        $user = $this->userService->getCurrentUser();
        $workspacesArray = [];
        /** @var Workspace $workspace */
        foreach ($this->workspaceRepository->findAll() as $workspace) {

            // FIXME: This check should be implemented through a specialized Workspace Privilege or something similar
            if ($workspace->getOwner() !== null && $workspace->getOwner() !== $user) {
                continue;
            }

            $workspaceArray = [
                'name' => $workspace->getName(),
                'title' => $workspace->getTitle(),
                'description' => $workspace->getDescription(),
                'baseWorkspace' => $workspace->getBaseWorkspace()
            ];
            if ($user !== null) {
                $workspaceArray['readonly'] = !$this->userService->currentUserCanPublishToWorkspace($workspace);
            }
            $workspacesArray[] = $workspaceArray;
        }

        $this->view->assign('workspaces', $workspacesArray);
    }
1373393
public function initialize()
    {

        $this->title = '';
        $this->settings = array();
        $this->created = null;
        $this->updated = null;

    }
1342485
public function init()
	{
		parent::init();

		$db=$this->getDbConnection();
		$db->setActive(true);
		if($this->autoCreateCacheTable)
		{
			$sql="DELETE FROM {$this->cacheTableName} WHERE expire>0 AND expire<".time();
			try
			{
				$db->createCommand($sql)->execute();
			}
			catch(Exception $e)
			{
				$this->createCacheTable($db,$this->cacheTableName);
			}
		}
	}
255386
public function init()
	{
		parent::init();
		if($this->getLogPath()===null)
			$this->setLogPath(Yii::app()->getRuntimePath());
	}
807856
public function init()
    {
        parent::init();

        $this->configs = array_replace_recursive($this->configs, ['dataProvider' => $this->dataProvider]);
        $this->configs = array_replace_recursive($this->configs, ['columns' => $this->columns]);
        $this->configs = array_replace_recursive($this->configs, ['dataProvider' => $this->dataProvider]);
        $this->configs = array_replace_recursive($this->configs, ['filterModel' => $this->filterModel]);
        $this->configs = array_replace_recursive($this->configs, ['filterModel' => $this->pjax]);

        if ('' != $this->id) {
            $this->configs = array_replace_recursive($this->configs, ['id' => $this->id]);
        }

        GridViewAsset::register($this->getView());
    }
670801
public function init()
    {
        parent::init();

        foreach ($this->columns as $column) {
            $column->init();
            // index the column by id if it is not already indexed
            if (!array_key_exists($column->id, $this->columns_by_id)) {
                $this->columns_by_id[$column->id] = $column;
            }
        }

        foreach ($this->extra_rows as $row) {
            $row->init();
            // index the row by id if it is not already indexed
            if (!array_key_exists($row->id, $this->rows_by_id)) {
                $this->rows_by_id[$row->id] = $row;
            }
        }

        foreach ($this->groups as $group) {
            $group->init();
            // index the group by id if it is not already indexed
            if (!array_key_exists($group->id, $this->groups_by_id)) {
                $this->groups_by_id[$group->id] = $group;
            }
        }

        foreach ($this->spanning_columns as $column) {
            $column->init();
            // index the row column by id if it is not already indexed
            if (!array_key_exists($column->id, $this->spanning_columns_by_id)) {
                $this->spanning_columns_by_id[$column->id] = $column;
            }
        }
    }
769814
public function init()
	{
		if (!isset($this->htmlOptions['class']))
			$this->htmlOptions['class'] = 'form-' . $this->type;
		else
			$this->htmlOptions['class'] .= ' form-' . $this->type;

		if (!isset($this->inlineErrors))
			$this->inlineErrors = $this->type === self::TYPE_HORIZONTAL;

		if ($this->inlineErrors)
			$this->errorMessageCssClass = 'help-inline error';
		else
			$this->errorMessageCssClass = 'help-block error';

		parent::init();
	}
801860
public function init()
	{
		if($this->nextPageLabel===null)
			$this->nextPageLabel=Yii::t('yii','Next &gt;');
		if($this->prevPageLabel===null)
			$this->prevPageLabel=Yii::t('yii','&lt; Previous');
		if($this->firstPageLabel===null)
			$this->firstPageLabel=Yii::t('yii','&lt;&lt; First');
		if($this->lastPageLabel===null)
			$this->lastPageLabel=Yii::t('yii','Last &gt;&gt;');
		if($this->header===null)
			$this->header=Yii::t('yii','Go to page: ');

		if(!isset($this->htmlOptions['id']))
			$this->htmlOptions['id']=$this->getId();
		if(!isset($this->htmlOptions['class']))
			$this->htmlOptions['class']='yiiPager';
	}