Create and add a subject.

@param string $name

@return Subject
350260
public function createSubject($name)
    {
        $subject = new Subject($this, $name);
        $this->subjects[$name] = $subject;

        return $subject;
    }
742974
public function addColumn($name)
    {
        $column = new Column($this->container, $name);

        $this->columns[] = $column;

        return $column;
    }
213110
public function createTask($name) {
    $this->init();
    $class = Code::expandNamespace(\Webforge\Common\String::expand($name, 'Task'), 'Psc\System\Deploy');
    
    $gClass = GClass::factory($class);
    $params = array();
    if ($gClass->hasMethod('__construct')) {
      $constructor = $gClass->getMethod('__construct');
      foreach ($constructor->getParameters() as $parameter) {
        $params[] = $this->resolveTaskDependency($parameter, $gClass);
      }
    }
    
    return $gClass->newInstance($params);
  }
628242
public static function trigger($name, $subject = null, $data = null)
    {
        $event = new Event($name, $subject, $data);
        if (is_object($subject)) {
            return $subject->getEventManager()->dispatch($event);
        }

        return EventManager::instance()->dispatch($event);
    }
854215
public function createNode($name)
    {
        $node = new \PAGI\Node\Node();
        return $node->setName($name)->setAgiClient($this);
    }
137306
public static function create(Model $subject, $file)
    {
        return app(FileAdder::class)
            ->setSubject($subject)
            ->setFile($file);
    }
161247
public function createInsertTarget(string $name)
    {
        if (!$this->loaded) {
            $this->loadHTML('');
        }
        $element = $this->createElement('html5-dom-document-insert-target');
        $element->setAttribute('name', $name);
        return $element;
    }
1205123
public static function create($name, ...$args)
    {
        $name = static::getClass($name);

        $class = static::findClass($name);

        if ($class) {
            return static::createObject($class, ...$args);
        }

        return null;
    }
1145209
public function channel(string $name): Channel
    {
        return new Channel(
            $this->baseUrl->append($name),
            $this->client
        );
    }
57327
public function addFrom( $email, $name = null )
	{
		$this->object->addFrom( $email, $name );
		return $this;
	}
865885
public static function create($name) {
    $name = (string) $name;
    $name = ltrim($name, '\\');
    $namespace_node = Parser::parseSnippet("namespace $name;");
    return $namespace_node;
  }
1329843
public function create($name)
    {
        $name = $this->resolveName($name);

        $prototype = $this->getPrototype($name);
        $product = $prototype->copy();        
        
        foreach($this->invocationsMethodsOnCreate[$name] as $methodName => $argTag)
        {
            if(isset($this->invokeArgs[$argTag]))
            {
                $arg = $this->invokeArgs[$argTag];
                $product->$methodName($arg);
            }
        }

        return $product;
    }
1119639
public function createControl(string $name): Control
  {
    $control = new TableColumnControl($name);
    $control->setTableColumn($this->tableColumn);

    return $control;
  }
663711
public static function create($name = null)
    {
        $name = $name ? $name : self::generateName();
        $container = new Container($name);
        $container->register('Container', $container);
        self::$containers[$name] = $container;
        return $container;
    }
1061438
public function subject($subject)
    {
        try {
            $this->mailer->Subject = $subject;
        } catch (phpmailerException $e) {
            throw new EmailException($e->getMessage(), $e->getCode());
        }

        return $this;
    }
291888
public function makeAcquaintance($name)
	{
		// See if the relationship already exists
		if (!$this->getRelationship($name))
		{
			// Get the child rows/row and set them back on the model as a relationship for future use
			$rows = call_user_func_array(self::$acquaintances[$name], [$this])->rows();
			$this->addRelationship($name, $rows);
		}

		return $this;
	}
964537
public function newInstance($name, $value)
    {
        $class = $this->getClassFor($name);
        return new $class($this->consumerService, $name, $value);
    }