Добавить флаг в битовую маску
@return static
336617
public function bitAdd($name, $value)
  {
    return $this->set($name, $this->get($name, 0) | $value);
  }
87878
public function getDebugLocation()
    {
        $location = '';
        if ($this->class && ($this->method || $this->property)) {
            $location .= $this->fullyQualifiedName($this->class);
            if ($this->method) {
                $location .= ($this->static ? '::' : '->') . $this->method . '()';
            } elseif ($this->property) {
                $location .= ($this->static ? '::$' : '->') . $this->property;
            }
        }
        if ($this->filename) {
            if ($location !== '') {
                $location .= ' in ';
            }
            $location .= $this->filename;
        }
        if ($this->line) {
            if ($location !== '') {
                $location .= ' on';
            }
            $location .= ' line ' . $this->line;
            if ($this->character) {
                $location .= ':' . $this->character;
            }
        }

        return $location;
    }
133418
public function fs()
    {
        if (null === $this->fs)
            $this->fs = new Filesystem($this->getFilesystemPath(), $this->adapter);
        return $this->fs;
    }
696042
public function call_static() {
		$args  = func_get_args();
		$class = array_shift( $args );
		$name  = array_shift( $args );

		return call_user_func_array( [$class, $name], $args );
	}
50600
public static function __static()
	{
		ValueProxy::$valueFactory = array();
		ValueProxy::$dynamicValueType = Type::FromNameAndTypeCode( ValueProxy::$CLASSNAME, TypeCode::Object );
	}
812501
public function getTypeInstance(){		
		$finfo = finfo_open(FILEINFO_MIME_TYPE);
		$mimetype = finfo_file($finfo,$this->getPathname());
		finfo_close($finfo);
    	$parts = explode('/',$mimetype);
    	$path = str_replace('/',DIRECTORY_SEPARATOR,__DIR__.'/Type/'.ucfirst($parts[0]).'/'.ucfirst($parts[1])).'.php';
    	if(file_exists($path)){
    		$class = "Bricks\File\Type\{ucfirst($parts[0])}\{ucfirst($parts[1]}";
    		return new $class($this->getPathname);
    	}
    	$path = dirname($path).'.php';
    	if(file_exists($path)){
    		$class = "Bricks\File\Type\{ucfirst($parts[0])}";
    		return new $class($this->getPathname);
    	}
    	
    	return $this;    	
	}
590632
protected function cloneForExport()
    {
        return tap(new static, function ($instance) {
            $instance->setRawAttributes($this->getAttributes());
            $instance->setRelations($this->relations);
            $instance->setAppends($this->appends);
            $instance->setVisible($this->visible);
            $instance->setHidden($this->hidden);
        });
    }
110523
public function gf(): self
    {
        $arguments = func_get_args();

        if (func_num_args() === 1 && ($image = $arguments[0]) instanceof ImageContract) {
            $bytesPerRow = $image->width();
            $byteCount = $fieldCount = $bytesPerRow * $image->height();

            return $this->command('GF', 'A', $byteCount, $fieldCount, $bytesPerRow, $image->toAscii());
        }

        array_unshift($arguments, 'GF');

        return call_user_func_array([$this, 'command'], $arguments);
    }
958985
public static function instance()
    {
        if (null === self::$_instance) {
            if (!defined('APP_ROOT')) {
                $path = __DIR__ . '/../../app/config.json';
            } else {
                $path = APP_ROOT . 'config.json';
            }

            if (!file_exists($path)) {
                $config = json_encode(self::$defaults, JSON_PRETTY_PRINT);
                file_put_contents($path, $config);
            }
            self::$_instance = new static($path);
        }
        return self::$_instance;
    }
1241410
public static function staticConstructor()
    {
        self::$_RU_ALPHABET = array();
        self::$_EN_ALPHABET = array();

        foreach (self::$_TRANSLATION_TABLE as $pair) {
            self::$_RU_ALPHABET[] = $pair[0];
            self::$_EN_ALPHABET[] = $pair[1];
        }
    }
20226
public static function __static()
	{
		// NameValue::$nameStartChar = "[:_\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nl}]";
		NameValue::$nameStartChar = SchemaTypes::$nameStartChar;
		NameValue::$nameChar = SchemaTypes::$nameChar;
		NameValue::$name = SchemaTypes::$name;
		NameValue::$ncName = SchemaTypes::$ncName;
	}
1012019
public function updateFileInfo()
    {
        $src = $this->src;

        if ($this->cluster instanceof ClusterLocal) {
            if (!\Yii::$app->request->hostInfo) {
                return $this;
            }

            $src = \Yii::$app->request->hostInfo . $this->src;
        }
        //Елси это изображение
        if ($this->isImage()) {
            if (extension_loaded('gd')) {
                list($width, $height, $type, $attr) = getimagesize($src);
                $this->image_height = $height;
                $this->image_width = $width;
            }
        }

        $this->save();
        return $this;
    }
755332
public function compile()
    {
        //Unificamos ficheros para que no se retarde mucho el proceso
        $this->files = array_unique($this->files);
        switch ($this->type) {
            default:
            case "js":
                $this->compileJs();
                break;
            case "css":
                $this->compileCss();
                break;
        }

        return $this;
    }
426711
public function addActive()
    {
        $row = new FormCheckbox('active', 'Опубликован');
        $this->rows['active'] = $row->setTab('main', 'Дата, вес, активность')
            ->setValid('integer|max:1|nullable')->setDefaultValue(1)->setInTableAdminEditable()->setFillable()
            ->setCssClassGroup('uk-width-1-3');

        return $this;
    }
1036233
protected function selfMin()
    {
        if (!$this->css) {
            return $this->css;
        }
        $static = &static::$static[__FUNCTION__.'_map'];

        if (!isset($static['replace'], $static['with'], $static['colors'])) {
            $de_spacifiables = array(
                '{',
                '}',
                '!=',
                '|=',
                '^=',
                '$=',
                '*=',
                '~=',
                '=',
                '~',
                ';',
                ',',
                '>',
            );
            $de_spacifiables = array_map(
                function ($string) {
                    return preg_quote($string, '/');
                },
                $de_spacifiables
            );
            $de_spacifiables = implode('|', $de_spacifiables);

            $static['replace'] = array(
                'comments'        => '/\/\*.*?\*\//s',
                'line_breaks'     => '/['."\r\n".']+/',
                'extra_spaces'    => '/\s{2,}/',
                'de_spacifiables' => '/ *('.$de_spacifiables.') */',
                'unnecessary_;s'  => '/;\}/',
            );
            $static['with']   = array('', ' ', ' ', '${1}', '}');
            $static['colors'] = '/(?P<context>[:,\h]+#)(?P<hex>[a-z0-9]{6})/i';
        }
        $this->css = preg_replace($static['replace'], $static['with'], $this->css);
        $this->css = preg_replace_callback($static['colors'], array($this, 'selfMaybeCompressCssColorCb'), $this->css);
        $this->css = trim($this->css);

        return $this->css;
    }
431166
public static function __static()
	{
		SequenceTypes::$Void = SequenceType::WithTypeCode( XmlTypeCode::None );
		SequenceTypes::$Item = SequenceType::WithTypeCode( XmlTypeCode::Item );
		SequenceTypes::$ItemS = SequenceType::WithTypeCodeAndCardinality( XmlTypeCode::Item, XmlTypeCardinality::ZeroOrMore );
		SequenceTypes::$Node = SequenceType::WithTypeCode( XmlTypeCode::Node );
		SequenceTypes::$ProcessingInstruction = SequenceType::WithTypeCode( XmlTypeCode::ProcessingInstruction );
		SequenceTypes::$Text = SequenceType::WithTypeCode( XmlTypeCode::Text );
		SequenceTypes::$Comment = SequenceType::WithTypeCode( XmlTypeCode::Comment );
		SequenceTypes::$Element = SequenceType::WithTypeCode( XmlTypeCode::Element );
		SequenceTypes::$Attribute = SequenceType::WithTypeCode( XmlTypeCode::Attribute );
		SequenceTypes::$Document = SequenceType::WithTypeCode( XmlTypeCode::Document );
		SequenceTypes::$Boolean = SequenceType::WithTypeCode( XmlTypeCode::Boolean );
		SequenceTypes::$AnyAtomicType = SequenceType::WithTypeCode( XmlTypeCode::AnyAtomicType );
		SequenceTypes::$AnyAtomicTypeO = SequenceType::WithTypeCodeAndCardinality( XmlTypeCode::AnyAtomicType, XmlTypeCardinality::ZeroOrOne );
		SequenceTypes::$Double = SequenceType::WithTypeCode( XmlTypeCode::Double );
		SequenceTypes::$Float = SequenceType::WithTypeCode( XmlTypeCode::Float );
		SequenceTypes::$Date = SequenceType::WithTypeCode( XmlTypeCode::Date );
		SequenceTypes::$Time = SequenceType::WithTypeCode( XmlTypeCode::Time );
		SequenceTypes::$DateTime = SequenceType::WithTypeCode( XmlTypeCode::DateTime );
		SequenceTypes::$StringX = SequenceType::WithTypeCodeAndCardinality (XmlTypeCode::String, XmlTypeCardinality::ZeroOrOne );
		SequenceTypes::$Int = SequenceType::WithTypeCode( XmlTypeCode::Int );
		SequenceTypes::$AnyUri = SequenceType::WithTypeCode( XmlTypeCode::AnyUri );
	}
671377
public static function getMapping()
    {
        $instance = new static();

        $params = $instance->getBasicEsParams();

        return $instance->getElasticSearchClient()->indices()->getMapping($params);
    }