Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 10 2019 09:26
    asika32764 opened #294
  • Oct 29 2019 16:08

    asika32764 on staging

    Update update.xml (compare)

  • Oct 29 2019 16:04

    asika32764 on 2.1.21

    (compare)

  • Oct 29 2019 16:04

    asika32764 on master

    Prepare for 4.1.21 development. Update build.php Update update.xml and 14 more (compare)

  • Oct 29 2019 16:04

    asika32764 on staging

    Prepare for 4.1.22 development. (compare)

  • Oct 29 2019 15:50

    asika32764 on staging

    Fix test (compare)

  • Oct 29 2019 15:39

    asika32764 on staging

    add mysql (compare)

  • Oct 29 2019 15:38

    asika32764 on staging

    Fix array (compare)

  • Oct 29 2019 15:33

    asika32764 on staging

    sudo (compare)

  • Oct 29 2019 15:32

    asika32764 on staging

    Do not test g trans (compare)

  • Oct 29 2019 15:28

    asika32764 on staging

    Use phpunit 4 (compare)

  • Oct 29 2019 15:26

    asika32764 on staging

    Fix test (compare)

  • Oct 29 2019 14:21

    asika32764 on staging

    use phpunit 5 (compare)

  • Oct 29 2019 14:18

    asika32764 on staging

    Use junction Use new matrix (compare)

  • Oct 29 2019 14:12

    asika32764 on staging

    Use class alias fix for 7.4 Fix for 7.4 (compare)

  • Sep 24 2019 17:09

    asika32764 on staging

    Fix get path in ItemModel Fix id slug (compare)

  • Apr 24 2019 16:50

    asika32764 on staging

    Update update.xml (compare)

  • Apr 24 2019 16:48

    asika32764 on staging

    Update build.php (compare)

  • Apr 24 2019 16:22

    asika32764 on staging

    Prepare for 4.1.21 development. (compare)

  • Apr 24 2019 16:20

    asika32764 on staging

    (compare)

Biromain
@Biromain
My compagnie start to go on PHP7 Windwalker can be compatible ? 2.1? 2.2?
Simon Asika
@asika32764
I think there should totally backward competity for 2.1, do you still meet any new error when you migrating to 2.1?
2.1 supports PHP7 now, please try 2.1.4
Simon Asika
@asika32764
Here we can disscus on a new forum
http://natika.windwalker.io/
Biromain
@Biromain
Any way to have windwalker in component/admin/src instead of libraries? (sometimes unwritable)
Simon Asika
@asika32764
I'm not sure, you need to do it manually and have a try
Biromain
@Biromain
Ok, seem work but not in installation, in stand by atm.
Have you any idea to check in installation the right(acl?) folder of joomla libraries and revert installation if component install can write in libraries?
Simon Asika
@asika32764

Try to write your own install script in component install.php

See https://github.com/lyrasoft/userxtd/blob/staging/admin/install.php#L104-L111

if libraries is not writable, just copy windwalker to component folder
Biromain
@Biromain
Seems work ty
Biromain
@Biromain
I see $dataClass property in DataMapper. That say can i create php classes entity (like Doctrine Entity) and hydrate/populate it? Same for $datasetClass, i can specify a entitiesIterator? That a good way to get a standard object for a row with computed properties etc.
Simon Asika
@asika32764
Yes you can, but you must set dataSetClass first, because DataSet will convert all element to Data object
Simon Asika
@asika32764
RAD has already supports a simple entity pattern, please see how to use it:
https://gist.github.com/asika32764/9aa16f0e207fccf8923454eb84aa6fff
Biromain
@Biromain
Seems good to working with it but i dont find a way to convert field like DateTime overrided with toString method, json field, etc, prepare method is before data populated.
Simon Asika
@asika32764
Where do you want to convert these data? in Entity class or DataMapper?
Biromain
@Biromain
I'm trying in entity but perhaps it's not the best place?
Simon Asika
@asika32764
Try use __set() method to override it?
or set()
public function __set($name, $value)
{
    if ($value instanceof DateTime) 
    // toString
}
Simon Asika
@asika32764
You must add protected to make sure __set() will be executed
class FlowerEntitySakura extends \Windwalker\DataMapper\Entity\Entity
{
    protected $id;
    protected $title;
    protected $alias;
    protected $created;

    public function __construct($fields = null, $data = null)
    {
        $fields = \Windwalker\Helper\DatabaseHelper::getColumns('#__flower_sakuras');

        parent::__construct(array_keys($fields), $data);
    }

    public function __set($field, $value = null)
    {
        if ($value instanceof DateTime)
        {
            $value = $value->format(JFactory::getDbo()->getDateFormat());
        }

        parent::__set($field, $value);
    }
}
Or write your own getter and setter setCreated()
Currently RAD Entity class is not so powerful, but we can enhance it in the feture.
I will convert my property manually now $sakura->created = $date->toSql()
Biromain
@Biromain
Ok ty, i will look that. No problem about no powerfulness of entity system, i'm trying to understand much better rad ww.
Biromain
@Biromain
Hi, i have often sql query executed multiple times. I dont understand why. :s
Biromain
@Biromain