Opengraph::setNamespace

@param \O2System\Framework\Http\Presenter\Meta\Opengraph\Abstracts\AbstractNamespace $namespace

@return static
493401
public function setNamespace(Opengraph\Abstracts\AbstractNamespace $namespace)
    {
        $this->prefix = 'http://ogp.me/ns# ' . $namespace->namespace . ": http://ogp.me/ns/$namespace->namespace#";
        $this->offsetSet('type', $namespace->namespace);

        foreach ($namespace->getArrayCopy() as $property => $element) {
            parent::offsetSet($property, $element);
        }

        return $this;
    }
166340
static public function setNamespaces($nss)
	{
	    static::initNamespace();
	    
	    $nss = (array) $nss;
	    $rnss = [];
	    foreach ($nss as $ns => $path) {
	        if (!is_numeric($ns)) {
	            $ns = static::formatNamespace($ns);
	            static::loader()->setPsr4($ns, $path);
	        } else {
	            $ns = static::formatNamespace($path);
	        }
	        $rnss[] = $ns;
	    }
	    static::$namespaces = array_merge(static::$namespaces, $rnss);
	    return static::$namespaces = array_unique(static::$namespaces);
	}
10552
public function add($data, $namespace='default')
    {
        Type::force($data, ArrayAccess::class);

        if (!isset($this->addedData[$namespace])) {
            $this->addedData[$namespace] = [];
        }

        $this->addedData[$namespace][] = $data;

        return $this;
    }
1274542
private function setConfigNamespace($oldNamespace, $newNamespace)
    {
        $files = $this->filesystem->files(base_path() . '/config');

        foreach ($files as $file) {
            $content = $this->filesystem->get($file);
            $this->filesystem->create($file, preg_replace("/\\b" . $oldNamespace . "\\b/", $newNamespace, $content));
        }
    }
1009500
public function setNamespace($namespace) : AuditEvent
    {
        $parts = explode('/', $namespace);

        foreach ($parts as &$part) {
            $part = Snake::case($part, '-');
        }

        $namespace = implode('/', $parts);
        $namespace = '/' . trim($namespace, '/');
        $this->namespace = $namespace;

        return $this;
    }
678384
public function setNamespaces(array $namespaces)
    {
        $this->namespaces = array();

        foreach ($namespaces as $prefix => $uri) {
            $this->addNamespace($uri, $prefix);
        }

        return $this;
    }
459465
public function ns($nameSpace)
    {
        // If ! exist try to load a configuration file 
        if ( !isset($this->nameSpaces[$nameSpace]) ) {
            // short sanitize of nameSpace
            if (!filter_var( $nameSpace,FILTER_VALIDATE_REGEXP, 
                array('options'=>array('regexp' => '/^[\w]+$/')))) {
                    throw new InvalidArgumentException("Invalid configuration name.",400);
            }
            $this->nameSpaces[$nameSpace] = new ContextNameSpace($this->loadArrayFromIniFile($nameSpace));
        }
        
        return $this->nameSpaces[$nameSpace];
    }
1073325
public function addNamespaces(array $namespaces)
    {
        foreach ($namespaces as $prefix => $baseDir) {
            $this->addNamespace($prefix, $baseDir);
        }
    }
1089578
static function setCache($namespace)
    {
        $cacheData = [];
        $data = CommonConfigModel::getConfigByNamespace($namespace);
        foreach ($data as $key => $value) {
            $cacheData[$value['name']] = [
                'value'=>self::_getInfo($value['vtype'], $value['value']),
                'issystem'=>$value['issystem'],
                'desc'=>$value['desc']
            ];
        }
        $cacheName = 'config:'.$namespace;
        Cache::forever($cacheName, $cacheData);
        return $cacheData;
    }
960430
public function withNameSpace($namespace)
    {
        $namespace = (string) $namespace;

        if (! isset(static::$namespaces[$namespace])) {
            $new = clone $this;
            $new->setNamespace($namespace);
            $new->setEnabled($this->enabled);
            static::$namespaces[$namespace] = $new;
        }

        return static::$namespaces[$namespace];
    }
689649
public function addNamespace( $prefix, $namespace )
	{
		if ( empty( $namespace ) )
		{
			throw new ArgumentOutOfRangeException( "The $namespace parameter to addNamespace cannot be null or empty" );
		}

		if ( substr( $prefix, 0, 5 ) == "xmlns" )
		{
			$prefix = substr( $prefix, 5 );
		}

		if ( strlen( $prefix ) > 0 && $prefix[0] == ":" )
		{
			$prefix = substr( $prefix, 1 );
		}

		if ( empty( $prefix) && empty( $this->defaultNamespace ) )
		{
			$this->defaultNamespace = $namespace;
		}

		$this->namespaces[ $prefix ] = $namespace;
	}
367000
public function addNamespace($namespace, $priority = PriorityQueue::NORMAL)
    {
        $namespace = static::normalise($namespace);

        $this->namespaces->insert($namespace, $priority);

        return $this;
    }
495460
public function changeNamespace(string $namespace): void
	{
		$this->setNamespace($namespace);
		$result = $this->getStorage()->fetchAll();
		foreach ($result as $row) {
			$resource = $this->imageStorage->getResource($row->name);
			$resource->setNamespace($this->namespace);
			$this->imageStorage->save($resource);

			$this->getStorage()->update($row->key, $resource->getIdentifier());
		}
	}
229788
public function valueAlignmentForNamespace( $namespace, $name )
	{
		$prefix = "";

		switch ( $namespace )
		{
			case "http://xbrl.sec.gov/dei/2014-01-31":

				$prefix = "dei";
				break;

			case 'http://fasb.org/us-types/2014-01-31':
				$prefix = "us-types";
				break;

			default:
				return parent::valueAlignmentForNamespace( $namespace, $name );
		}

		$type = "$prefix:$name";

		switch ( $type )
		{
			case 'us-types:dateStringItemType':
			case 'dei:fiscalPeriodItemType':
			case 'dei:submissionTypeItemType':
			case 'dei:centralIndexKeyItemType':
			case 'dei:yesNoItemType':
			case 'dei:filerCategoryItemType':
			default:
				return "left";
		}

	}
760545
public static function setNamespaces($namespaces)
    {
        $called = get_called_class();

        if (!$namespaces instanceof PriorityQueue) {
            $namespaces = new PriorityQueue();
        }

        static::$namespaces[$called] = $namespaces;
    }
613842
public function createSubManager($nameSpace, array $options = null)
    {

        $ns = $this->getOption('nameSpace');
        $subNs = !empty($ns)
            ? "$ns."
            : '';

        $options = $this->getConfig()->getItems();
        $config['nameSpace'] = "$subNs$nameSpace";

        return new static($options);
    }
473255
public function setNamespace($namespace)
    {
        if (is_string($namespace) === false) {
            $msg = "The namespace argument must be a string.";
            throw new InvalidArgumentException($msg);
        } elseif ($namespace === '') {
            $msg = "The namespace argument must be a non-empty string.";
            throw new InvalidArgumentException($msg);
        } else {
            $this->namespace = $namespace;
        }
    }