Create attribute

@param  string $name
@param  array  $data
@return Attribute
512083
protected function createAttribute(\ReflectionClass $reflection, string $name, array $data): Attribute
    {
        $getter = isset($data['getter'])
            ? $data['getter']
            : $this->resolveGetter($reflection, $name);

        $setter = isset($data['setter'])
            ? $data['setter']
            : $this->resolveSetter($reflection, $name);

        $attribute = new Attribute($name, $getter);

        if ($setter !== null) {
            $attribute->setSetter($setter);
        }

        $this->processAttributeOptions($data, $attribute);

        return $attribute;
    }
444279
public function createFromData(array $data): AbstractEntity
    {
        /** @var AbstractEntity $result */
        $result = $this->factory->create();
        $result->mapFromArray($data);
        return $result;
    }
533470
public static function create(string $name, array $data = [])
    {
        $view = new static($name, $data);

        if (array_key_exists('url', $data)) {
            $view->setUrl($data['url']);
        }

        return $view;
    }
843220
protected function create(array $data)
    {
        $user = User::create([
            'uuid' => (string) Str::uuid(),
            'name' => $data['name'],
            'email' => $data['email'],
            'password' => Hash::make($data['password']),
        ]);

        return $user;
    }
885026
public function triggerEvent($name, array $data = [])
    {
        try {
            /** @var EventInterface $event */
            $event = $this->createEventObject($name, $data);
        } catch (\InvalidArgumentException $exception) {
            return $this;
        }

        foreach ($this->options['events'][$name]['listeners'] as $eventListener) {
            if ($event->isPropagationStopped()) {
                $this->loggerInstance->makeLogEvent($name, $eventListener, self::EVENT_STATUS_BREAK);
                break;
            }

            $this->executeListener($eventListener, $event, $name);
        }

        return $this;
    }
479107
public static function createFromArray(array $data)
    {
        $self = new self();

        if (isset($data['id'])) {
            $self->setId($data['id']);
        }
        if (isset($data['username'])) {
            $self->setUsername($data['username']);
        }
        if (isset($data['name'])) {
            $self->setName($data['name']);
        }

        return $self;
    }
893704
public static function create( $name, $content = NULL, $attributes = array(), $data = array() )
	{
		if( !strlen( $name	= trim( $name ) ) )
			throw new InvalidArgumentException( 'Missing tag name' );
		$name		= strtolower( $name );
		try{
			$attributes	= self::renderAttributes( $attributes );
			$data		= self::renderData( $data );
		}
		catch( InvalidArgumentException $e ) {
			if( version_compare( PHP_VERSION, '5.3.0', '>=' ) )
				throw new RuntimeException( 'Invalid attributes', NULL, $e );						//  throw exception and transport inner exception
			throw new RuntimeException( 'Invalid attributes', NULL );								//  throw exception
		}
		if( $content === NULL || $content === FALSE )												//  no node content defined, not even an empty string
			if( !in_array( $name, self::$shortTagExcludes ) )										//  node name is allowed to be a short tag
				return "<".$name.$attributes.$data."/>";											//  build and return short tag
		if( is_array( $content ) )																	//  content is an array, may be nested
			$content	= self::flattenArray( $content, '' );
		if( is_numeric( $content ) )
			$content	= (string) $content;
		if( is_object( $content ) ){
			if( !method_exists( $content, '__toString' ) ){											//  content is not a renderable object
				$message	= 'Object of class "'.get_class( $content ).'" cannot be rendered';		//  prepare message about not renderable object
				throw new InvalidArgumentException( $message ); 									//  break with error message
			}
			$content	= (string) $content;														//  render object to string
		}
		if( !is_null( $content ) && !is_string( $content ) ){										//  content is neither NULL nor string so far
			$message	= 'Content type "'.gettype( $content ).'" is not supported';				//  prepare message about wrong content data type
			throw new InvalidArgumentException( $message ); 										//  break with error message
		}
		return "<".$name.$attributes.$data.">".$content."</".$name.">";								//  build and return full tag
	}
1014028
protected function createAndReturnNewFirstEntity($data, $entityName)
    {
        if (is_array($data)) {
            $entity = $this->getFirstEntityByName($entityName);
            return $this->mapAttributesFromSecondEntityToFirstEntityAndReturnEntity($data, $entity);
        }

        return null;
    }
850183
public static function create($name = null, $data = null, \Closure $ready = null)
    {
        $task = new self($data);
        $task->name($name);
        if (is_callable($ready)) {
            call_user_func($ready, $task);
        }

        return $task;
    }
102698
static private function _create_model(array $data)
    {
        self::$preventInit = true;
        self::$skipDefaultAttributes = true;
        $model = new static();
        $model->attributes = $data;
        
        # Check for primary_key and set init_attrs.
        if (!static::table()->primaryKey()) {
            $model->storedAttributes = $data;
        }
        $model->isNewRecord = false;
        $model->_register();
        $model->init();
        
        return $model;
    }
1191646
public function save($name, array $data = [])
    {
        $table  = $this->_getTable();
        $entity = $table->findByName($name)->first();

        $newData = [
            'name'   => $name,
            'params' => $data
        ];

        if ($entity !== null && $entity->get('name') === $name) {
            $entity = $table->patchEntity($entity, $newData);
        } else {
            $entity = $table->newEntity($newData);
        }

        return $table->save($entity);
    }
924571
public static function create(array $data)
    {
        $token = new self();
        foreach ($data as $key => $value) {
            $key = self::underscore2CamelCase($key);
            if (property_exists($token, $key)) {
                $token->{$key} = $value;
            }
        }
        return $token;
    }
304311
protected function create(array $data)
    {
        $user = UserModel::create($data);
        return User::find($user->id);
    }
409696
public function create(array $data)
    {
        if (array_key_exists("image", $data)) {
            if (class_exists('\CURLFile')) {
                $data["image"] = new \CURLFile($data['image']);
            } else {
                $data["image"] = '@' . $data['image'];
            }
        }

        $response = $this->request->post("pins", $data);
        return new Pin($this->master, $response);
    }
1015834
public function make(string $name, array $data = [], \Closure $callback = null)
    {
        $this->setWidgetName($name);
        $this->data = $data;
        /*
         | If second param given as closure then we will
         | return callback
         */
        if (!is_null($callback) && $callback instanceof \Closure) {
            return $callback($this);
        }

        /*
         | return object
         */
        return $this->render();
    }
890774
public function createFromImportedData($name, $data)
    {
        if (!is_array($data)) {
            return new GroupParameter($name, [$data]);
        } elseif (!$this->isAssociativeArray($data)) {
            return new GroupParameter($name, $data);
        }
        $parameter = new GroupParameter($name);
        foreach ($data as $childName => $childData) {
            $parameter->addChild($this->createFromImportedData($childName, $childData));
        }
        return $parameter;
    }
869588
protected function create(array $data)
  {
    //Ceate User
    $user = User::create([
      'name' => $data['name'],
      'email' => $data['email'],
      'password' => bcrypt($data['password']),
    ]);

    //create Blank profile
    $profile = Profile::create([
      'user_id' => $user->id,
      'bio'     => '',
    ]);
    $profile->save();

    //Assign User Role
    $user->assign('user');
    return $user;
  }