@param $source

@return static
763824
public static function source($source = null)
    {
        $ins = new static();
        $ins->source = $source;
        $ins->query = $source;
        if (is_object($source) && (is_a($source, "\Illuminate\Database\Eloquent\Builder") ||
                                  is_a($source, "\Illuminate\Database\Eloquent\Model"))) {
            $ins->model = $source->getModel();
        }
        $ins->cid = $ins->getIdentifier();
        $ins->sniffStatus();
        $ins->sniffAction();

        return $ins;
    }
172464
public function addSource( string $sourceName, ISource $source ) : Translator
   {

      $source->setLocale( $this->_locale );

      $this->_sources[ $sourceName ] = $source;

      return $this;

   }
110261
public function source($source = null)
    {
        $model = $this->noInitModel;
        if (!is_string($model->sourceAttribute)) {
            return $this;
        }
        if (!is_string($source)) {
            $modelClass = $this->modelClass;
            $source = $modelClass::$sourceSelf;
        }
        return $this->andWhere([$model->sourceAttribute => $source]);
    }
1356700
public function prune($source = null)
    {
        if ($source) {
            $this->addUsingAlias(SourceTableMap::COL_ID, $source->getId(), Criteria::NOT_EQUAL);
        }

        return $this;
    }
1281925
protected function remove($source)
	{
		// Iteration provides nested tag protection
		do
		{
			$temp   = $source;
			$source = $this->cleanTags($source);
		}
		while ($temp !== $source);

		return $source;
	}
1031559
public function setSource($source)
    {
        if (!is_string($source)) {
            return parent::setSource($source);
        }

        if ($this->glue === '') {
            return parent::setSource(str_split($source));
        }

        if (!$length = mb_strlen($source)) {
            $this->source = [];

            return $this;
        }

        $this->source = explode($this->glue, trim($source, $this->glue));

        return $this;
    }
67763
public function setNewSource($source)
    {
        if (0 < strpos($source, 'tok_')) {
            throw new \InvalidArgumentException(sprintf('The token you passed seems not to be a card token: %s', $source));
        }

        $this->newSource = $source;

        return $this;
    }
1052239
public function generate($source = null)
    {
        $this->getImporter()->setInput($source);

        // Add these dependencies to collection
        $this->addRawDependenciesToCollection($this->getImporter()->import());

        // Return this
        return $this;
    }
798957
public function addSource(Source $source)
    {
        $sources = array_map('strval', $this->sources->toArray());
        if (!in_array($source->getUrl(), $sources)) {
            $this->sources->add($source);
            $source->setItem($this);
        }

        return $this;
    }
1055600
public function setSource($source)
    {
        $controller = Controller::curr();
        $code = $controller->data()->Code;
        $updated = [];
        if (is_array($source) && !empty($source)) {
            foreach ($source as $key => $val) {
                $updated[ProductPage::getGeneratedValue($code, $this->getName(), $key, 'value')] = $val;
            }
        }
        $this->source = $updated;

        return $this;
    }
413802
public function hydrate($source)
    {
        /**
         * foreach element of the "source" try to find programmatically
         * the correct data model base in the property type and name.
         */
        foreach ($source as $key => $value) {
            $this->set($key, $value);
        }

        return $this;
    }
28870
protected function copyFilesToDefaultPath($source)
    {
        $target = $this->defaultPath;
        if (!$target || $target == $source) {
            return $this;
        }

        if (is_file($source)) {
            //copy file
            copy($source, $target);
            return $this;
        }

        $it = new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS);
        $ri = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::SELF_FIRST);

        $this->cleanUpDir($target);

        /** @var \SplFileInfo $file */
        foreach ($ri as $file) {
            if ('.git' . DIRECTORY_SEPARATOR == substr($ri->getSubPathName(), 0, 5)
                || '.git' == $ri->getSubPathName()
            ) {
                //skip .git directory
                continue;
            }
            $targetPath = $target . DIRECTORY_SEPARATOR . $ri->getSubPathName();
            if ($file->isDir()) {
                $this->filesystem->ensureDirectoryExists($targetPath);
            } else {
                copy($file->getPathname(), $targetPath);
            }
        }
        return $this;
    }
1082990
public static function load($source) {

		if(false === is_string($source) && false === $source instanceof Viewmodel) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string or instance of sFire\MVC\Viewmodel, "%s" given', __METHOD__, gettype($source)), E_USER_ERROR);
		}

		$file = $source;

		if($source instanceof Viewmodel) {

			$path 			= Path :: get('modules') . Router :: getRoute() -> getModule() . DIRECTORY_SEPARATOR;
			$views 			= $path . Application :: get(['directory', 'view']);
			$translations 	= $path . Application :: get(['directory', 'translation']);
			$extension 		= Application :: get(['extensions', 'view']);
			$file  			= preg_replace('#^'. preg_quote($views) .'#', '', $source -> getFile());
			$file  			= preg_replace('#'. preg_quote($extension) .'$#', '', $file);
		}

		$module 	= Router :: getRoute() -> getModule();
		$extension 	= Application :: get(['extensions', 'translation']);
		$file 		= str_replace('.', DIRECTORY_SEPARATOR, $file);
		$file 		= Path :: get('modules') . $module . DIRECTORY_SEPARATOR . Application :: get(['directory', 'translation']) . $file . $extension;
		$file 		= new File($file);
		$identifier = md5($file -> entity() -> getBasepath());
		$cache 		= new File(Path :: get('cache-translation') . $identifier);

		if(false === $file -> exists() && false === $source instanceof Viewmodel) {
			return trigger_error(sprintf('Translation file "%s" used in %s() does not exists', $file -> entity() -> getBasepath(), __METHOD__), E_USER_ERROR);
		}

		static :: cache($cache, $file);

		return $identifier;
	}
497585
public function Concat( $source )
	{

		$source = is_array($source) ? $source : ( $source instanceof Queryable ? $source->toList() : iterator_to_array($source) );

		return $this
					->getClone()
					->setRepository( array_merge( $this->repository , $source ) );

	}
577910
public static function source($source = '')
    {
        $ins = new static();
        if (is_object($source) && is_a($source, "\Illuminate\Database\Eloquent\Model")) {
            $ins->model = $source;
        }
        $ins->cid = $ins->getIdentifier();
        $ins->sniffStatus();
        $ins->sniffAction();

        return $ins;
    }
944940
public static function source($source)
    {
        $ins         = new static();
        $ins->source = $source;

        //inherit cid from datafilter
        if ($ins->source instanceof \Zofe\Rapyd\DataFilter\DataFilter) {
            $ins->cid = $ins->source->cid;
        }
        //generate new component id
        else {
            $ins->cid = $ins->getIdentifier();
        }

        return $ins;
    }
1267817
public function updateSource(Common\ISource $source)
    {
        return $this->update($source, $this->isGroupJoin, $this->filter, $this->hasDefault);
    }