Register the UIX objects

@since  1.0.0
@access public

@param string $slug Object slug
@param array  $object object structure array

@return object|\uix object instance
170170
public static function register( $slug, $object, $parent = null ) {
		// get the current instance
		$caller = get_called_class();

		return new $caller( $slug, $object, $parent );
	}
1159749
public function load($slug, $branch = 'master')
    {
        $this->data = array();
        $this->httpClient->setBaseUrl($this->helper->getRawFileUrl($slug, $branch, ''));

        $this->data = $this->getResponse('composer.json');
    }
404565
public
    function index($slug)
    {

        $page = Model::getBySlug($slug);

        if (!$page)
            return response()->view("Jlib::errors.404")->setStatusCode(404);

        return response()->make($page);


    }
1261082
public static function set($slug, $license)
    {
        $licenses = self::getLicenseFile();
        $data = (array)$licenses->content();
        $slug = strtolower($slug);

        if ($license && !self::validate($license)) {
            return false;
        }

        if (!\is_string($license)) {
            if (isset($data['licenses'][$slug])) {
                unset($data['licenses'][$slug]);
            } else {
                return false;
            }
        } else {
            $data['licenses'][$slug] = $license;
        }

        $licenses->save($data);
        $licenses->free();

        return true;
    }
1060252
public function register($nickname, $object)
    {
        if (isset($this->autoInstantiations[$nickname]))
        {
            throw new DuplicateObjectException($nickname);
        }

        $this->autoInstantiations[$nickname] = $object;
    }
1226380
protected function make($slug, $arguments = [])
    {
        $menu = $this->container->make(Menu::class);
        $model = $this->container->make(MenuModel::class);

        $menu->setModel($model->make($slug, $arguments));

        return $this->hang($menu);
    }
42767
protected function add(ModelObject $obj)
    {
        // Check that all required fields exist.
        $this->getErrors()->validateModelObject($obj);

        if ($this->dao->slugExists($obj->Slug))
            $this->errors->reject("The slug for this ".get_class($obj)." record is already in use.");
    }
935835
public function getIdForSlug($slug, User $user = null)
    {
        $query = Tag::where('slug', 'like', $slug);

        return $this->scopeVisibleTo($query, $user)->pluck('id');
    }
666720
public function getBySlug($slug)
    {
        if (empty($slug))
            throw new Exception("Cannot retrieve object [".get_class($this->getModel())."] without slug");

        $results = $this->multiGetBySlug((array)$slug);
        if (isset($results[$slug]))
            return $results[$slug];

        throw new Exception(get_class($this->getModel()).' not found for slug: '.$slug);

    }
64578
public static function initSingle($slug, $name, $endpoints = [])
    {
        return self::init($slug, $name, $endpoints, Config::TYPE_SINGLE);
    }
844385
protected function makeSlugUnique($slug)
    {
        $i = 1;
        $slugIsUnique = false;

        // get existing slugs (1 db query)
        $list = $this->getExistingSlugs($slug);

        // slug is already unique
        if ($list->count() === 0) {
            return $slug;
        }

        // collection to array
        if (!is_array($list)) {
            $list = $list->toArray();
        }

        // loop through the list and add suffix
        while (!$slugIsUnique) {
            $uniqueSlug = $slug . $this->slugOptions->slugSeparator . ($i++);
            if (!in_array($uniqueSlug, $list)) {
                $slugIsUnique = true;
            }
        }

        return $uniqueSlug;
    }
780810
static function addInstance($object){
		$name = str_replace(DS,'.',get_class($object));
		self::$instance[$name] = $object;
	}
403254
public function slug($slug = null)
    {
        if (null === $slug) {
            return $this->slug;
        }

        $this->slug = $slug;

        return $this;
    }
383816
public function block($slug)
    {
        $block = $this->findABlock($slug);

        if (!$block) {
            $this->update([
                'blocks' => json_encode(array_merge($this->blocks, [ $slug => '' ]))
            ]);
        }

        return $block;
    }
823823
private function make($slug, array $arguments = [])
    {
        $thumbnail = $this->container->make(Thumbnail::class);

        $thumbnail
            ->setSlug($slug)
            ->setArguments($arguments)
            ->dispatch();

        return $this->hang($thumbnail);
    }
873225
public function request($slug, $params = []) {
		$headers = array(
			'Accept' => 'application/json',
			'Accept-Encoding' =>'gzip, deflate'
			);
		$uri = $this->uriConstruct($slug, $params);
		$response = Requests::get($uri , $headers, $this->options);

		return $response->body;
	}
566304
public function init($identifier, $slug)
    {
        $this->getModel()->setId($identifier);
        $this->getModel()->setSlug($slug);

        $this->addMetabox();
    }