public function attributes( ?array $only = null, ?array $except = null, ?bool $schemaOnly = false )
	{
		$names = array_keys( static::getTableSchema()->columns );
		
		if( !$schemaOnly ) {
			
			$class = new \ReflectionClass( $this );
			
			foreach( $class->getProperties( \ReflectionProperty::IS_PUBLIC ) as $property ) {
				if( !$property->isStatic() ) {
					$names[] = $property->getName();
				}
			}
			
		}
		
		$names = array_unique( $names );
		
		if( $only ) {
			$names = array_intersect( $only, $names );
		}
		
		if( $except ) {
			$names = array_diff( $names, $except );
		}
		
		return $names;
	}
public function attributes( ?array $only = null, ?array $except = null, ?bool $schemaOnly = false )
	{
		$names = array_keys( static::getTableSchema()->columns );
		
		if( !$schemaOnly ) {
			
			$class = new \ReflectionClass( $this );
			
			foreach( $class->getProperties( \ReflectionProperty::IS_PUBLIC ) as $property ) {
				if( !$property->isStatic() ) {
					$names[] = $property->getName();
				}
			}
			
		}
		
		$names = array_unique( $names );
		
		if( $only ) {
			$names = array_intersect( $only, $names );
		}
		
		if( $except ) {
			$names = array_diff( $names, $except );
		}
		
		return $names;
	}
public function attributes ( ? array $ only = null , ? array $ except = null , ? bool $ schemaOnly = false ) { $ names = array_keys ( static :: getTableSchema ( ) -> columns ) ; if ( ! $ schemaOnly ) { $ class = new \ ReflectionClass ( $ this ) ; foreach ( $ class -> getProperties ( \ ReflectionProperty :: IS_PUBLIC ) as $ property ) { if ( ! $ property -> isStatic ( ) ) { $ names [ ] = $ property -> getName ( ) ; } } } $ names = array_unique ( $ names ) ; if ( $ only ) { $ names = array_intersect ( $ only , $ names ) ; } if ( $ except ) { $ names = array_diff ( $ names , $ except ) ; } return $ names ; }
Returns the list of all attribute names of the model.
The default implementation will return all column names of the table associated with this AR class.
@return array list of attribute names.
Returns the list of all attribute names of the model . The default implementation will return all column names of the table associated with this AR class .