Forums / Developer / Missed attributes in Matrix. is it a bug?

Missed attributes in Matrix. is it a bug?

Author Message

Sergey D

Thursday 03 June 2004 2:57:17 am

It seems in ezmatrix.php rowCount and columnCount are hidden or missed...

    function hasAttribute( $name )
    {
        if ( $name == "name" ||  $name == "rows" ||  $name == "columns" ||  $name == "matrix"  )
            return true;
        else
            return false;
    }
    function &attribute( $name )
    {
        switch ( $name )
        {
            case "name" :
            {
                return $this->Name;
            }break;
            case "matrix" :
            {
                return $this->Matrix;
            }break;
            case "rows" :
            {
                return $this->Matrix['rows'];
            }break;
            case "columns" :
            {
                return $this->Matrix['columns'];
            }break;
            case "rowCount" :
            {
                return count( $this->Matrix['rows']['sequential'] );
            }break;
            case "columnCount" :
            {
                return count( $this->Matrix['columns']['sequential'] );
            }break;

        }
    }

Is it a bug ?

sergey d.

Jan Borsodi

Thursday 03 June 2004 4:30:31 am

Yes, this looks like a bug.

Could you file a bug report on this one.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Sergey D

Thursday 03 June 2004 6:29:20 pm

done..