{@inheritDoc}

@return static
964148
public function addType(FilterInterface $type, $alias)
    {
        $type->setName($alias);
        $this->types[$alias] = $type;

        return $this;
    }
58954
public static function instance()
    {
        if (null === self::$_instance) {
            $logger = new Monolog(Config::read('app.id'));
            $file_handler = new StreamHandler(self::getFilepath());
            $logger->pushHandler($file_handler);

            self::$_instance = $logger;
        }
        return self::$_instance;
    }
1359097
static public function instance($name=null)
    {
        $options = $name ? ['name' => $name] : [];
        $name = $name ?: get_called_class();
        
        if (!isset(static::$instances[$name])) {
            static::$instances[$name] = new static($name);
        }
        
        return static::$instances[$name];
    }
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 );
	}
801125
public static function app()
    {
        if (static::$app instanceof self) {
            return static::$app;
        } else {
            $app = new static(true);
            $app->is_single = true;
            return (static::$app = $app);
        }
    }
421025
protected static function create()
    {
        $config = new static();

        $config->config = (new ConfigFactory())->create($config->getProjectPath(), $config->CONFIG_FILE);

        return $config;
    }
1257397
private static function instance()
    {
        $currentClass = get_called_class();
        $instanceName = empty( self::$instance ) ? '' : new \ReflectionClass(self::$instance);
        if( empty( self::$instance ) || ( $instanceName->name != $currentClass ) ) {
            self::$instance = new static();
        }
        return self::$instance;
    }
50600
public static function __static()
	{
		ValueProxy::$valueFactory = array();
		ValueProxy::$dynamicValueType = Type::FromNameAndTypeCode( ValueProxy::$CLASSNAME, TypeCode::Object );
	}
1088656
public function newQuery()
    {
        return new static(
            $this->cache,
            $this->connection,
            $this->grammar,
            $this->processor,
            $this->cacheTag
        );
    }
1184047
public static function instance()
    {
        if (self::$instance) {
            return self::$instance;
        }

        //set up a proper instance
        self::$instance = new self;

        return self::$instance;
    }
796997
public static function make($actions)
    {
        $instance = new static();

        if (array_key_exists(
            'whenInsert',
            $actions
        )) {
            $instance->setWhenInsert(ActionEntry::make($actions['whenInsert']));
        }

        if (array_key_exists(
            'whenUpdate',
            $actions
        )) {
            $instance->setWhenUpdate(ActionEntry::make($actions['whenUpdate']));
        }

        if (array_key_exists(
            'whenDelete',
            $actions
        )) {
            $instance->setWhenDelete(ActionEntry::make($actions['whenDelete']));
        }

        return $instance;
    }
547008
public static function build(array $values)
    {
        $result = new static;

        foreach ($values as $field => $value) {
            /** @var $className TypeInterface */
            $result->$field = $value;
        }

        return $result;
    }
59230
public static function factory()
    {
        $self = new static();
        $self->downloader = new Plugins\Csv\Downloader();
        $self->outputter  = new Plugins\Csv\Outputter();
        $self->writer     = new Plugins\Csv\Writer();

        return $self;
    }
905534
public function ucfirst(){
		
		if($this->isNullOrWhitespace()){
			return clone $this;
		}
		else if($this->count() === 1){
			return new static(\mb_strtoupper($this->_Value, $this->_Encoding),
					$this->_Encoding);
		}
		
		$str = $this[0]->ucfirst() . $this->substring(1);
		
		return new static($str, $this->_Encoding);
		
	}
1244197
public function fresh($with = [])
    {
        if ($this->isEmpty()) {
            return new static;
        }

        $model = $this->first();

        $freshModels = $model->newQueryWithoutScopes()
            ->with(is_string($with) ? func_get_args() : $with)
            ->whereIn($model->getKeyName(), $this->modelKeys())
            ->get()
            ->getDictionary();

        return $this->map(function ($model) use ($freshModels) {
            return $model->exists && isset($freshModels[$model->getKey()])
                    ? $freshModels[$model->getKey()] : null;
        });
    }
407531
public static function __static()
	{
		InstanceFactsIterator::$itemSubstitutionGroup = array( \XBRL_Constants::$xbrliItem );
		InstanceFactsIterator::$tupleSubstitutionGroup = array( \XBRL_Constants::$xbrliTuple );
		InstanceFactsIterator::$nodeTest = XmlQualifiedNameTest::create( "substitutionGroup" );
	}
990625
static public function create()
    {
        $t = new static();

        $t->registerService(new Service\Youtube());
        $t->registerService(new Service\Dailymotion());
        $t->registerService(new Service\Vimeo());
        $t->registerService(new Service\Spotify());
        $t->registerService(new Service\SoundCloud());

        return $t;
    }