Enter description here...

@param phpQueryObject $self
14384
public static function script($self, $arg1) 
    {
        $params = func_get_args();
        $params = array_slice($params, 2);
        $return = null;
        $config = self::$config;
        if (phpQueryPlugin_Scripts::$scriptMethods[$arg1]) {
            phpQuery::callbackRun(
                phpQueryPlugin_Scripts::$scriptMethods[$arg1],
                array($self, $params, &$return, $config)
            );
        } else if ($arg1 != '__config' && file_exists(dirname(__FILE__)."/Scripts/$arg1.php")) {
            phpQuery::debug("Loading script '$arg1'");
            include dirname(__FILE__)."/Scripts/$arg1.php";
        } else {
            phpQuery::debug("Requested script '$arg1' doesn't exist");
        }
        return $return
        ? $return
        : $self;
    }
340698
public function query() {
    $account = $this->view->getUser();
    $this->query->addTable('post__field_visibility');

    $and_condition = db_and();
    $should_add_where_clause = FALSE;
    if (!$account->hasPermission('view public posts')) {
      $and_condition->condition('post__field_visibility.field_visibility_value', '1', '!=');
      $should_add_where_clause = TRUE;
    }
    if (!$account->hasPermission('view community posts')) {
      $and_condition->condition('post__field_visibility.field_visibility_value', '2', '!=');
      $should_add_where_clause = TRUE;
    }
    if ($should_add_where_clause) {
      $this->query->addWhere('visibility', $and_condition);
    }
  }
386234
protected function doFilter($object): void
    {
        $clearAll = false;
        $id = spl_object_hash($object);
        array_splice($this->toFilter, array_search($id, $this->toFilter, true), 1);

        if (!$this->isViewGranted($object)) {
            $clearAll = true;
        }

        $ref = new \ReflectionClass($object);

        foreach ($ref->getProperties() as $property) {
            $property->setAccessible(true);
            $fieldVote = new FieldVote($object, $property->getName());
            $value = $property->getValue($object);

            if ($this->isFilterViewGranted($fieldVote, $value, $clearAll)) {
                $value = $this->ofe->filterValue($value);
                $property->setValue($object, $value);
            }
        }
    }
364253
public function assertResponseObject($object)
    {
        $responseObject = $this->getResponseObject();

        Assertion::assertTrue(
            $responseObject instanceof $object,
            "Expect body object to be an instance of '$object' but got a '" . get_class($responseObject) . "'"
        );
    }
44751
public function index($selfedit = "false") {
		$this->selfedit = $selfedit;
		$this->status = true;

		try {
			$this->status = MoufReflectionProxy::checkConnection();
		} catch (MoufException $e) {
			$this->status = false;
		}

		$this->localUrl = MoufReflectionProxy::getLocalUrlToProject();

		$this->contentBlock->addFile(ROOT_PATH."src-dev/views/configureLocalUrl.php", $this);
		$this->template->toHtml();
	}
329238
public function search($query)
    {
        if ($this->hasSearch()) {

            $search = $this->search;

            // If it's a anonymous function
            if (!is_string($search) && is_callable($search)) {
                call_user_func($search, $this, $query);
            }
        }

        return $this;
    }
315829
protected function initQuery() {
        /**
         * SELECT subject FROM (
         */
        return $this->getDriverEscaper()->dbCommand('SELECT') . ' ' .
                $this->getDriverEscaper()->reserved('subject') . ' ' .
                $this->getDriverEscaper()->dbCommand('FROM') . ' ' .
                '(';
    }
923926
public function initializeObject()
    {
        /** @var $querySettings \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings */
        $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
        $querySettings->setRespectStoragePage(false);
        $this->setDefaultQuerySettings($querySettings);
        $this->backendLayoutView = GeneralUtility::makeInstance(\MASK\Mask\Backend\BackendLayoutView::class);
    }
700390
public function deleteInstance($selfedit = "false", $instanceName=null, $returnurl = null) {
        $this->selfedit = $selfedit;

        if ($selfedit == "true") {
            $this->moufManager = MoufManager::getMoufManager();
        } else {
            $this->moufManager = MoufManager::getMoufManagerHiddenInstance();
        }

        $this->moufManager->removeComponent($instanceName);
        $this->moufManager->rewriteMouf();

        if ($returnurl) {
            header("Location:".$returnurl);
        } else {
            header("Location: .?selfedit=".$selfedit);
        }
    }
1135699
public function getQueryModel($model=null, $self=true)
    {
        if (!$model) {
            $model = static::getFirstTable();
        }
        
        if ($model && is_string($model)) {
            $model = preg_replace('/^' . $this->getTablePrefix() . '/', '', $model, 1);
            return static::getTableInfo($model);
        } else {
            return $model ? : ($self ? $this : null);
        }
    }
798114
private function SqlError($msg="NO MESSAGE PROVIDED", $self) {
    $Error = "NO ERROR MESSAGE FOUND";
    $Errno = -1;

    if(is_null($self) || is_null($errDb = $self->getDb()) || $self->getDb() === 0) {
      if(isset($self->errno) && isset($self->error)) {
        $Errno = $self->errno;
        $Error = $self->error;
      } else {
        $Errno = -9999;
        $Error = "Self db not valid";
      }
    } else {
      if(method_exists($self, 'getErrorInfo')) {
        $err = $self->getErrorInfo(); // from the database engine, like mysqli etc.
        $Error = $err['error'];
        $Errno = $err['errno'];
      } else {
        throw(new Exception("method getErrorInfo missing"));
      }
    }

    if(($size = strlen($msg)) > 500) $msg = "Message Too Long: $size";
    if(($size = strlen($Error)) > 500) $Error = "Error Too Long: $size";

    $backtrace = debug_backtrace(); // trace back information

    $caller = $backtrace[1]; // Get caller information

    array_shift($backtrace); // SqlError
    array_shift($backtrace); // SqlException

    $firstcaller = '';

    // Helper callback function
    if(!function_exists('array_deep')) {
      // If it does not already exist define it here
      function array_deep($a) {
        if(is_array($a)) {
          $a = array_map('array_deep', $a);
          $ret = "";
          foreach($a as $key=>$val) {
            if(is_numeric($key)) {
              $ret .= "$val, ";
            } else {
              $ret .= "$key=>$val";
            }
          }
          $ret = rtrim($ret, ", ");
          $a = "array($ret)";
        } else {
          if(is_string($a)) {
            if(strpos($a, "'")) {
              $a = "\"$a\"";
            } else {
              $a = "'$a', ";
            }
          } elseif(is_numeric($a)) {
            $a = "$a, ";
          }
        }
        return $a;
      }
    }

    $args = '';

    if(count($backtrace)) {
      foreach($backtrace as $bk) {
        $args = '';
        
        if($bk['args']) {
          foreach($bk['args'] as $arg) {
            if(is_object($arg)) continue;

            if(is_string($arg)) {
              if(strpos($arg, "'")) {
                $args .= "\"$arg\", ";
              } else {
                $args .= "'$arg', ";
              }
            } elseif(is_numeric($arg)) {
              $args .= "$arg, ";
            } elseif(is_array($arg)) {
              $args .= array_deep($arg);
            }
          }
          $args = rtrim($args, ", ");
        }

        if($bk['class']) {
          $classfunc = "<b>{$bk['class']}::{$bk['function']}($args)</b>";
        } else {
          $classfunc = "function <b>{$bk['function']}($args)</b>";
        }
        $firstcaller .= "$classfunc<br> in <b>{$bk['file']}</b><br>".
                        " on line <b>{$bk['line']}</b><br>\n";
      }
    }
    $cwd = getcwd();
    
    $error = <<<EOF
<p>&quot;<i>$msg</i>&quot;<br>
error=&quot;<i>$Error</i>&quot;, errno=&quot;<i>$Errno</i>&quot;<br>
cwd=$cwd<br>
called from <strong>{$caller['file']}</strong><br> on line <strong>{$caller['line']}</strong><br>

EOF;

    if(isset($firstcaller)) {
      $error .= "Back Trace:<br>\n$firstcaller";
    }

    return array($error, $Errno);
  }
1199970
protected function createQuery()
    {
        if (!$this->queryCreated) {
            $this->setBaseQuery();
            if (!isset($this->showInactiveUsers)) {
                $this->filter('u.uIsActive', 1);
            }
            if (!$this->showInvalidatedUsers) {
                $this->filter('u.uIsValidated', 0, '!=');
            }
            $this->setupAttributeFilters("left join UserSearchIndexAttributes on (UserSearchIndexAttributes.uID = u.uID)");
            $this->queryCreated = 1;
        }
    }
830178
private function implementQuery()
    {
        $this->response = $this->provider->query(
            $this->query,
            $this->settings['type']
        );
    }
1044904
public static function php_self($dropqs = true)
	{
	$protocol = 'http';
	if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on')
		{
		$protocol = 'https';
		}
	elseif (isset($_SERVER['SERVER_PORT']) && ($_SERVER['SERVER_PORT'] == '443'))
		{
		$protocol = 'https';
		}

	$url = sprintf('%s://%s%s', $protocol, $_SERVER['SERVER_NAME'], $_SERVER['REQUEST_URI']);
	$parts = parse_url($url);
	$port = $_SERVER['SERVER_PORT'];
	$scheme = $parts['scheme'];
	$host = $parts['host'];
	$path = @$parts['path'];
	$qs = @$parts['query'];
	$port or $port = ($scheme == 'https') ? '443' : '80';
	if (($scheme == 'https' && $port != '443') || ($scheme == 'http' && $port != '80'))
		{
		$host = "$host:$port";
		}

	$url = "$scheme://$host$path";
	if (!$dropqs) return "{$url}?{$qs}";
	  else return $url;
	}
378140
public function withQueryString(QueryString $query): self
    {
        $url = Structure::fromString((string) $this)
            ->withQuery(
                Query::fromString((string) $query->substring(1))
            )
            ->withFragment(new NullFragment);

        return new self(
            (string) $url
        );
    }
282130
public function add($object)
    {
        if ($this->removedNodes->contains($object)) {
            $this->removedNodes->detach($object);
        }
        if (!$this->addedNodes->contains($object)) {
            $this->addedNodes->attach($object);
        }
        parent::add($object);
    }
26716
public function refresh($selfedit = "false") {
		$this->selfedit = $selfedit;
		
		$moufCache = new MoufCache();
		$moufCache->purgeAll();
		
		header("Location: .?selfedit=".$selfedit);
	}