public static function factory($resource, $data, $name = null)
    {
        $instance = new static();

        $instance->id = (string) Uuid::uuid4();

        $instance->name = self::makeName($data, $name);

        $instance->display = $instance->name;

        $instance->resource = $resource;

        $instance->importProperties($data);

        return $instance;
    }
public static function factory($resource, $data, $name = null)
    {
        $instance = new static();

        $instance->id = (string) Uuid::uuid4();

        $instance->name = self::makeName($data, $name);

        $instance->display = $instance->name;

        $instance->resource = $resource;

        $instance->importProperties($data);

        return $instance;
    }
public static function factory ( $ resource , $ data , $ name = null ) { $ instance = new static ( ) ; $ instance -> id = ( string ) Uuid :: uuid4 ( ) ; $ instance -> name = self :: makeName ( $ data , $ name ) ; $ instance -> display = $ instance -> name ; $ instance -> resource = $ resource ; $ instance -> importProperties ( $ data ) ; return $ instance ; }
Target factory.

@param $resource
@param $data
@return Target
Target factory .