Allows to set the preload behaviour

@param string $preload
@return $this
199167
public function preload($preload)
    {
        $validPreloadAttrs = ['auto', 'metadata', 'none'];
        
        if (\in_array($preload, $validPreloadAttrs, true)) {
            $this->attributes['preload'] = $preload;
        }

        return $this;
    }
16828
public function before($input): self {
        $this->manipulateNodesWithInput($input, function($node, $newNodes) {
            foreach ($newNodes as $newNode) {
                $node->parent()->insertBefore($newNode, $node);
            }
        });

        return $this;
    }
713617
public function onBefore(BeforeEvent $event)
    {
        $request = $event->getRequest();

        // Only sign requests using "auth"="oauth"
        if ('oauth' !== $request->getConfig()['auth']) {
            return;
        }

        $this->signRequest($request);
    }
1342282
public function before(... $middlewares)
  {
    foreach ($middlewares as $middleware) {
      $this->currentContext->addMiddleware($middleware, RoutingContext::BEFORE);
    }

    return $this;
  }
548751
public function setTemplate(string $template): self
    {
        $this->template = $template;
        $this->logger->debug("Template file set to loader.", ["template" => $this->template]);
        return $this;
    }
1079626
public function beforeSave()
    {
        parent::beforeSave();
        if ($this->isObjectNew() && !$this->getCreatedAt()) {
            $this->setCreatedAt($this->dateTime->formatDate(true));
        }
        $this->setUpdatedAt($this->dateTime->formatDate(true));

        return $this;
    }
1238840
public function _set_preload_stylesheet( $tag, $handle, $src ) {
		$handles = apply_filters( 'inc2734_wp_page_speed_optimization_output_head_styles', [] );
		if ( in_array( $handle, $handles ) && 0 === strpos( $src, site_url() ) ) {
			$sitepath = site_url( '', 'relative' );
			$abspath  = untrailingslashit( ABSPATH );

			if ( $sitepath ) {
				$abspath = preg_replace( '|(.*?)' . preg_quote( $sitepath ) . '$|', '$1', $abspath );
			}

			$parse  = parse_url( $src );
			$buffer = \file_get_contents( $abspath . $parse['path'] );
			$buffer = str_replace( 'url(../', 'url(' . dirname( $parse['path'] ) . '/../', $buffer );
			$buffer = str_replace( 'url(//', 'url(/', $buffer );
			// @codingStandardsIgnoreStart
			?>
			<style><?php echo $buffer; ?></style>
			<?php
			// @codingStandardsIgnoreEnd
			return;
		}

		$handles = apply_filters( 'inc2734_wp_page_speed_optimization_preload_stylesheets', [] );
		if ( in_array( $handle, $handles ) ) {
			return str_replace( '\'stylesheet\'', '\'preload\' as="style"', $tag );
		}

		return $tag;
	}
996546
protected function preinit($req)
    {
        if ($req === null) {
            $req = new \stdClass;
            $req->attrs = new \stdClass;
        }

        $this->attrs = $req->attrs;
    }
1075275
public function onBefore(BeforeEvent $event)
    {
        $request = $event->getRequest();

        if (!$this->canCacheRequest($request)) {
            $this->cacheMiss($request);
            return;
        }

        if (!($response = $this->storage->fetch($request))) {
            $this->cacheMiss($request);
            return;
        }

        $response->setHeader('Age', Utils::getResponseAge($response));
        $valid = $this->validate($request, $response);

        // Validate that the response satisfies the request
        if ($valid) {
            $request->getConfig()->set('cache_lookup', 'HIT');
            $request->getConfig()->set('cache_hit', true);
            $event->intercept($response);
        } else {
            $this->cacheMiss($request);
        }
    }
1327765
public function before($callback)
    {
        $callbacks = $this->getOption('_before_middlewares');
        $callbacks[] = $callback;
        $this->setOption('_before_middlewares', $callbacks);

        return $this;
    }
307268
public function preRun(){

        if(!isset($this->parameters['target']) ){
            $this->parameters['target'] = $this->parameters['t']; 
        }

        if(!isset($this->parameters['documentRoot']) ){
            $this->parameters['documentRoot'] = $this->parameters['d'];
        }
        if(!isset($this->parameters['serverName']) ){
            $this->parameters['serverName'] = $this->parameters['s'];
        }
        if(!isset($this->parameters['tpl']) ){
            $this->parameters['tpl'] = dirname(__FILE__). '/sample/sample.conf';
        }
        
        $fileinfo =pathinfo($this->parameters['target']);
        
        if($fileinfo['extension'] != 'conf'){
            $this->err('Extension of target file has to be conf', true);
        }
    }
284474
public function register($prepend = false)
    {
        if (!$this->isLoaded) {
            spl_autoload_register(array($this, 'loadClass'), true, $prepend);
        }
        $this->isLoaded = true;
    }
833952
private function applyPreset($presetAfterUpload, $file)
    {
        foreach ($presetAfterUpload as $preset) {
            $this->model->thumbUrl($this->attribute, $preset, $file);
        }
    }
1210140
protected function _beforeLoad()
    {
        parent::_beforeLoad();
        if ($this->category && $this->category->getId()) {
            $this->applyCategory();
        }
    }
106679
public function loadAny()
    {
        if ($this->loaded()) {
            $this->unload();
        }
        $this->hook('beforeLoad', array('loadAny', array()));

        $this->controller->loadByConditions($this);

        $this->endLoad();

        return $this;
    }
711263
public function preLoad()
    {

        $query = new Query( <<<SQL
SELECT
    t.oid AS oid,
    t.typname AS name,
    n.nspname as "schema",
    t.typlen AS length,
    t.typtype AS type,
    t.typcategory AS category,
    t.typarray AS "arrayType",
    t.typdefault AS default,
    t.typdefaultbin AS "defaultBin"
FROM
    pg_type AS t
INNER JOIN
    pg_namespace AS n ON n.oid = t.typnamespace
WHERE
    t.oid IN (
        SELECT
            DISTINCT a.atttypid as "typeOid"
        FROM
            pg_attribute AS a
        INNER JOIN
            pg_type AS t ON t.oid = a.atttypid
        INNER JOIN
            pg_class AS c ON c.oid = a.attrelid
        LEFT JOIN
            pg_catalog.pg_namespace n ON n.oid = c.relnamespace
        WHERE
            n.nspname NOT IN ('pg_catalog', 'pg_toast', 'information_schema') AND
            attisdropped = false AND
            attnum > 0
)
;
SQL
        );

        $types = $this->db->query( $query )->fetch();
        parent::cacheInvalidate();
        $this->initByDatas( $types );

    }
1130194
protected function preload()
    {
        $this->point( Point::POINT_PRELOAD );
        $this->point( Point::POINT_MULTIPLE_PRELOAD, true );
        $this->finish(POINT::POINT_MULTIPLE_PRELOAD); // Needs!
        $this->point( Point::POINT_CALIBRATE );
    }